Skip to content

feat(theming): land Ant Design v5 overhaul — dynamic themes, real dark mode + massive styling refactor#31590

Merged
mistercrunch merged 195 commits intomasterfrom
template_less
Jun 20, 2025
Merged

feat(theming): land Ant Design v5 overhaul — dynamic themes, real dark mode + massive styling refactor#31590
mistercrunch merged 195 commits intomasterfrom
template_less

Conversation

@mistercrunch
Copy link
Copy Markdown
Member

@mistercrunch mistercrunch commented Dec 20, 2024

This merges the long-running “theming” branch into master.

Superset is now fully, dynamically themeable. We’ve moved to Ant Design v5’s
token-based theming and css-in-js, killed the last traces of Bootstrap/.less,
and unlocked a first-class dark mode.

Highlights

  • Full migration to Antd v5 with major a11y gains and 100 % css-in-js
  • Removed Bootstrap, Font Awesome, and the old .less pipeline
  • Rebuilt remaining FAB server-side CRUD views with modern React components
  • Core visualizations render cleanly in both light & dark themes
  • Design atoms broken out to @superset-ui/core/components for easy reuse
  • Antd token system exposes granular per-component overrides
  • Config-driven themes (superset_config.py); WYSIWYG editor behind a FF
  • Theming works without rebuilds; OS-level auto-switch coming next

By the numbers

  • 1 267 files touched, ~50 000 LOC diff, 191 commits
  • 6-month effort, 4-5 heavy contributors, rebased on master the whole way

Known gaps / follow-ups

  • ~400 places still use legacy theme.colors.* tokens
  • Theme CRUD UI + assignment logic (per-dashboard, per-user) still TBD
  • CSS templates still load, but some may need tweaks for the new tokens
  • Full visual QA pass is in flight before we cut the 6.0 “Theming Release”

BREAKING CHANGES

  • THEME_OVERRIDES is gone — configs must move to the new Antd-compatible JSON
  • Any custom CSS templates relying on the old token names may need updates

Huge thanks to everyone who battled merge conflicts and kept this branch alive.
Ready for prime time — let’s ship it. 🚀

@korbit-ai
Copy link
Copy Markdown

korbit-ai Bot commented Dec 20, 2024

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@rusackas rusackas self-requested a review December 20, 2024 23:27
@mistercrunch mistercrunch force-pushed the template_less branch 2 times, most recently from f1c7929 to 43452ff Compare December 24, 2024 04:49
@mistercrunch mistercrunch changed the title feat: feat(less): templatize .less files to reference main theme feat: feat(less): massive theming-related PR Dec 30, 2024
@mistercrunch mistercrunch changed the title feat: feat(less): massive theming-related PR feat: massive theming-related PR Dec 30, 2024
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Jan 5, 2025
@mistercrunch mistercrunch force-pushed the template_less branch 2 times, most recently from 003f992 to 1652452 Compare January 9, 2025 07:07
mistercrunch added a commit that referenced this pull request Jan 14, 2025
Chiseling at #31590 and bringing what's atomically committable out of there.

This simply adds eslint checks to pre-commit. Note that:
- it requires having run `npm i` in superset-frontend
- it's set up to NOT run in CI as part of the pre-commit validation workflow, since we run eslint more formally in another workflow

Why doing this? Currently it's common to forget to run `npm run lint` prior to committing/pushing, so people can waste time waiting for CI to fail where it could be caught easily. It's nice to have pre-commit do the check itself because it will only evaluate the files that have changed, making it much faster than running a full lint run against all files.
mistercrunch added a commit that referenced this pull request Jan 14, 2025
…rt/e2e.ts

While working on #31590, I noticed that `expect` was not properly imported. It was using it from global for some unknown reason.
@github-actions github-actions Bot removed the github_actions Pull requests that update GitHub Actions code label Jan 14, 2025
mistercrunch added a commit that referenced this pull request Jan 15, 2025
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
mistercrunch added a commit that referenced this pull request Jan 16, 2025
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
mistercrunch added a commit that referenced this pull request Jan 16, 2025
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
mistercrunch added a commit that referenced this pull request Jan 18, 2025
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
mistercrunch added a commit that referenced this pull request Jan 18, 2025
Chiseling at #31590 that has gotten big / unruly, in this PR is a refactor of Alert-related components, going vanilla AntD.

Also. Deprecating colors.alerts since it's ambiguous/redundant with warning/error and does not exist in antd-v5
Copy link
Copy Markdown
Member

@geido geido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s been a great experience contributing to this project, and I’m excited to see it come to life!

Copy link
Copy Markdown
Contributor

@EnxDev EnxDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contributing to this project has been a rewarding experience. It’s been a pleasure working with you guys! I’m really looking forward to seeing it in action; thanks so much, everyone ❤️

Copy link
Copy Markdown
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff is giving my browser a heart attack... but here's the codeowner stamp it needs!

Thanks (and congratulations) to all involved, this is a HUGE deal, and a loooong time coming.

@mistercrunch
Copy link
Copy Markdown
Member Author

satisfaction-satisfied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels dependencies:npm embedded github_actions Pull requests that update GitHub Actions code global:theming Related to theming Superset packages plugins preset-io size/XXL 🚢 6.0.0 First shipped in 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.