fix(ui): truncate the page title instead of running it under the header actions
Closes SUPER-2389.
Summary
- The page title in the page-viewer header overflowed and rendered underneath the trailing actions instead of ellipsizing. Most visible on a phone, where there is no room to spare.
Why / Context
Reported with a screenshot from mobile Safari on app.superset.sh: the title ran straight through the version chip and Share button.
The trap is that this reads as already-correct — the title span has truncate, and the trigger has min-w-0. But Button's base class carries shrink-0:
inline-flex items-center justify-center gap-2 whitespace-nowrap … shrink-0 …
So the trigger never shrinks below its content width, the truncate span always has room, and nothing ever ellipsizes. The min-w-0 at the call site was dead.
How It Works
shrinkon the trigger, which tailwind-merge resolves against the baseshrink-0(verified:cn(base, "min-w-0 shrink")dropsshrink-0).min-w-0on the title span so it can shrink below its content as a flex item inside theinline-flexbutton.
The trailing actions are already ml-auto shrink-0, so they hold their width and the title yields.
Manual QA
Built the exact class chain at a 390pt viewport and measured both variants:
| title overflow past trailing actions | ellipsized | |
|---|---|---|
| before | +89.6px | no |
| after | −32px (clears it) | yes |
- Long title ellipsizes rather than overlapping the header actions
- Short title is unaffected — no layout shift, no premature ellipsis
- Trailing actions keep their full width
Testing
bun run lintbun run typecheck(42/42 packages)
Notes
PageTitleMenu is shared, so this also fixes the desktop v2 page-pane title (PagePaneTitle), which has the same trigger in compact mode.
Not verified against a running web server — the change is layout-only and was validated by direct measurement of the rendered chain rather than a screenshot of the deployed page.
Summary by cubic
Fixes the page title in the page-viewer header so it truncates instead of running under the header actions on narrow screens. The menu trigger's Button class carries shrink-0, so the existing min-w-0 never applied; the trigger now shrinks and the title span gets min-w-0.
- Also fixes the desktop v2 page-pane title because it uses the same
PageTitleMenucomponent. - Short titles are unaffected and keep their current layout and trailing-action widths.
- Closes SUPER-2389.
Summary by CodeRabbit
- Bug Fixes
- Improved page title menu layout behavior so long titles can shrink and truncate cleanly within the menu trigger.