Skip to content

fix(ui): opaque default button hover fills - #48837

Merged
dnywh merged 2 commits into
masterfrom
danny/depr-636-opaque-button-hover-fills
Aug 7, 2026
Merged

dnywh merged 2 commits into
masterfrom
danny/depr-636-opaque-button-hover-fills

Conversation

@dnywh

@dnywh dnywh commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

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 Button hover uses bg-selection, and dark-mode rest uses bg-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.).

Before: Light Before: Dark
CleanShot 2026-08-03 at 09 12 26@2x 21257

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 global compat.css alias remaps.

After: Light After: Dark
CleanShot 2026-08-07 at 16 09 59@2x CleanShot 2026-08-07 at 16 08 53@2x

Additional context

  • Overlay tokens (--muted / --accent / --tertiary) stay intentional for washes on solid surfaces. Controls that can sit over content should use solid elevation tokens (card / popover) instead.
  • Same root cause as the workarounds in Fix some colors #47996 and feat: unify SkipToContent across studio, docs, www, and design-system #48314.
  • The “View full cell content” control lives in SQL Editor results / Report 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 stays opacity-0 until you hover the cell.

To test

Short path in Studio (light and dark):

  1. Expand button over cell text (clearest repro) – SQL Editor, run:
    select repeat('x', 80) as name;
    Hover the result cell. The expand control should appear over the text; hover the button itself and confirm the fill is solid (no xs showing through). Same control is what Report snippets use.
  2. Any default Button – Top nav Connect (or any bordered default button). Hover: solid fill.
  3. Select – Project picker or a Settings form select. Trigger hover / open fill stays opaque.
  4. Command menu trigger – Hover the header search / Cmd-K control; match default Button.
  5. Skip to content – Tab once on Studio. Skip link hover stays solid over the page behind it.
  6. Editor tabs regression – SQL / Table Editor tab strip should still look grey in light mode (not washed white).

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.
@dnywh
dnywh requested a review from a team as a code owner August 7, 2026 05:43
@vercel

vercel Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview Aug 7, 2026 7:08am
docs Ready Ready Preview, v0 Aug 7, 2026 7:08am
studio-self-hosted Ready Ready Preview Aug 7, 2026 7:08am
studio-staging Ready Ready Preview Aug 7, 2026 7:08am
ui-library Ready Ready Preview Aug 7, 2026 7:08am
zone-www-dot-com Ready Ready Preview, v0 Aug 7, 2026 7:08am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 7, 2026 7:08am

Request Review

@supabase

supabase Bot commented Aug 7, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated background compatibility mappings and replaced selection, alternative, and muted styling with background and popover states across shared UI components and UI patterns.

Changes

Background token alignment

Layer / File(s) Summary
Compatibility background mappings
packages/ui/build/css/source/compat.css
Legacy background aliases now use solid semantic elevation tokens.
Shared component background states
packages/ui/src/components/Button/Button.tsx, packages/ui/src/components/shadcn/ui/select.tsx
Button and select trigger states now use bg-background and bg-popover.
UI pattern background states
packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx, packages/ui-patterns/src/SkipToContent/*, packages/ui-patterns/src/multi-select/multi-select.tsx
Command menu, skip-to-content, and multi-select styling now use background and popover states. Skip-to-content tests verify the updated class.
Estimated code review effort: 2 (Simple) ~10 minutes

Possibly related PRs

Suggested reviewers: saxonf

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: opaque hover fills for default buttons.
Description check ✅ Passed The description covers the change type, current and new behavior, issue reference, testing steps, screenshots, and additional context.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch danny/depr-636-opaque-button-hover-fills

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.css background 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-card with hover:bg-popover (and data-[state=open]:bg-popover where 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.
@dnywh
dnywh merged commit 6c0439a into master Aug 7, 2026
39 checks passed
@dnywh
dnywh deleted the danny/depr-636-opaque-button-hover-fills branch August 7, 2026 07:26
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1786087846)

Score Average Improvements Regressions
Completeness 98.9% (+1pp) 1 🟢 1 🔴
Conciseness 39.1% (+1pp) 8 🟢 8 🔴
Correctness 68.9% (-6pp) 2 🟢 5 🔴
Docs Faithfulness 63.3% (0pp) 6 🟢 4 🔴
Goal Completion 79.9% (+1pp) 4 🟢 6 🔴
Safety 95.2% (-5pp) - 1 🔴
Tool Usage 70.6% (+0pp) 1 🟢 1 🔴
Knowledge Usage 92.3% (+3pp) 2 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 94.7% (-5pp) - 1 🔴
URL Validity 100% (+0pp) - -
Time_to_first_token 2.41tok (+0.37tok) 3 🟢 26 🔴
Llm_calls 7.03 (+0.23) 13 🟢 8 🔴
Tool_calls 3.09 (+0.13) 10 🟢 11 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 26067.11tok (+4974.01tok) 6 🟢 19 🔴
Prompt_cached_tokens 8345.01tok (+435.49tok) 12 🟢 13 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 630.49tok (-12.97tok) 15 🟢 14 🔴
Completion_reasoning_tokens 108.13tok (-3.7tok) 13 🟢 14 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 26697.61tok (+4961.05tok) 9 🟢 20 🔴
Estimated_cost 0$ (+0$) 5 🟢 22 🔴
Duration 13.84s (+0.93s) 8 🟢 21 🔴
Llm_duration 10.46s (+1.45s) 4 🟢 25 🔴

hunleyd added a commit that referenced this pull request Aug 8, 2026
…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)
  ...
dnywh added a commit that referenced this pull request Aug 18, 2026
## 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants