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: [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]
