FEATURE: Enable user tips by default (#21341)

This commit is contained in:
Bianca Nenciu 2023-05-08 19:33:08 +02:00 committed by GitHub
parent c45fff9405
commit 899eb96798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 2 deletions

View File

@ -2388,7 +2388,7 @@ en:
sitemap_page_size: "Number of URLs to include in each sitemap page. Max 50.000"
enable_user_status: "(experimental) Allow users to set custom status message (emoji + description)."
enable_user_tips: "(experimental) Enable new user tips that describe key features to users"
enable_user_tips: "Enable new user tips that describe key features to users"
short_title: "The short title will be used on the user's home screen, launcher, or other places where space may be limited. It should be limited to 12 characters."

View File

@ -385,7 +385,7 @@ basic:
default: false
enable_user_tips:
client: true
default: false
default: true
login:
invite_only:

View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
class HideUserTipsForExistingUsers < ActiveRecord::Migration[7.0]
def up
execute "UPDATE user_options SET seen_popups = '{1, 2, 3, 4, 5}'"
end
def down
execute "UPDATE user_options SET seen_popups = '{}'"
end
end

View File

@ -223,6 +223,34 @@
"leader"
]
},
"user_tips": {
"type": "object",
"additionalProperties": false,
"properties": {
"first_notification": {
"type": "integer"
},
"topic_timeline": {
"type": "integer"
},
"post_menu": {
"type": "integer"
},
"topic_notification_levels": {
"type": "integer"
},
"suggested_topics": {
"type": "integer"
}
},
"required": [
"first_notification",
"topic_timeline",
"post_menu",
"topic_notification_levels",
"suggested_topics"
]
},
"groups": {
"type": "array",
"items":

View File

@ -15,6 +15,8 @@ RSpec.describe SiteSerializer do
end
it "is not included if enable_user_tips is disabled" do
SiteSetting.enable_user_tips = false
serialized = described_class.new(Site.new(guardian), scope: guardian, root: false).as_json
expect(serialized[:user_tips]).to eq(nil)
end

View File

@ -26,6 +26,7 @@ module SystemHelpers
SiteSetting.port = Capybara.server_port
SiteSetting.external_system_avatars_enabled = false
SiteSetting.disable_avatar_education_message = true
SiteSetting.enable_user_tips = false
end
def try_until_success(timeout: 2, frequency: 0.01)