apache / apache/superset

System default themes should be available for assignment to a dashboard

Open
#37,289 3 comments 0 reactions 2 assignees Claimed by @yousoph View on GitHub
global:theming 🦾 ai-candidate
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

### 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:

Image

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.