You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sfirke (via GitHub)" <gi...@apache.org> on 2026/01/20 16:39:20 UTC
[I] System default themes should be available for assignment to a dashboard [superset]
sfirke opened a new issue, #37289:
URL: https://github.com/apache/superset/issues/37289
### Bug description
**USE CASE**
I have a dashboard that has custom CSS. That worked in 4.1.4. When we updated to 6.0.0, it suddenly became unusable if you navigated to the dashboard and Superset detected you were using Dark Mode - because the colors we had hard-coded in the CSS depended on a light theme (see screenshot).
**SOLUTION**
I should be able to assign `THEME_DEFAULT` to the dashboard so that even if a user is in dark mode, they see the light theme.
**BUG**
The two system default themes, `THEME_DARK` and `THEME_DEFAULT`, are not available in the dropdown menu when assigning a dashboard theme. Here my workaround is to create a mostly-empty light theme, which I _can_ then assign to the dashboard:
<img width="727" height="885" alt="Image" src="https://github.com/user-attachments/assets/59dec77b-86c1-4e31-b639-7cba97984c78" />
I hope the fix is as simple as a backend change that allows these two themes to appear in the dashboard theme selection list.
Or if I'm misunderstanding and there's a better/other way to force a dashboard to be always-light or always-dark so that any custom CSS applied on top remains valid, please correct me.
### Screenshots/recordings
_No response_
### Superset version
6.0.0
### Python version
Not applicable
### Node version
Not applicable
### Browser
Firefox
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
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.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: [I] System default themes should be available for assignment to a dashboard [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #37289:
URL: https://github.com/apache/superset/issues/37289#issuecomment-3773921629
<!-- Answer -->
The fix isn't just a simple backend change—system default themes (THEME_DEFAULT and THEME_DARK) are defined in config.py as base themes and are not stored as database rows, which is why they don't appear in the dashboard theme assignment dropdown. Only themes saved in the database are assignable to dashboards via the UI. There’s no explicit filtering; the dropdown just lists what's in the css_templates table, so the system themes are never included by default.
To make these system themes assignable, you’d need to either (a) materialize them as database rows (so they show up like any other theme), or (b) update the API/frontend to include config.py themes as special options in the dropdown. Either approach would require changes in both backend (theme API/model) and frontend (dropdown logic). If you take this on, be sure to test dashboard appearance in both light and dark modes, check for regressions in theme assignment, and confirm that custom CSS still works as expected.
This would be a good first issue for someone comfortable tracing both backend and frontend code paths, especially around theme management and dashboard metadata. For more details on how the theme system is structured, see [this merged PR](https://github.com/apache/superset/pull/35220) and [the theme DAO logic](https://github.com/apache/superset/pull/35220).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/cbfa01c1-acc2-4432-8889-69f742d8858b?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=The%20fix%20isn%27t%20just%20a%20simple%20backend%20change%E2%80%94system%20default%20themes%20%28THEME_DEFAULT%20and%20THEME_DARK%29%20are%20defined%20in%20config.py%20as%20base%20themes%20and%20are%20not%20stored%20as%20database%20rows%2C%20which%20is%20why%20they%20don%27t%20appear%20in%20the%20dashboard%20theme%20assignment%20dropdown.%20Only%20themes%20saved%20in%20the%20database%20are%20assignable%20to%20dashboards%20via%20the%20UI.%20There%E2%80%99s%20no%20explicit%20filtering%3B%20the%20dropdown%20just%20lists%20what%27s%20in%20the%20css_templates%20table%2C%20so%20the%20system%20themes%20are%20never%20included%20by%20default.%0A%0ATo%20make%20these%20system%20themes%20assignable%2C%20you%E2%80%99d%20need%20to%20either%20%28a%29%20materiali
ze%20them%20as%20database%20rows%20%28so%20they%20show%20up%20like%20any%20other%20theme%29%2C%20or%20%28b%29%20update%20the%20API/frontend%20to%20include%20config.py%20themes%20as%20special%20options%20in%20the%20dropdown.%20Either%20approach%20would%20require%20changes%20in%20both%20backend%20%28theme%20API/model%29%20and%20frontend%20%28dropdown%20logic%29.%20If%20you%20take%20this%20on%2C%20be%20sure%20to%20test%20dashboard%20appearance%20in%20both%20light%20and%20dark%20modes%2C%20check%20for%20regressions%20in%20theme%20assignment%2C%20and%20confirm%20that%20custom%20CSS%20still%20works%20as%20expected.%20%0A%0AThis%20would%20be%20a%20good%20first%20issue%20for%20someone%20comfortable%20tracing%20both%20backend%20and%20frontend%20code%20paths%2C%20especially%20around%20theme%20management%20and%20dashboard%20metadata.%20For%20more%20details%20on%20how%20the%20theme%20system%20is%20structured%2C%20see%20%5Bthis%20merged%20PR%5D%28https%3A//github.com/apache/superset/pull/35220%2
9%20and%20%5Bthe%20theme%20DAO%20logic%5D%28https%3A//github.com/apache/superset/pull/35220%29.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37289)
--
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: [I] System default themes should be available for assignment to a dashboard [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe closed issue #37289: System default themes should be available for assignment to a dashboard
URL: https://github.com/apache/superset/issues/37289
--
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: [I] System default themes should be available for assignment to a dashboard [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #37289:
URL: https://github.com/apache/superset/issues/37289#issuecomment-3773948205
Mmm okay, good to know. Maybe not super beginner-friendly.
--
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: [I] System default themes should be available for assignment to a dashboard [superset]
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #37289:
URL: https://github.com/apache/superset/issues/37289#issuecomment-3773873906
*IF* the fix is as simple as I suggest it is, this would be a good first issue. But anyone taking on this good first issue should examine the code and test manually to ensure this is indeed the situation.
--
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