Add default option for Syntax Highlighting Theme user setting
What does this MR do and why?
Adds default_syntax_highlighting_theme
config option to change the default syntax highlighting theme, similair to the already existing default_theme
option.
Pairing both options makes a default dark theme with matching default syntax highlighting theme possible, the previously unchangeable default light syntax theme would clash horribly.
Added documentation to the Application Settings API for default_syntax_highlighting_theme
.
Solves #25129 (closed)
Screenshots
If an anonymous user visits GitLab and the default_theme
has been set to Dark Mode, then the syntax highlighting will clash since it defaults to light. This does not impact existing user preferences, only those visitors and new users.
Before | After |
---|---|
How to set up and validate locally
- Change the
default_syntax_highlighting_theme
to 2 via the application settings API - Create a new user and impersonate them
- Verify that the syntax highlighting theme is set to Dark on their preferences page
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.