You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mistercrunch (via GitHub)" <gi...@apache.org> on 2025/06/20 23:47:34 UTC
[PR] feat: improving theme docs + configuration [superset]
mistercrunch opened a new pull request, #33851:
URL: https://github.com/apache/superset/pull/33851
Fixing/improving how the theme is set, feature flag for ThemeEditor and related docs
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2160084664
##########
superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts:
##########
@@ -52,7 +52,6 @@ export enum FeatureFlag {
SqlValidatorsByEngine = 'SQL_VALIDATORS_BY_ENGINE',
SshTunneling = 'SSH_TUNNELING',
TaggingSystem = 'TAGGING_SYSTEM',
- ThemeEnableDarkThemeSwitch = 'THEME_ENABLE_DARK_THEME_SWITCH',
Review Comment:
Gotcha. Felt redundant as switching to dark can be achieved in a few extra clicks. I don't mind keeping it.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2160089949
##########
superset/config.py:
##########
@@ -551,19 +551,26 @@ class D3TimeFormat(TypedDict, total=False):
"PLAYWRIGHT_REPORTS_AND_THUMBNAILS": False,
# Set to True to enable experimental chart plugins
"CHART_PLUGINS_EXPERIMENTAL": False,
- # Regardless of database configuration settings, force SQLLAB to run async using Celery # noqa: E501
+ # Regardless of database configuration settings, force SQLLAB to run async
+ # using Celery
"SQLLAB_FORCE_RUN_ASYNC": False,
# Set to True to to enable factory resent CLI command
"ENABLE_FACTORY_RESET_COMMAND": False,
# Whether Superset should use Slack avatars for users.
# If on, you'll want to add "https://avatars.slack-edge.com" to the list of allowed
# domains in your TALISMAN_CONFIG
"SLACK_ENABLE_AVATARS": False,
- # Adds a switch to the navbar to enable/disable the dark theme
- # This is used for development to expose what is dynamic (css-in-js) vs
- # what is managed by `.less` files.
- "DARK_THEME_SWITCH": False,
Review Comment:
I think that was a leftover/miswired which got me confused as it wasn't referenced elsewhere, and the two I'm adding now were missing references on the backend...
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2160459094
##########
superset/config.py:
##########
@@ -551,19 +551,26 @@ class D3TimeFormat(TypedDict, total=False):
"PLAYWRIGHT_REPORTS_AND_THUMBNAILS": False,
# Set to True to enable experimental chart plugins
"CHART_PLUGINS_EXPERIMENTAL": False,
- # Regardless of database configuration settings, force SQLLAB to run async using Celery # noqa: E501
+ # Regardless of database configuration settings, force SQLLAB to run async
+ # using Celery
"SQLLAB_FORCE_RUN_ASYNC": False,
# Set to True to to enable factory resent CLI command
"ENABLE_FACTORY_RESET_COMMAND": False,
# Whether Superset should use Slack avatars for users.
# If on, you'll want to add "https://avatars.slack-edge.com" to the list of allowed
# domains in your TALISMAN_CONFIG
"SLACK_ENABLE_AVATARS": False,
- # Adds a switch to the navbar to enable/disable the dark theme
- # This is used for development to expose what is dynamic (css-in-js) vs
- # what is managed by `.less` files.
- "DARK_THEME_SWITCH": False,
Review Comment:
@geido should be good now. I got confused because the feature flags object wasn't aligned. We could also consolidate the 2 flags into a single flag and a single menu.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "geido (via GitHub)" <gi...@apache.org>.
geido commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2159893364
##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -500,15 +494,6 @@ const RightMenu = ({
<ThemeEditor theme={themeEditorTheme} setTheme={setTheme} />
</span>
)}
- {isFeatureEnabled(FeatureFlag.ThemeEnableDarkThemeSwitch) && (
- <span>
- <ThemeSelect
Review Comment:
@mistercrunch isn't this the component that controls the option for the user for default / dark / system settings mode? I don't think this is a leftover. This was meant to be here.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "geido (via GitHub)" <gi...@apache.org>.
geido commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2160144508
##########
superset/config.py:
##########
@@ -551,19 +551,26 @@ class D3TimeFormat(TypedDict, total=False):
"PLAYWRIGHT_REPORTS_AND_THUMBNAILS": False,
# Set to True to enable experimental chart plugins
"CHART_PLUGINS_EXPERIMENTAL": False,
- # Regardless of database configuration settings, force SQLLAB to run async using Celery # noqa: E501
+ # Regardless of database configuration settings, force SQLLAB to run async
+ # using Celery
"SQLLAB_FORCE_RUN_ASYNC": False,
# Set to True to to enable factory resent CLI command
"ENABLE_FACTORY_RESET_COMMAND": False,
# Whether Superset should use Slack avatars for users.
# If on, you'll want to add "https://avatars.slack-edge.com" to the list of allowed
# domains in your TALISMAN_CONFIG
"SLACK_ENABLE_AVATARS": False,
- # Adds a switch to the navbar to enable/disable the dark theme
- # This is used for development to expose what is dynamic (css-in-js) vs
- # what is managed by `.less` files.
- "DARK_THEME_SWITCH": False,
Review Comment:
I believe this is meant to be the preferred way of switching theme modes and works independently of the editor. We might want to keep the editor FF false by default and this default True?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(theming): improving theme docs and configuration [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch merged PR #33851:
URL: https://github.com/apache/superset/pull/33851
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2160090061
##########
superset/config.py:
##########
@@ -662,11 +669,17 @@ class D3TimeFormat(TypedDict, total=False):
# This is merely a default
EXTRA_CATEGORICAL_COLOR_SCHEMES: list[dict[str, Any]] = []
-# THEME_OVERRIDES is used for adding custom theme to superset, it follows the ant design
+# THEME is used for setting a custom theme to Superset, it follows the ant design
# theme structure
# You can use the AntDesign theme editor to generate a theme structure
# https://ant.design/theme-editor
-THEME_OVERRIDES: dict[str, Any] = {}
+# To expose a JSON theme editor modal that can be triggered from the navbar
+# set the `ENABLE_THEME_EDITOR` feature flag to True.
+#
+# To set up the dark theme:
+# THEME = {"algorithm": "dark"}
+
+THEME: dict[str, Any] = {}
Review Comment:
simple renaming here as overrides doesn't make sense anymore
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2159769431
##########
docs/docs/configuration/theming.mdx:
##########
@@ -0,0 +1,53 @@
+---
+title: Theming
+hide_title: true
+sidebar_position: 12
+version: 1
+---
+# Theming Superset
+
+:::note
+apache-superset>=6.0
+:::
+
+Superset now rides on **Ant Design v5’s token-based theming**.
+Every Antd token works, plus a handful of Superset-specific ones for charts and dashboard chrome.
Review Comment:
### Missing context for token-based theming <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
The documentation lacks explanation of what token-based theming means and why it's beneficial.
###### Why this matters
Users unfamiliar with token-based theming systems may struggle to understand the benefits and proper usage of this feature.
###### Suggested change ∙ *Feature Preview*
Superset uses **Ant Design v5's token-based theming** system, which provides a flexible way to maintain consistent visual styles across the application. Every Antd token works, plus additional Superset-specific tokens for charts and dashboard chrome, allowing you to customize the entire interface through a single configuration.
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/be61b3f3-2a65-4d07-bac3-1d34432e2ac9/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/be61b3f3-2a65-4d07-bac3-1d34432e2ac9?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/be61b3f3-2a65-4d07-bac3-1d34432e2ac9?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/be61b3f3-2a65-4d07-bac3-1d34432e2ac9?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/be61b3f3-2a65-4d07-bac3-1d34432e2ac9)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:93a3ba4d-a163-4089-b834-ce8e2c9a4d67 -->
[](93a3ba4d-a163-4089-b834-ce8e2c9a4d67)
##########
superset/config.py:
##########
@@ -662,11 +662,15 @@ class D3TimeFormat(TypedDict, total=False):
# This is merely a default
EXTRA_CATEGORICAL_COLOR_SCHEMES: list[dict[str, Any]] = []
-# THEME_OVERRIDES is used for adding custom theme to superset, it follows the ant design
+# THEME is used for setting a custom theme to Superset, it follows the ant design
# theme structure
# You can use the AntDesign theme editor to generate a theme structure
# https://ant.design/theme-editor
-THEME_OVERRIDES: dict[str, Any] = {}
+# To expose a JSON theme editor modal that can be triggered from the navbar
+# set the `ENABLE_THEME_EDITOR` feature flag to True.
+# THEME = { algorigthm: "dark"}
+THEME: dict[str, Any] = {}
+THEME = {"algorithm": "dark"}
Review Comment:
### Redundant Variable Declarations with Typo <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
Multiple conflicting declarations of the THEME configuration with a typo in the first one and redundant empty declaration.
###### Why this matters
Multiple declarations with a typo create confusion about which value is actually used and increase the chance of bugs.
###### Suggested change ∙ *Feature Preview*
Remove redundant declarations and fix typo:
```python
THEME: dict[str, Any] = {"algorithm": "dark"}
```
###### Provide feedback to improve future suggestions
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/d19d19df-8143-4d36-8bbd-5bfaf09c5423/upvote) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/d19d19df-8143-4d36-8bbd-5bfaf09c5423?what_not_true=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/d19d19df-8143-4d36-8bbd-5bfaf09c5423?what_out_of_scope=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/d19d19df-8143-4d36-8bbd-5bfaf09c5423?what_not_in_standard=true) [](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/d19d19df-8143-4d36-8bbd-5bfaf09c5423)
</details>
<sub>
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:2ba3bef7-0f86-4669-99ce-617ef02ce4dc -->
[](2ba3bef7-0f86-4669-99ce-617ef02ce4dc)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: improving theme docs + configuration [superset]
Posted by "geido (via GitHub)" <gi...@apache.org>.
geido commented on code in PR #33851:
URL: https://github.com/apache/superset/pull/33851#discussion_r2159894625
##########
superset-frontend/packages/superset-ui-core/src/utils/featureFlags.ts:
##########
@@ -52,7 +52,6 @@ export enum FeatureFlag {
SqlValidatorsByEngine = 'SQL_VALIDATORS_BY_ENGINE',
SshTunneling = 'SSH_TUNNELING',
TaggingSystem = 'TAGGING_SYSTEM',
- ThemeEnableDarkThemeSwitch = 'THEME_ENABLE_DARK_THEME_SWITCH',
Review Comment:
Just confirmed. This is meant to be here. Not a leftover. Please, check https://github.com/apache/superset/pull/33420/files
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org