discourse/spec/integration
Kris dbcbd0d896
FEATURE: add modifier to restrict theme color schemes (#38796)
This allows themes to set a modifier in their `about.json` that
restricts a theme's color palettes to only what's defined within the
theme.

```json
"modifiers": {
   "only_theme_color_schemes": true
}
```

Once set, a theme's color palette settings will only list the palettes
included in about.json. A banner is shown indicating that the theme
restricts palettes.

<img width="700" alt="image"
src="https://github.com/user-attachments/assets/cfb4433c-c7c9-4923-a121-fddd572c29ea"
/>

<img width="300" alt="image"
src="https://github.com/user-attachments/assets/67ec1f72-d408-4e3b-911f-a2d0e4db9a37"
/>


If there's only 1 palette defined by the theme, it will be set to both
light and dark settings.

If there are more than 1 palettes defined, we check to see if one is
dark and will use the first dark palette for the dark setting.

If there are no color palettes defined by the theme, the color selection
will be unrestricted.

---------

Co-authored-by: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
2026-03-26 09:03:11 -04:00
..
activerecord_preventing_writes_spec.rb DEV: Drop discourse-plugin and x-handlebars inline scripts (#38856) 2026-03-25 10:49:23 +00:00
api_keys_spec.rb
auto_reject_reviewable_users_spec.rb
blocked_hotlinked_media_spec.rb DEV: Prevent videos from preloading metadata (#23807) 2023-10-12 13:47:48 -06:00
category_tag_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
content_security_policy_spec.rb DEV: remove legacy CSP implementation to make strict-dynamic only accepted behaviour (#27486) 2024-06-18 16:40:53 +08:00
discord_omniauth_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
discourse_cookie_store_spec.rb Revert "DEV: Debug cookie overflows" (#35120) 2025-10-02 09:55:47 +02:00
email_outbound_spec.rb
email_style_spec.rb DEV: Preserve ids/classes in emails (#32084) 2025-03-31 20:58:45 +01:00
facebook_omniauth_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
flags_spec.rb DEV: Automatically update groups for test users with explicit TL (#25415) 2024-01-29 17:52:02 +08:00
github_omniauth_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
group_spec.rb
invalid_request_spec.rb DEV: Enable Rails 7.1 defaults 2024-08-12 10:41:13 +02:00
invite_only_registration_spec.rb DEV: Change hide_email_address_taken default to true (#30293) 2024-12-17 10:46:04 +08:00
message_bus_spec.rb DEV: Support 'cors origins' site setting for message-bus (#33066) 2025-06-04 14:22:15 +01:00
multisite_cookies_spec.rb Revert "DEV: Migrate existing cookies to Rails 7 format" 2023-01-12 12:07:49 +01:00
multisite_spec.rb
rate_limiting_spec.rb DEV: Call Discourse.redis.flushdb after the end of each test (#29117) 2024-10-09 07:19:31 +08:00
remote_theme_color_schemes_spec.rb FEATURE: add modifier to restrict theme color schemes (#38796) 2026-03-26 09:03:11 -04:00
request_tracker_spec.rb
same_ip_spammers_spec.rb DEV: Automatically update groups for test users with explicit TL (#25415) 2024-01-29 17:52:02 +08:00
secure_uploads_spec.rb DEV: Refactor test-specific setting overrides into rails_helper.rb (#35594) 2025-10-27 10:14:56 +00:00
smtp_spec.rb FIX: do not use public IP address space for tests 2025-12-16 09:35:01 -05:00
spam_rules_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
tag_counts_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
topic_auto_close_spec.rb
topic_thumbnail_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
twitter_omniauth_spec.rb DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
watched_words_spec.rb FIX: When testing multiple flagged words, ensure test matches expected word order. (#31758) 2025-03-12 09:45:44 +11:00