feat(ui): formalize the Mosaic Profile surface and add a Drawer - #9652
Draft
maxyinger wants to merge 19 commits into
Draft
feat(ui): formalize the Mosaic Profile surface and add a Drawer#9652maxyinger wants to merge 19 commits into
maxyinger wants to merge 19 commits into
Conversation
Replaces the ad-hoc ProfilePage with a generic `Profile` component (Root / Nav / NavItem / PageTitle / Content / Page), adopted by the user profile as `UserProfileView` with custom pages and ordering. Renames the dialog size `panel` to `profile`, hoists the Clerk branding into a shared `Branding` component, and adds a `--cl-radius-2xl` and `--cl-shadow-card` token. Adds a styled `Drawer` (bottom sheet) on the headless primitive. Compact, the profile's navigation moves into it, opened from each page's headline. Headless fixes found along the way: `useRender` emits state attributes before other props so a CSS anchor on `[data-selected]` transitions in both directions; the drawer's drag gate no longer reads a scrolled page as inner scroll, rubber-bands upward drags at rest, mirrors its swipe vars onto the backdrop, and can no longer be left mid-gesture by a lost release. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: 5e24fef The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
`Profile.Title` replaces the `label` prop: a visually hidden heading that names the navigation, the compact sheet, and the dialog the profile opens in. The content's clip edge sits 8px inside the frame rather than 16px. Swingset: the drawer's "inside a profile" example is the real user profile, and the user profile story gains an overlay example. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Standalone and inline the frame is its border alone; the card shadow belongs to the profile dialog. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
…ull sheet 3rem short Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
# Conflicts: # packages/swingset/src/lib/registry.ts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
…dden attribute Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
…n example Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Formalizes the user page's ad-hoc sidebar/container into a generic Mosaic
Profilesurface, shared by the user profile and, later, the organization profile and their merge. Direction check-in, not review-ready.Profile(components/profile/):Root / Nav / NavItem / PageTitle / Content / Page. Compositional internally;UserProfileViewis the prop-driven shell on top (activePage,pages,customPages,pageOrder,onPageChange), with the derivation inuser-profile.layout.ts. Fixed height standalone and inline (45rem), full-screen on a phone, filled by the popup in a modal. The dialog sizepanelis renamedprofile, withcardparity: the popup positions, the surface paints.Compact navigation: below
48remof its own width the tablist leaves the column for a bottom sheet.Profile.PageTitle(the h3 every page renders) becomes the trigger —<h3><button>Account ⌄</button></h3>— with the caretvertical-align: middle, so it centres on the x-height. Width is measured on the root rather than queried, since where the one tablist renders is a DOM decision.Drawer(components/drawer/): the first styled consumer of the headless drawer. Prompt's surface, flush sides and bottom,--cl-radius-2xltop corners, grip, bottom bleed for the rubber band, motion composed from the headless vars, nested scrim inside a modal dialog.Also:
Brandinghoisted out ofCardand shared;--cl-shadow-cardtoken consumed by Card and the profile frame; ids areapiKeys; custom-page types moved touser-profile.types.ts.Headless fixes:
useRenderemits state attributes before other props. Chrome flushes style on atabindexwrite to the focused element, anddata-selectedlanding after it left a CSS anchor with nothing to anchor to for one recalc, so a[data-selected]-anchored mark only transitioned in one direction.windowends the gesture, and closing resets it.Swingset:
ProfileandDrawerpages (with aCustomizedexample of CSS-only anchor-positioned selected/hover marks),user-pagerenameduser-profile.Austin's #9508 organization rough-in will be rebuilt on
Profilerather than rebased.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code
https://claude.ai/code/session_01UNzajPkZEavBH31fpxG7sx