Repository navigation
fix(ui): opaque default button hover fills - #48837
Conversation
Legacy selection/muted/control aliases were remapped onto translucent overlays in the color system, so default buttons punched through stacked content on hover. Point those fills at card/popover instead.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughUpdated background compatibility mappings and replaced selection, alternative, and muted styling with background and popover states across shared UI components and UI patterns. ChangesBackground token alignment
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes hover/background fills for default “bordered” controls that became translucent after the color-system migration, causing underlying content to show through on hover (notably in stacked/overlapping UI like tables, sticky columns, and skip links).
Changes:
- Remaps legacy
compat.cssbackground aliases that historically represented opaque fills (e.g. selection/muted/control/surface variants) onto solid semantic elevation tokens. - Updates default hover/fill classes for Button, Select trigger, MultiSelect trigger, and Command Menu trigger to use opaque
bg-background dark:bg-cardwithhover:bg-popover(anddata-[state=open]:bg-popoverwhere relevant). - Removes the SkipToContent wrapper “opaque plate” workaround and adjusts its component test expectations accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/components/shadcn/ui/select.tsx | Updates Select trigger base/hover/open background classes to opaque semantic tokens. |
| packages/ui/src/components/Button/Button.tsx | Updates default Button variant base/hover/open background classes to opaque semantic tokens. |
| packages/ui/build/css/source/compat.css | Remaps legacy background aliases away from translucent overlay ramps to solid elevation “twins”. |
| packages/ui-patterns/src/SkipToContent/SkipToContent.tsx | Removes wrapper backplate now that the default Button fill is opaque. |
| packages/ui-patterns/src/SkipToContent/SkipToContent.test.tsx | Updates assertions to reflect the removal of the wrapper background and new default hover fill. |
| packages/ui-patterns/src/multi-select/multi-select.tsx | Updates MultiSelect trigger base/hover/open background classes to opaque semantic tokens. |
| packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx | Updates CommandMenu trigger hover fill class (and comment) to match the new default Button hover behavior. |
Keep the hover fix on the control components only; rewriting legacy surface/muted/selection aliases had too wide a blast radius.
Braintrust eval report
|
…for-pitr-archiving-stale * origin/master: (342 commits) feat(studio): role-aware access feedback in scoped token creation (#48858) Initialize notebook editor page (#48842) test(docs): scan changed pages for WCAG 2.1 A/AA in warn mode (#48727) docs(auth): clarify audit logs storage options and configuration (#48852) feat(studio): warn that scoped tokens don't support the MCP server (#48849) feat(studio): lifecycle and role-aware scoped token view sheet (#48848) feat(www): add Open Authorization Integration Addendum (#48804) feat(studio): add legacy token mode to scoped pat creation flow (#48844) Add blog post: Supabase is now a connector on Perplexity Computer (#48776) feat(studio): enforce expiry scoped pat (#48811) fix(studio): model scoped pat permissions as OR-of-AND alternatives - smaller version (#48809) fix(ui): opaque default button hover fills (#48837) fix(ui): restore normal alert text wrapping (#48840) feat: notebook content schema (#48813) fix(ui): remove extra spacing before custom reports section (#48796) feat(marketing): add hint text below Go page form labels (#48824) Initialize notebooks store (#48801) Use white wordmark for QA.tech primary logo (#48827) fix titleless Admonition alignment (#48784) fix inconsistent product menu dividers (#48787) ...
## What kind of change does this PR introduce? Bug fix / design-system token hygiene for form and selector chrome. ## What is the current behavior? After opaque default-button fills, text fields, selects, and selector tiles drifted apart: inputs and selects mixed ad-hoc washes, hover borders bounced between `border-stronger` / `border-foreground-muted`, invalid fields had no hover step, and composites like InputGroup leaked inner hover borders. Follow-up to #48837 (opaque button fills) where Select rest still felt darker than Input on forms such as scoped access tokens. ## What is the new behavior? Named control roles and one interactive border: | Role | Fill | Rest border | Hover / focus / open | | --- | --- | --- | --- | | Field (sunk) | `bg-field` | `border-control` | `border-control-hover` | | Raised control | `bg-control-raised` | `border-strong` | `border-control-hover` | | Overlaying action | card → popover | `border-strong` | `border-control-hover` | | Invalid field | `bg-destructive-200` | `border-destructive-400` | `border-destructive` | - `--field` / `--control-raised` / `--border-control-hover` live in `semantic.css` (source of truth for roles; README points there) - Input / Textarea / InputGroup / legacy TextArea use the field ladder (incl. invalid hover) - Select and empty MultiSelect use raised; filled MultiSelect sinks to field - Default + dashed Button, CommandMenu trigger, and radio card/stacked/large use `border-control-hover` - Studio selector tiles aligned: Connect mode, role impersonation, DuckLake modes, compute “Contact us” | Before and After | | --- | | <img width="1576" height="759" alt="Access Tokens Account Supabase" src="https://github.com/user-attachments/assets/4bbe8b2b-a31a-4d63-80ba-04a1a8a5609d" /> | | <img width="1576" height="759" alt="Access Tokens Account Supabase" src="https://github.com/user-attachments/assets/92271223-4103-4cc6-a7c0-9e4ff71cce30" /> | ## Additional context `--control-raised` aliases `--card` today (role name so fill can diverge later). Rest `border-control` / `border-strong` both still map to `--input` via compat; the shared interactive step is `--border-control-hover`. ## To test 1. **[Account → Access Tokens](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/account/tokens)** Open Generate / New scoped token. Side-by-side Input, Select, RadioGroupStacked, MultiSelect. Confirm sunk vs raised fills, shared hover border, MultiSelect flips to sunk once a value is selected. Leave a required field empty to check invalid rest → hover → focus. 2. **[Org → Projects](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/org/_)** Hover the dashed Status filter. Hover default / filled filter buttons when active. Confirm hover/open borders match. 3. **[Project → Connect](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/project/_)** Open Connect from the header. Mode grid tiles: hover + selected borders match radio cards (no old muted-foreground ring). 4. **[Project → Compute](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/project/_/settings/infrastructure)** (optional) Compute size radios + “Contact us” tile hover.
What kind of change does this PR introduce?
Bug fix for translucent default Button (and related control) fills that show through stacked content on hover.
Resolves DEPR-636.
What is the current behavior?
Default
Buttonhover usesbg-selection, and dark-mode rest usesbg-muted. After the colour system migration those legacy aliases point at translucent--accent/--muted, so hover punches through whatever sits behind the button (SQL Editor / Reports cell expand, sticky columns, skip-to-content, etc.).What is the new behavior?
Default Button, Select, MultiSelect, and the CommandMenu trigger use opaque elevation tokens (
bg-background dark:bg-card,hover:bg-popover). SkipToContent drops its opaque-plate workaround. No globalcompat.cssalias remaps.Additional context
--muted/--accent/--tertiary) stay intentional for washes on solid surfaces. Controls that can sit over content should use solid elevation tokens (card/popover) instead.QueryBlock(ResultCell), not Table Editor. It only renders when the value is an object/array, contains a newline, or is longer than 60 characters, and it staysopacity-0until you hover the cell.To test
Short path in Studio (light and dark):
xs showing through). Same control is what Report snippets use.