fix(TabList): light underline on tab hover instead of ghost pill#3713
fix(TabList): light underline on tab hover instead of ghost pill#3713kentonquatman wants to merge 1 commit into
Conversation
Hovering an unselected Tab or TabMenu trigger now reveals a light bottom-bar underline — a muted version of the selected-tab indicator — rather than the filled ghost-button pill background. Reverts the hover treatment introduced in #1357 while keeping the primary selected colors and layout fill added there. Fixes #2768
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
|
This would introduce a new state visual which I think should require a really really strong reason to add new state visuals. Im trying to capture design conventions here: https://github.com/facebook/astryx/wiki/Design-Conventions#state-representations. And hover states have one visual and I want to avoid a situation like selection states where we have fragmented to 5 styles. |
What
Fixes #2768 — hovering an unselected tab rendered a filled ghost-button pill instead of the bottom-bar underline that matches the selected-tab indicator.
This reverts the pill styling introduced in #1357. This restores a light underline on hover — a muted version of what selected tabs show — for both
TabandTabMenu.Changes
TabhoverBgpill element (--color-overlay-hoverfill +--radius-element) and itshoverSizeStyles.indicatorUnselectednow paints the selected accent color (--color-accent) atopacity: 0.4, revealed on hover under@media (hover: hover)via the scopedtabScopeancestor selector. Default (non-hover) stays atopacity: 0.TabMenuhoverBgpill element andhoverSizeStyles.indicatorUnselectedstyle (--color-icon-primaryatopacity: 0.4on hover) to match the trigger's selected indicator.Tests
TabList.test.tsxspan-count assertions (tab children dropped from 3 → 2 with the pill element removed).Why not a raw revert of #1357
The
XDSTab/XDSTabMenufiles were renamed toTab/TabMenuand later commits (e.g. #2435, which switched the selected indicator to--color-accent) landed on top, so #1357 no longer reverts cleanly. This reconstructs the pre-#1357 hover affordance while preserving the primary selected colors andlayout="fill"support that #1357 also added. The hover color is intentionally the selected indicator color at reduced opacity — a true "light version of the selected underline" — rather than the old neutral--color-bordergray.Validation
pnpm -F @astryxdesign/core typecheck✅eslint src/TabList✅pnpm -F @astryxdesign/core build✅ (StyleX compiles; hover-revealopacity:.4rule present inastryx.css)