Repository navigation
fix(ui): systematise control surface fills and hover borders - #48887
Conversation
Introduce named field / control-raised fills and a shared control-hover border so sunk inputs, raised selects, and overlaying buttons share one chrome ladder (including invalid hover and selector tiles).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR adds semantic tokens for fields, raised controls, and hover borders. Shared UI components, UI patterns, and Studio controls now use these tokens for hover, focus, selected, open, and invalid states. ChangesSemantic control styling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ui/src/components/shadcn/ui/radio-group.tsx`:
- Around line 59-60: Update the RadioGroupLargeItem styling classes to include
focus-visible:border-control-hover alongside the existing hover and checked
border classes, preserving the radio cards/stacked/large contract for hover,
focus, and checked states.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8fe6ca52-d963-4b76-8ffc-1ba38c5f7b06
📒 Files selected for processing (20)
apps/studio/components/interfaces/ConnectSheet/ConnectModeButton.tsxapps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DuckLake/Fields.tsxapps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsxapps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationRadio.tsxpackages/config/css/theme.csspackages/ui-patterns/src/CommandMenu/api/CommandMenu.tsxpackages/ui-patterns/src/FilterBar/FilterCondition.tsxpackages/ui-patterns/src/FilterBar/FilterGroup.tsxpackages/ui-patterns/src/multi-select/multi-select.tsxpackages/ui/README.mdpackages/ui/build/css/source/semantic.csspackages/ui/src/components/Button/Button.tsxpackages/ui/src/components/radio-group-card.tsxpackages/ui/src/components/radio-group-stacked.tsxpackages/ui/src/components/shadcn/ui/input-group.tsxpackages/ui/src/components/shadcn/ui/input.tsxpackages/ui/src/components/shadcn/ui/radio-group.tsxpackages/ui/src/components/shadcn/ui/select.tsxpackages/ui/src/components/shadcn/ui/text-area.tsxpackages/ui/src/components/shadcn/ui/textarea.tsx
🎭 Playwright Test Results (next)Details
Flaky testsFeatures › wrappers.spec.ts › Stripe › can create a stripe wrapper with tables Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
🎭 Playwright Test Results (next)Details
Flaky testsFeatures › wrappers.spec.ts › Stripe › can create a stripe wrapper with tables Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
There was a problem hiding this comment.
Pull request overview
This PR standardizes “control surface” styling across the design system by introducing explicit semantic roles (field well vs raised control) and a single shared interactive border token, then applying those tokens across core inputs/selectors and key Studio selector tiles.
Changes:
- Adds new semantic tokens for control fills and interactive borders (
--field,--control-raised,--border-control-hover) and exposes them through theme variables. - Updates shadcn/ui form controls (Input/Textarea/Select/InputGroup) plus Button + radio card variants to use consistent rest/hover/focus/invalid chrome.
- Aligns ui-patterns + Studio selector-like components (MultiSelect trigger, FilterBar inputs, CommandMenu trigger, various selector tiles) to the shared hover border behavior.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/components/shadcn/ui/textarea.tsx | Moves Textarea to field fill + shared hover/focus border; adds invalid hover/focus ladder. |
| packages/ui/src/components/shadcn/ui/text-area.tsx | Keeps legacy TextArea visually aligned with shadcn Textarea role tokens. |
| packages/ui/src/components/shadcn/ui/select.tsx | Switches Select trigger to raised control fill and shared hover/open border. |
| packages/ui/src/components/shadcn/ui/radio-group.tsx | Aligns large radio item hover/checked borders to shared control-hover token. |
| packages/ui/src/components/shadcn/ui/input.tsx | Updates Input to field fill + shared hover/focus border and invalid hover state. |
| packages/ui/src/components/shadcn/ui/input-group.tsx | Makes InputGroup shell own hover/focus/invalid chrome; suppresses inner control borders. |
| packages/ui/src/components/radio-group-stacked.tsx | Uses shared control-hover border for hover/focus/checked states. |
| packages/ui/src/components/radio-group-card.tsx | Uses shared control-hover border for hover/checked states. |
| packages/ui/src/components/Button/Button.tsx | Unifies default + dashed Button hover/open border to control-hover token. |
| packages/ui/README.md | Documents control surface role tokens and points to semantic.css as source of truth. |
| packages/ui/build/css/source/semantic.css | Defines --field, --control-raised, and --border-control-hover formulas. |
| packages/ui-patterns/src/multi-select/multi-select.tsx | Makes MultiSelect trigger raised when empty and field when filled; uses shared hover/open border. |
| packages/ui-patterns/src/FilterBar/FilterGroup.tsx | Prevents nested FilterBar inputs from introducing their own hover/focus borders. |
| packages/ui-patterns/src/FilterBar/FilterCondition.tsx | Prevents nested FilterBar inputs from introducing their own hover/focus borders. |
| packages/ui-patterns/src/CommandMenu/api/CommandMenu.tsx | Updates CommandMenu trigger to shared control-hover border on hover. |
| packages/config/css/theme.css | Exposes new semantic fill + border tokens through config theme variables. |
| apps/studio/components/interfaces/RoleImpersonationSelector/RoleImpersonationRadio.tsx | Aligns tile hover/selected border with shared control-hover border token. |
| apps/studio/components/interfaces/DiskManagement/fields/ComputeSizeField.tsx | Aligns “Contact us” tile hover border to shared control-hover token. |
| apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DuckLake/Fields.tsx | Aligns DuckLake mode selector hover/selected border to shared control-hover token. |
| apps/studio/components/interfaces/ConnectSheet/ConnectModeButton.tsx | Aligns Connect mode tile hover/selected border to shared control-hover token. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Solid e1-from-page fills sat between canvas and Sheet (popover e2) and vanished on light near the white ceiling. Black/white alpha keeps wells and plates relative to the local surface.
Match historic light-mode field depth (~2.6% black) and ease the raised lift so sunk vs chooser stays clear without stark wells.
## Problem - Grouped textareas render text too close to the top border. The standalone `Textarea` retains its normal top padding. - `InputGroupTextarea` has overridden the inner textarea with `py-0` since #44282 on 31 March 2026. The group initially supplied `py-2`; #44387 removed that outer padding later the same day, leaving no top spacing. The override was retained during the border and surface updates in #44690 and #48887. - The textarea component page had no grouped textarea example, so this difference was easy to miss. ## Solution - Give the grouped textarea `pt-2` while retaining `pb-0` for block-end addons. The outer group continues to own its border and focus styles. - Add a “With addon” example to the textarea component page to keep this composition visible. ## Review instructions - Open `/design-system/docs/components/textarea` and find “With addon”. Confirm its text has the same top inset as the default textarea and the block-end addon remains below the input. - Open `/design-system/docs/ui-patterns/forms` and find “Textarea Multi-line text input for longer content with addon”. Confirm the text has the same top inset as the standalone textarea example immediately above it. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a textarea example with a supporting addon below the text field, showing a 120-character limit. * **Bug Fixes** * Clicking a block-end addon now focuses its textarea as well as an input. * **Documentation** * Added the textarea-with-addon example to the textarea component documentation. * **Style** * Added top padding to textareas within input groups while keeping bottom padding unchanged, adjusting spacing above entered text. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Problem - Grouped textareas render text too close to the top border. The standalone `Textarea` retains its normal top padding. - `InputGroupTextarea` has overridden the inner textarea with `py-0` since #44282 on 31 March 2026. The group initially supplied `py-2`; #44387 removed that outer padding later the same day, leaving no top spacing. The override was retained during the border and surface updates in #44690 and #48887. - The textarea component page had no grouped textarea example, so this difference was easy to miss. ## Solution - Give the grouped textarea `pt-2` while retaining `pb-0` for block-end addons. The outer group continues to own its border and focus styles. - Add a “With addon” example to the textarea component page to keep this composition visible. ## Review instructions - Open `/design-system/docs/components/textarea` and find “With addon”. Confirm its text has the same top inset as the default textarea and the block-end addon remains below the input. - Open `/design-system/docs/ui-patterns/forms` and find “Textarea Multi-line text input for longer content with addon”. Confirm the text has the same top inset as the standalone textarea example immediately above it. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a textarea example with a supporting addon below the text field, showing a 120-character limit. * **Bug Fixes** * Clicking a block-end addon now focuses its textarea as well as an input. * **Documentation** * Added the textarea-with-addon example to the textarea component documentation. * **Style** * Added top padding to textareas within input groups while keeping bottom padding unchanged, adjusting spacing above entered text. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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:
bg-fieldborder-controlborder-control-hoverbg-control-raisedborder-strongborder-control-hoverborder-strongborder-control-hoverbg-destructive-200border-destructive-400border-destructive--field/--control-raised/--border-control-hoverlive insemantic.css(source of truth for roles; README points there)border-control-hoverAdditional context
--control-raisedaliases--cardtoday (role name so fill can diverge later). Restborder-control/border-strongboth still map to--inputvia compat; the shared interactive step is--border-control-hover.To test
Account → Access 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.
Org → Projects
Hover the dashed Status filter. Hover default / filled filter buttons when active. Confirm hover/open borders match.
Project → Connect
Open Connect from the header. Mode grid tiles: hover + selected borders match radio cards (no old muted-foreground ring).
Project → Compute (optional)
Compute size radios + “Contact us” tile hover.