mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 08:00:01 +08:00
This commit introduces automatic CSS classes added to the <body> based on the upcoming changes the current visitor (logged in or anon user) is affected by. This allows designers and theme developers to easily style the UI based on upcoming changes. For example a change called `enable_chat_channel_starring` would be `uc-enable-chat-channel-starring` on the body. This commit also refactors the way we send upcoming change data to the UI for the current user, because it also needs to work for anon users. Only upcoming changes enabled for Everyone will be added to the <body> for anon users. Logged in in users will get classes for all upcoming changes they are affected by based on their groups or changes enabled for Everyone.
8 lines
195 B
Ruby
8 lines
195 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:site_setting_group) do
|
|
after_create do |site_setting_group|
|
|
SiteSetting.refresh_site_setting_group_ids!
|
|
SiteSetting.notify_changed!
|
|
end
|
|
end
|