sadpandajoe opened a new pull request, #45581:
URL: https://github.com/apache/superset/pull/45581
### SUMMARY
Superset tooltips rendered at the small font size (12px, line-height 1.6)
from #11737 (2020) onward: first as an inline `overlayStyle` on the Tooltip
wrapper, then as the `components.Tooltip` token override that #31182 moved into
the Ant Design v5 theme config in `superset-frontend/src/theme/index.ts`. The
theming overhaul #31590 (dd129fa403) deleted that file wholesale and nothing
re-seeded the override, so from 6.0.0 every tooltip falls back to Ant Design's
global `fontSize` of 14px. The dashboard favorite-star and published-status
tooltips reported in #38726 are the visible symptom; the regression is app-wide.
This change seeds `components.Tooltip = { fontSize: 12, lineHeight: 1.6 }`
in `_THEME_DEFAULT_BASE` in `superset/config.py`, which is the one place
built-in theme tokens live (the frontend `Theme` class seeds nothing itself).
`_THEME_DARK_BASE` spreads the default base, so dark mode inherits the
override, and the existing deep merge in `get_theme_bootstrap_data` keeps it
for deployments that override only part of `THEME_DEFAULT`. Antd v6 emits this
as a tooltip-scoped `--ant-font-size: 12px` CSS variable, so no wrapper or
inline style is needed. A unit test asserts both shipped themes carry the
override.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screenshots could not be captured: the branch preview environment failed to
start, so there are no before/after captures for this PR.
### TESTING INSTRUCTIONS
1. Start Superset with the default configuration and open any dashboard.
2. Hover the favorite star next to the dashboard title, and the Draft /
Published pill. The tooltip text should be noticeably smaller than the
dashboard body text (12px rather than 14px).
3. Switch to dark mode from the user menu and hover the same icons; the
tooltip stays at the small size.
4. In `superset_config.py`, set a partial override such as `THEME_DEFAULT =
{"token": {"colorPrimary": "#ff0000"}}` and restart. The primary color changes
and the tooltips remain small, confirming the override survives the deep merge.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #38726
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Notes:
- The frontend's built-in fallback theme (used only when the bootstrap
payload carries no theme at all) has no Tooltip override, so tooltips there
would still render at Ant Design's 14px; the dashboard path reported in the
issue is unaffected.
- The new test asserts the shipped config values rather than the rendered
tooltip font size.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]