From 8e780471aaab58a7ffd1a536a24ff277855a17c6 Mon Sep 17 00:00:00 2001 From: Max Yinger Date: Wed, 8 Jul 2026 15:56:19 -0600 Subject: [PATCH 1/3] sticky styles for toggle when open --- .../OrganizationSwitcher/OrganizationSwitcherTrigger.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx b/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx index f410052f286..efad1c0b34e 100644 --- a/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx +++ b/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx @@ -43,6 +43,10 @@ export const OrganizationSwitcherTrigger = withAvatarShimmer( t => ({ padding: `${t.space.$1} ${t.space.$2}`, position: 'relative', + '&[aria-expanded="true"]': { + backgroundColor: 'var(--alpha)', + color: 'var(--accentHover)', + }, }), sx, ]} From b9798c1483ea3b94c25759c1e8fffcaa41c6bfc0 Mon Sep 17 00:00:00 2001 From: Max Yinger Date: Wed, 8 Jul 2026 17:25:31 -0600 Subject: [PATCH 2/3] consistent row height for create org. remove avatar flash on open --- .changeset/avatar-sync-decode.md | 5 +++++ .../OrganizationSwitcher/OtherOrganizationActions.tsx | 4 ++-- packages/ui/src/elements/Avatar.tsx | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/avatar-sync-decode.md diff --git a/.changeset/avatar-sync-decode.md b/.changeset/avatar-sync-decode.md new file mode 100644 index 00000000000..a570c7386b5 --- /dev/null +++ b/.changeset/avatar-sync-decode.md @@ -0,0 +1,5 @@ +--- +'@clerk/ui': patch +--- + +Decode avatar images synchronously so a freshly mounted avatar (e.g. when the `` popover opens) paints on its first frame instead of briefly flashing the avatar background. diff --git a/packages/ui/src/components/OrganizationSwitcher/OtherOrganizationActions.tsx b/packages/ui/src/components/OrganizationSwitcher/OtherOrganizationActions.tsx index d4f0c828f04..5d3fbd798d9 100644 --- a/packages/ui/src/components/OrganizationSwitcher/OtherOrganizationActions.tsx +++ b/packages/ui/src/components/OrganizationSwitcher/OtherOrganizationActions.tsx @@ -26,7 +26,7 @@ const CreateOrganizationButton = ({ label={localizationKeys('organizationSwitcher.action__createOrganization')} onClick={onCreateOrganizationClick} sx={t => ({ - padding: `${t.space.$5} ${t.space.$5}`, + padding: `${t.space.$4} ${t.space.$5}`, })} iconSx={t => ({ width: t.sizes.$9, @@ -34,7 +34,7 @@ const CreateOrganizationButton = ({ })} iconBoxSx={t => ({ width: t.sizes.$9, - height: t.sizes.$6, + height: t.sizes.$9, })} spinnerSize='sm' /> diff --git a/packages/ui/src/elements/Avatar.tsx b/packages/ui/src/elements/Avatar.tsx index 2560197a913..0b689d9033f 100644 --- a/packages/ui/src/elements/Avatar.tsx +++ b/packages/ui/src/elements/Avatar.tsx @@ -97,6 +97,10 @@ export const Avatar = (props: AvatarProps) => { title={title} alt={`${title}'s logo`} src={imageUrl || ''} + // Decode the (typically cached) avatar bytes before presenting so a freshly-mounted + // paints on its first frame instead of flashing the avatar background for a tick. + // Safe for avatar-sized images: decode is off-thread/sub-ms and only affects already-fetched bytes. + decoding='sync' sx={{ objectFit: 'cover', width: '100%', From 3c2c3fbf7b6c66748341ca0bb8eb8e2b9a9e1bbf Mon Sep 17 00:00:00 2001 From: Max Yinger Date: Wed, 8 Jul 2026 18:23:54 -0600 Subject: [PATCH 3/3] changeset --- .changeset/avatar-sync-decode.md | 5 ----- .changeset/org-switcher-polish.md | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 .changeset/avatar-sync-decode.md create mode 100644 .changeset/org-switcher-polish.md diff --git a/.changeset/avatar-sync-decode.md b/.changeset/avatar-sync-decode.md deleted file mode 100644 index a570c7386b5..00000000000 --- a/.changeset/avatar-sync-decode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@clerk/ui': patch ---- - -Decode avatar images synchronously so a freshly mounted avatar (e.g. when the `` popover opens) paints on its first frame instead of briefly flashing the avatar background. diff --git a/.changeset/org-switcher-polish.md b/.changeset/org-switcher-polish.md new file mode 100644 index 00000000000..417a3e92405 --- /dev/null +++ b/.changeset/org-switcher-polish.md @@ -0,0 +1,9 @@ +--- +'@clerk/ui': patch +--- + +Polish the ``: + +- Decode avatar images synchronously so a freshly mounted avatar (e.g. when the popover opens) paints on its first frame instead of briefly flashing the avatar background. +- Highlight the trigger while its popover is open. +- Align the "Create organization" action's height with the other rows for a consistent list.