Skip to content

feat(mosaic): Compose profile sub-pages and footer with Panel parts - #11077

Open
alexcarpenter wants to merge 3 commits into
ds.feat/mosaic-access-profilefrom
carp/mosaic-profile-subpage-composition
Open

alexcarpenter wants to merge 3 commits into
ds.feat/mosaic-access-profilefrom
carp/mosaic-profile-subpage-composition

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Description

Stacked on #11073. Replaces Profile.Footer and Profile.SubPage with Panel parts, so a page owns its scrolling body, pinned footer and sub-pages, and the same panel works outside a Profile.

<Profile.ContentPanel value='security'>
  <Panel.Steps value={subPage ?? 'page'}>
    <Panel.Step ids={['page']}>
      <Panel.Root>
        <Panel.Body>
          <Panel.Title>Security</Panel.Title>
          …
        </Panel.Body>
      </Panel.Root>
    </Panel.Step>
    <Panel.Step ids={['passkeys']}>
      <Panel.Root back={{ label: 'Security', onClick: () => setSubPage(null) }}>
        <Panel.Body>…</Panel.Body>
        <Panel.Footer>…</Panel.Footer>
      </Panel.Root>
    </Panel.Step>
  </Panel.Steps>
</Profile.ContentPanel>
  • Panel.Body holds the title and content. Inside a Profile.ContentPanel it is the scrolling viewport, and a dev warning fires when a profile panel has none.
  • Panel.Footer renders after the body. Inside a profile it stays pinned below the scrolling body, without position: sticky or a portal. In a flush profile outside a dialog, the body grows with its content, the page scrolls, and the footer sits after the content.
  • Panel.Steps / Panel.Step wrap the headless Flow primitive. Steps swap in place with no transition, and focus moves to the open step's title, both inside and outside a profile. direction and Flow's data-starting-style / data-ending-style hooks stay available for a caller-added transition.
  • back on Panel.Root puts the back button above the title.
  • Profile.ContentPanel loses label, subPage, onSubPageChange and subPageDirection. It now provides the host context that Panel reads.
  • Every feature panel view wraps its content in Panel.Body. Swingset's Panel page gains Sub-pages and Footer examples, the Profile stories use the new parts, a FooterFlush story shows the flush layout, and the stale Profile.Footer / Profile.SubPage docs and changeset are removed.

Not in this PR: :subPage? URL segment in useProfilePagesController, and docs/views.md guidance.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Dec 2, 2026 1:15am UTC
swingset Ready Ready Preview Dec 2, 2026 1:15am UTC
1 Skipped Deployment
Project Deployment Actions Updated
mosaic-docs Ignored Ignored Preview Dec 2, 2026 1:15am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@changeset-bot

changeset-bot Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fe09d55

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/mosaic Minor
@clerk/mosaic-docs Patch
@clerk/swingset Patch

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

@blacksmith-sh

blacksmith-sh Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Matches Profile sub-page footer stays pinned while body scrolls

Tested on 27fb3127 — Body scrolled 0 to 360px while the static footer stayed at y=841; Simulate saving disabled Back to Security; Edit policy was replaced by Directory sync at full opacity with no overlapping step, and back focused Edit policy.

Recording

Watch full video · Original footage · 0:00 Scroll the sub-page body · 0:01 Lock the back button · 0:05 Nested sub-page swaps in place

Also checked · 7 match

Matches Panel.Steps opens and closes a sub-page outside a Profile
Matches Panel.Footer renders after the body outside a Profile
Matches Profile sub-page moves focus to the open title
Matches Dev warning when a profile panel has no Panel.Body
Matches Feature profile panels still render after wrapping in Panel.Body
Matches Flush profile footer sits after the body in page flow
Matches Caller-added step transition keeps the leaving step

Proof on fe09d555 (from 61ef48d7) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

Panel.Steps and Panel.Step use the headless Flow primitive, so steps swap in place in both card and flush profiles. direction and the transition data attributes stay available for a caller-added transition. Adds a FooterFlush profile story.

This branch was successfully deployed

2 active deployments
Preview – swingset — fe09d555 Deployed Dec 2, 2026 by vercel[bot]
Preview – clerk-js-sandbox — fe09d555 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant