mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Enable user tips by default (#21341)
This commit is contained in:
@@ -2388,7 +2388,7 @@ en:
|
|||||||
sitemap_page_size: "Number of URLs to include in each sitemap page. Max 50.000"
|
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_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."
|
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."
|
||||||
|
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ basic:
|
|||||||
default: false
|
default: false
|
||||||
enable_user_tips:
|
enable_user_tips:
|
||||||
client: true
|
client: true
|
||||||
default: false
|
default: true
|
||||||
|
|
||||||
login:
|
login:
|
||||||
invite_only:
|
invite_only:
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -223,6 +223,34 @@
|
|||||||
"leader"
|
"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": {
|
"groups": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items":
|
"items":
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ RSpec.describe SiteSerializer do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "is not included if enable_user_tips is disabled" do
|
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
|
serialized = described_class.new(Site.new(guardian), scope: guardian, root: false).as_json
|
||||||
expect(serialized[:user_tips]).to eq(nil)
|
expect(serialized[:user_tips]).to eq(nil)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ module SystemHelpers
|
|||||||
SiteSetting.port = Capybara.server_port
|
SiteSetting.port = Capybara.server_port
|
||||||
SiteSetting.external_system_avatars_enabled = false
|
SiteSetting.external_system_avatars_enabled = false
|
||||||
SiteSetting.disable_avatar_education_message = true
|
SiteSetting.disable_avatar_education_message = true
|
||||||
|
SiteSetting.enable_user_tips = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def try_until_success(timeout: 2, frequency: 0.01)
|
def try_until_success(timeout: 2, frequency: 0.01)
|
||||||
|
|||||||
Reference in New Issue
Block a user