Skip to content

Commit 41a2732

Browse files
FEATURE: Disable user tips + narrative bot welcome post for all sites
We want to temporarily disable user tips and the Discobot welcome PM on new sites until we have time to improve their functionality, because right now they create a lot of noise for new members and admins without providing obvious benefits.
1 parent 5dfa0f3 commit 41a2732

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

config/site_settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ basic:
489489
area: "analytics"
490490
enable_user_tips:
491491
client: true
492-
default: true
492+
default: false
493493
refresh: true
494494
area: "users"
495495
page_loading_indicator:

plugins/discourse-narrative-bot/config/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugins:
33
default: true
44
client: true
55
disable_discourse_narrative_bot_welcome_post:
6-
default: false
6+
default: true
77
discourse_narrative_bot_welcome_post_type:
88
default: 'new_user_track'
99
enum: 'DiscourseNarrativeBot::WelcomePostTypeSiteSetting'

plugins/discourse-narrative-bot/spec/requests/discobot_welcome_post_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
RSpec.describe "Discobot welcome post" do
44
let(:user) { Fabricate(:user) }
55

6-
before { SiteSetting.discourse_narrative_bot_enabled = true }
6+
before do
7+
SiteSetting.discourse_narrative_bot_enabled = true
8+
SiteSetting.disable_discourse_narrative_bot_welcome_post = false
9+
end
710

811
context "when discourse_narrative_bot_welcome_post_delay is 0" do
912
it "should not delay the welcome post" do

plugins/discourse-narrative-bot/spec/system/user_spec.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe "Narrative Bot PM", type: :system do
44
fab!(:admin)
5-
fab!(:user)
5+
fab!(:current_user, :user)
66
fab!(:topics) { Fabricate.times(2, :post).map(&:topic) }
77
fab!(:posts) { Fabricate.times(3, :post, topic: topics[0]) }
88

@@ -11,24 +11,28 @@
1111
Jobs.run_immediately!
1212
SiteSetting.enable_user_tips = true
1313
SiteSetting.discourse_narrative_bot_enabled = true
14+
SiteSetting.disable_discourse_narrative_bot_welcome_post = false
1415
end
1516

1617
it "does not delete the narrative bot PM when skipping all tips" do
17-
sign_in user
18+
sign_in(current_user)
1819

1920
# shortcut to generate welcome post since we're not going through user creation or first login
20-
user.enqueue_bot_welcome_post
21+
current_user.enqueue_bot_welcome_post
2122

22-
visit "/"
23+
visit("/")
2324

2425
tooltip = PageObjects::Components::Tooltips.new("user-tip")
25-
tooltip.find(".btn", text: "Skip tips").click
26+
tooltip.find(".btn", text: I18n.t("js.user_tips.skip")).click
2627

2728
expect(tooltip).to be_not_present
2829
expect(page).to have_css(".badge-notification.new-pms")
2930

3031
find("#toggle-current-user").click
31-
expect(page).to have_css(".notification.unread.private-message", text: "Greetings!")
32+
expect(page).to have_css(
33+
".notification.unread.private-message",
34+
text: I18n.t("discourse_narrative_bot.new_user_narrative.hello.title"),
35+
)
3236
end
3337
end
3438
end

plugins/discourse-narrative-bot/spec/user_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def i18n_t(key, params = {})
1616
stub_image_size
1717
Jobs.run_immediately!
1818
SiteSetting.discourse_narrative_bot_enabled = true
19+
SiteSetting.disable_discourse_narrative_bot_welcome_post = false
1920
end
2021

2122
describe "when a user is created" do

0 commit comments

Comments
 (0)