Skip to content

refactor(ui): rename Settings to Section - #9428

Merged
alexcarpenter merged 1 commit into
mainfrom
austin/rename-settings-to-section
Aug 13, 2026
Merged

refactor(ui): rename Settings to Section#9428
alexcarpenter merged 1 commit into
mainfrom
austin/rename-settings-to-section

Conversation

@austincalvelage

Copy link
Copy Markdown
Member

Description

Renames the Mosaic Settings compound component to Section so the API describes its broader use across product sections. This updates the component and prop exports, file paths, theme selectors, CSS variables, Swingset registry, stories, and documentation while preserving the existing rendering, accessibility, and layout behavior.

Consumers should compose the component with Section.Root, Section.Group, Section.Row, Section.Item, and the remaining Section.* parts.

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:

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbd62f4

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

This PR includes changesets to release 0 packages

When 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

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 13, 2026 3:00am
swingset Ready Ready Preview Aug 13, 2026 3:00am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9428

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9428

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9428

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9428

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9428

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9428

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9428

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9428

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9428

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9428

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9428

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9428

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9428

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9428

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9428

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9428

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9428

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9428

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9428

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9428

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9428

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9428

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9428

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9428

commit: cbd62f4

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-13T03:21:19.451Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on cbd62f4.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4df0f86d-cf17-48cf-b216-060d6f2caaf4

📥 Commits

Reviewing files that changed from the base of the PR and between cbd62f4 and b41da6d.

📒 Files selected for processing (3)
  • packages/swingset/src/stories/section.mdx
  • packages/swingset/src/stories/section.stories.tsx
  • packages/ui/src/mosaic/components/section/section.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/cli (auto-detected)
  • clerk/clerk-android (auto-detected)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/swingset/src/stories/section.mdx
  • packages/swingset/src/stories/section.stories.tsx
  • packages/ui/src/mosaic/components/section/section.tsx

📝 Walkthrough

Walkthrough

The PR renames the Mosaic Settings compound component to Section. It updates public types, markers, contexts, theme keys, exports, tests, reset coverage, stories, documentation, registry entries, and the documentation viewer. It also adds an empty changeset file.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🟡 Moderate · up to b41da

This rename removes the existing public Settings API and its customization contracts, which can break current consumers, while the release metadata does not provide migration guidance. The PR should not merge until compatibility or a clear migration and release path is addressed.

Possibly related PRs

  • clerk/javascript#9377: Introduced the Settings component and related implementation, exports, tests, stories, and documentation that this PR renames to Section.

Suggested reviewers: alexcarpenter

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: renaming the Settings component to Section.
Description check ✅ Passed The description accurately covers the component rename, API updates, registry changes, documentation, and preserved behavior.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/ui/src/mosaic/components/section/section.tsx (1)

156-365: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve the Settings compatibility contract.

This rename removes public Settings exports, theme selectors, and CSS variables. Existing framework SDKs can still import Settings or configure cl-settings-* and --cl-settings-*. A non-major @clerk/ui update would then cause type or module-resolution failures and lose consumer theme overrides.

  • packages/ui/src/mosaic/components/section/section.tsx#L156-L365: Keep deprecated Settings aliases and map legacy theme selectors to the Section implementation.
  • packages/ui/src/mosaic/components/section/section.vars.stylex.ts#L5-L8: Keep legacy Settings variable aliases for existing appearance configuration.
  • packages/ui/src/mosaic/components/section/index.ts#L1-L15: Preserve the legacy component entry point and deprecated type exports.
  • packages/ui/src/mosaic/styles/index.ts#L51-L65: Continue exporting deprecated Settings symbols from the styles public API.

As per coding guidelines, “Maintain backward compatibility in packages/clerk-js and packages/ui with SDK versions already in the wild.”

🤖 Prompt for 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.

In `@packages/ui/src/mosaic/components/section/section.tsx` around lines 156 -
365, Preserve the deprecated Settings compatibility surface: in
packages/ui/src/mosaic/components/section/section.tsx#L156-L365, retain Settings
aliases and map legacy theme selectors to Section; in
packages/ui/src/mosaic/components/section/section.vars.stylex.ts#L5-L8, retain
legacy Settings variable aliases; in
packages/ui/src/mosaic/components/section/index.ts#L1-L15, preserve the legacy
entry point and deprecated type exports; and in
packages/ui/src/mosaic/styles/index.ts#L51-L65, continue exporting deprecated
Settings symbols.

Source: Coding guidelines

🤖 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 @.changeset/section-component.md:
- Around line 1-2: Add the required changeset metadata in the frontmatter of
section-component.md for the `@clerk/ui` package, including its release level and
a summary covering the Section public API/module-path changes and the Settings
compatibility plan; do not leave the changeset empty.

In `@packages/swingset/src/stories/section.mdx`:
- Around line 7-35: Reorganize the Section documentation page to use the
required compound-component section order: Example, Usage, Parts, then Styling.
Add the missing Example, Parts, and Styling sections around the existing Usage
content, using the page’s established documentation structure.
- Line 29: Update the Section.Media documentation in the Section story to list
the supported sm, md, and lg sizes, preserving the existing descriptions and
wording for md and lg.

---

Outside diff comments:
In `@packages/ui/src/mosaic/components/section/section.tsx`:
- Around line 156-365: Preserve the deprecated Settings compatibility surface:
in packages/ui/src/mosaic/components/section/section.tsx#L156-L365, retain
Settings aliases and map legacy theme selectors to Section; in
packages/ui/src/mosaic/components/section/section.vars.stylex.ts#L5-L8, retain
legacy Settings variable aliases; in
packages/ui/src/mosaic/components/section/index.ts#L1-L15, preserve the legacy
entry point and deprecated type exports; and in
packages/ui/src/mosaic/styles/index.ts#L51-L65, continue exporting deprecated
Settings symbols.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a968b3b-c1d7-4b25-898a-521cb03d464c

📥 Commits

Reviewing files that changed from the base of the PR and between 3349410 and 9fd9cbf.

📒 Files selected for processing (18)
  • .changeset/section-component.md
  • packages/swingset/src/components/DocsViewer.tsx
  • packages/swingset/src/lib/registry.ts
  • packages/swingset/src/stories/section.mdx
  • packages/swingset/src/stories/section.stories.tsx
  • packages/swingset/src/stories/settings.mdx
  • packages/swingset/src/stories/settings.stories.tsx
  • packages/ui/src/mosaic/components/reset.test.tsx
  • packages/ui/src/mosaic/components/section/index.ts
  • packages/ui/src/mosaic/components/section/section.markers.stylex.ts
  • packages/ui/src/mosaic/components/section/section.test.tsx
  • packages/ui/src/mosaic/components/section/section.tsx
  • packages/ui/src/mosaic/components/section/section.vars.stylex.ts
  • packages/ui/src/mosaic/components/settings/index.ts
  • packages/ui/src/mosaic/components/settings/settings.markers.stylex.ts
  • packages/ui/src/mosaic/components/settings/settings.test.tsx
  • packages/ui/src/mosaic/components/settings/settings.vars.stylex.ts
  • packages/ui/src/mosaic/styles/index.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/cli (auto-detected)
  • clerk/clerk-android (auto-detected)
💤 Files with no reviewable changes (6)
  • packages/ui/src/mosaic/components/settings/index.ts
  • packages/ui/src/mosaic/components/settings/settings.markers.stylex.ts
  • packages/swingset/src/stories/settings.mdx
  • packages/ui/src/mosaic/components/settings/settings.vars.stylex.ts
  • packages/ui/src/mosaic/components/settings/settings.test.tsx
  • packages/swingset/src/stories/settings.stories.tsx

Comment on lines +1 to +2
---
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a release changeset for @clerk/ui.

This cohort changes the @clerk/ui public API and module paths. An empty changeset omits the required release and migration information. Add an @clerk/ui entry that describes Section and the Settings compatibility plan.

As per coding guidelines, “Use Changesets for version management and changelogs.” Based on learnings, empty changesets are acceptable for documentation-only or non-published changes.

🤖 Prompt for 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.

In @.changeset/section-component.md around lines 1 - 2, Add the required
changeset metadata in the frontmatter of section-component.md for the `@clerk/ui`
package, including its release level and a summary covering the Section public
API/module-path changes and the Settings compatibility plan; do not leave the
changeset empty.

Sources: Coding guidelines, Learnings

Comment on lines +7 to +35
## Usage

```tsx
import { Section } from '@clerk/ui/mosaic/components/section';

<Section.Root>
<Section.Title>Account</Section.Title>
<Section.Group>
<Section.Row>
<Section.Item>
<Section.Media>{icon}</Section.Media>
<Section.Content>
<Section.Label>Name</Section.Label>
<Section.Description>Shown throughout the application.</Section.Description>
</Section.Content>
<Section.Actions>{control}</Section.Actions>
</Section.Item>
</Section.Row>
</Section.Group>
</Section.Root>
```

`Section.Group` owns the outlined surface. Its direct `Section.Row` children own separation and may stack one or more `Section.Item` entries. Each item lays out optional media, flexible content, and trailing actions. `Section.Media` accepts `md` and `lg` sizes.

Use `Section.Items` for a nested value list beneath a row's header item. The row keeps an 8px header-to-list gap, nested items stack without gaps at a 44px minimum height, and their content receives 12px vertical padding.

Override `--cl-section-items-gap` on `Section.Root` or a specific `Section.Row` to customize the space between the row header and its nested value list. It defaults to 8px.

## Examples

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the required compound-component page structure.

Section is a compound component. This page uses Usage and Examples, but it lacks Example, Parts, and Styling. Use the required order: Example, Usage, Parts, then Styling.

As per path instructions, “Compound Components pages must use the exact section order: Example, Usage, Parts, then Styling.”

🤖 Prompt for 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.

In `@packages/swingset/src/stories/section.mdx` around lines 7 - 35, Reorganize
the Section documentation page to use the required compound-component section
order: Example, Usage, Parts, then Styling. Add the missing Example, Parts, and
Styling sections around the existing Usage content, using the page’s established
documentation structure.

Source: Path instructions

Comment thread packages/swingset/src/stories/section.mdx
@austincalvelage
austincalvelage force-pushed the austin/rename-settings-to-section branch from cbd62f4 to b41da6d Compare August 13, 2026 02:57
@austincalvelage
austincalvelage force-pushed the austin/rename-settings-to-section branch from b41da6d to cbd62f4 Compare August 13, 2026 03:15
@alexcarpenter
alexcarpenter merged commit 935d98c into main Aug 13, 2026
91 checks passed
@alexcarpenter
alexcarpenter deleted the austin/rename-settings-to-section branch August 13, 2026 11:54
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.

3 participants