From 14fe0c0cc88eed16e97aecf31907c96e54891482 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Mon, 17 Aug 2026 17:28:22 +1000 Subject: [PATCH] fix(studio): slightly round split-button corners on focus (#49129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What kind of change does this PR introduce? UI polish for split buttons (primary action + dropdown chevron). Follow-up to #49055. ## What is the current behavior? The focus ring sits above the neighbouring half, but the inner edge stays square, so the ring has two sharp corners at the join. ## What is the new behavior? On keyboard focus, the squared-off edge uses a slight radius so the ring matches the outer corners more closely. Resting state is unchanged. Split-button callsites now share the same join classes as the design-system example. | Before | After | | --- | --- | | 43471 | CleanShot 2026-08-17 at 10 45
09@2x | ## To test Tab to each half (labelled button, then chevron). Inner corners of the focus ring should be slightly rounded, not square. 1. [Split with dropdown](https://design-system-git-fix-split-button-focus-radius-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) (no login) 2. [Access Tokens](https://studio-staging-git-fix-split-button-focus-radius-supabase.vercel.app/dashboard/account/tokens) → Generate new token 3. Any project on [studio staging](https://studio-staging-git-fix-split-button-focus-radius-supabase.vercel.app/dashboard/_/settings/general) → Settings → General → Restart project ## Summary by CodeRabbit - **Accessibility** - Added accessible labels to dropdown and export controls. - Improved keyboard-focus visibility, layering, and rounded edge treatment across joined buttons and menus. - Removed misleading or redundant screen-reader text and titles. - **Bug Fixes** - Prevented split-button controls from shrinking or displaying awkward borders and corners. - Refined hover and focus behavior for action buttons throughout settings, database, storage, account, and documentation interfaces. - **Documentation** - Clarified guidance for using overflow menus and responsive split-button actions. --- apps/design-system/content/docs/components/button.mdx | 9 +++++---- .../registry/default/example/admonition-button-split.tsx | 4 ++-- .../registry/default/example/button-split-dropdown.tsx | 8 ++++++-- .../AccessTokens/Classic/ExperimentalTokenDropdown.tsx | 2 +- .../Account/AccessTokens/Classic/NewTokenButton.tsx | 2 +- .../Account/AccessTokens/Scoped/NewScopedTokenSheet.tsx | 5 ++++- .../CustomEmailTemplateRestrictionAdmonition.tsx | 4 ++-- .../ReplicationPipelineStatus.tsx | 5 +++-- .../interfaces/Database/Schemas/SchemaGraph.tsx | 9 ++++----- .../interfaces/LogDrains/OrgAuditLogDrains.tsx | 6 +++--- .../QueryInsights/hooks/useQueryInsightsTableColumns.tsx | 5 +++-- .../General/Infrastructure/RestartServerButton.tsx | 4 ++-- .../CreateTable/CreateTableInstructionsDialog.tsx | 6 ++++-- apps/studio/components/ui/AiAssistantDropdown.tsx | 4 ++-- apps/studio/pages/project/[ref]/settings/log-drains.tsx | 6 +++--- .../components/Changelog/ChangelogLlmMarkdownButton.tsx | 4 ++-- .../src/form/KeyValueFieldArray/KeyValueFieldArray.tsx | 8 ++++++-- 17 files changed, 53 insertions(+), 38 deletions(-) diff --git a/apps/design-system/content/docs/components/button.mdx b/apps/design-system/content/docs/components/button.mdx index b1369d8174a..fc7c1575839 100644 --- a/apps/design-system/content/docs/components/button.mdx +++ b/apps/design-system/content/docs/components/button.mdx @@ -125,17 +125,18 @@ Supports slot behavior with `asChild` prop. Pair a button with a chevron `DropdownMenu` trigger when there are variations of the same action, or alternative ways to accomplish the same goal. The default or most likely option should be used on the exposed button. -When secondary actions are related but distinct—not alternatives to the primary action—display the primary action as a button and place the rest in an overflow menu instead. See [Table multiple actions](./table#multiple-actions). +When secondary actions are related but distinct (not alternatives to the primary action) display the primary action as a button and place the rest in an overflow menu instead. See [Table multiple actions](./table#multiple-actions). -The shared middle border is the tricky part. Do **not** use `border-l-0` on the chevron button — that drops the divider on hover/focus. Instead: +Ensure the middle border is shared rather than doubled-up. Do not use `border-l-0` on the chevron button as that drops the divider on hover/focus. Instead: -- Primary: `rounded-r-none` and `hover:z-10` so its border stacks above the chevron on hover. +- Primary action: `rounded-r-none` and `hover:z-10` so its border stacks above the chevron on hover. - Chevron trigger: `rounded-l-none`, `shrink-0`, `px-[4px] py-[5px]`, and `-ml-px` to overlap the adjacent border by one pixel. +- Both: `focus-visible:z-10` so the focus ring stacks above the neighbour, and `focus-visible:rounded-r-sm` / `focus-visible:rounded-l-sm` so the squared-off edge is slightly rounded while the ring is shown. - Chevron trigger only: `aria-label` describing the menu (the icon is decorative). -Inside [Admonition](../fragments/admonition#split-button-with-dropdown) actions, also use `flex w-full @lg:w-auto` with `flex-1 @lg:flex-none` on the primary when `layout="responsive"`. +Inside [Admonition](../fragments/admonition#split-button-with-dropdown) actions when `layout="responsive"`: also use `flex w-full @lg:w-auto` with `flex-1 @lg:flex-none` on the primary action. ## Accessibility diff --git a/apps/design-system/registry/default/example/admonition-button-split.tsx b/apps/design-system/registry/default/example/admonition-button-split.tsx index edd0ef32a74..0300ac430f7 100644 --- a/apps/design-system/registry/default/example/admonition-button-split.tsx +++ b/apps/design-system/registry/default/example/admonition-button-split.tsx @@ -20,7 +20,7 @@ export default function AdmonitionButtonSplitDemo() { @@ -30,7 +30,7 @@ export default function AdmonitionButtonSplitDemo() { type="button" variant="default" aria-label="More email template editing options" - className="shrink-0 rounded-l-none px-[4px] py-[5px] -ml-px" + className="shrink-0 rounded-l-none px-[4px] py-[5px] -ml-px focus-visible:z-10 focus-visible:rounded-l-sm" icon={} /> diff --git a/apps/design-system/registry/default/example/button-split-dropdown.tsx b/apps/design-system/registry/default/example/button-split-dropdown.tsx index 885e1bbebaa..54a1c621c72 100644 --- a/apps/design-system/registry/default/example/button-split-dropdown.tsx +++ b/apps/design-system/registry/default/example/button-split-dropdown.tsx @@ -11,7 +11,11 @@ import { export default function ButtonSplitDropdownDemo() { return (
- @@ -20,7 +24,7 @@ export default function ButtonSplitDropdownDemo() { type="button" variant="default" aria-label="More actions" - className="shrink-0 rounded-l-none px-[4px] py-[5px] -ml-px" + className="shrink-0 rounded-l-none px-[4px] py-[5px] -ml-px focus-visible:z-10 focus-visible:rounded-l-sm" icon={} /> diff --git a/apps/studio/components/interfaces/Account/AccessTokens/Classic/ExperimentalTokenDropdown.tsx b/apps/studio/components/interfaces/Account/AccessTokens/Classic/ExperimentalTokenDropdown.tsx index 04452562840..db886aad67d 100644 --- a/apps/studio/components/interfaces/Account/AccessTokens/Classic/ExperimentalTokenDropdown.tsx +++ b/apps/studio/components/interfaces/Account/AccessTokens/Classic/ExperimentalTokenDropdown.tsx @@ -35,7 +35,7 @@ export const ExperimentalTokenDropdown = ({ onCreateToken }: ExperimentalTokenDr diff --git a/apps/studio/components/interfaces/Auth/EmailTemplates/CustomEmailTemplateRestrictionAdmonition.tsx b/apps/studio/components/interfaces/Auth/EmailTemplates/CustomEmailTemplateRestrictionAdmonition.tsx index 23c6ba82701..f6322debb67 100644 --- a/apps/studio/components/interfaces/Auth/EmailTemplates/CustomEmailTemplateRestrictionAdmonition.tsx +++ b/apps/studio/components/interfaces/Auth/EmailTemplates/CustomEmailTemplateRestrictionAdmonition.tsx @@ -28,7 +28,7 @@ export const CustomEmailTemplateRestrictionAdmonition = () => { @@ -37,7 +37,7 @@ export const CustomEmailTemplateRestrictionAdmonition = () => { + /> Add destination @@ -166,8 +166,8 @@ export function OrgAuditLogDrains() { @@ -224,8 +224,8 @@ const LogDrainsSettings: NextPageWithLayout = () => { @@ -201,7 +205,7 @@ export const KeyValueFieldArray = < icon={} aria-label={addActionsLabel} disabled={disabled} - className="rounded-l-none px-[4px] py-[5px]" + className="shrink-0 rounded-l-none px-[4px] py-[5px] -ml-px focus-visible:z-10 focus-visible:rounded-l-sm" />