rusackas commented on code in PR #43601:
URL: https://github.com/apache/superset/pull/43601#discussion_r3875341469


##########
docs/admin_docs/configuration/theming.mdx:
##########
@@ -88,6 +88,22 @@ THEME_DARK = {
 # - OS preference detection is automatically enabled
 ```
 
+### Default Theme Mode
+
+By default, Superset mimics the visitor's OS/browser preference (light or 
dark) for
+sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to 
override
+that starting point instance-wide:

Review Comment:
   Good catch — clarified that embedded dashboards use their own `themeMode` 
URL param instead of `THEME_DEFAULT_MODE`, falling back to light when absent.



##########
docs/admin_docs/configuration/theming.mdx:
##########
@@ -88,6 +88,22 @@ THEME_DARK = {
 # - OS preference detection is automatically enabled
 ```
 
+### Default Theme Mode
+
+By default, Superset mimics the visitor's OS/browser preference (light or 
dark) for
+sessions that don't have a saved user preference. Use `THEME_DEFAULT_MODE` to 
override
+that starting point instance-wide:
+
+```python
+# Default theme mode for sessions without a saved user preference.
+# One of "default" (always light), "dark" (always dark), or "system" (mimic OS 
preference).
+THEME_DEFAULT_MODE = "dark"
+```
+
+- `"system"` (the default) preserves the existing behavior of following the 
OS/browser preference.

Review Comment:
   Confirmed — `determineInitialMode` forces light mode when no dark theme is 
configured, so `"system"` only follows the OS preference if `THEME_DARK` is 
set. Noted that in the doc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to