mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
FEATURE: Split navigation preference for count and behavior of sidebar links (#22203)
This PR splits up the preference that controls the count vs dot and destination of sidebar links, which is really hard to understand, into 2 simpler checkboxes: The new preferences/checkboxes are off by default, but there are database migrations to switch the old preference to the new ones so that existing users don't have to update their preferences to keep their preferred behavior of sidebar links when this changed is rolled out. Internal topic: t/103529.
This commit is contained in:
@ -7,24 +7,6 @@ RSpec.shared_examples "User Sidebar Serializer Attributes" do |serializer_klass|
|
||||
|
||||
before { SiteSetting.navigation_menu = "sidebar" }
|
||||
|
||||
describe "#sidebar_list_destination" do
|
||||
it "is not included when navigation menu is legacy" do
|
||||
SiteSetting.navigation_menu = "legacy"
|
||||
|
||||
expect(serializer.as_json[:sidebar_list_destination]).to eq(nil)
|
||||
end
|
||||
|
||||
it "returns choosen value or default" do
|
||||
expect(serializer.as_json[:sidebar_list_destination]).to eq(
|
||||
SiteSetting.default_sidebar_list_destination,
|
||||
)
|
||||
|
||||
user.user_option.update!(sidebar_list_destination: "unread_new")
|
||||
|
||||
expect(serializer.as_json[:sidebar_list_destination]).to eq("unread_new")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#sidebar_category_ids" do
|
||||
fab!(:group) { Fabricate(:group) }
|
||||
fab!(:category) { Fabricate(:category) }
|
||||
|
Reference in New Issue
Block a user