mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Simplify theme and color scheme seeding (#10872)
Now that we have support for user-selectable color schemes, it makes sense to simplify seeding and theme updates in the wizard. We now: - seed only one theme, named "Default" (previously "Light") - seed a user-selectable Dark color scheme - rename the "Themes" wizard step to "Colors" - update the default theme's color scheme if a default is set (a new theme is created if there is no default)
This commit is contained in:
@@ -30,12 +30,9 @@ describe SiteSerializer do
|
||||
end
|
||||
|
||||
it "includes user-selectable color schemes" do
|
||||
scheme = ColorScheme.create_from_base(name: "Neutral", base_scheme_id: "Neutral")
|
||||
scheme.user_selectable = true
|
||||
scheme.save!
|
||||
|
||||
# it includes seeded color schemes
|
||||
serialized = described_class.new(Site.new(guardian), scope: guardian, root: false).as_json
|
||||
expect(serialized[:user_color_schemes].count).to eq (1)
|
||||
expect(serialized[:user_color_schemes].count).to eq(1)
|
||||
|
||||
dark_scheme = ColorScheme.create_from_base(name: "ADarkScheme", base_scheme_id: "Dark")
|
||||
dark_scheme.user_selectable = true
|
||||
|
||||
Reference in New Issue
Block a user