Skip to content

chore(ui): Add ProfileCard.Page for UserProfile and OrganizationProfile#8602

Merged
LauraBeatris merged 3 commits into
mainfrom
laura/org-profile-padding-changes-1
May 20, 2026
Merged

chore(ui): Add ProfileCard.Page for UserProfile and OrganizationProfile#8602
LauraBeatris merged 3 commits into
mainfrom
laura/org-profile-padding-changes-1

Conversation

@LauraBeatris
Copy link
Copy Markdown
Member

@LauraBeatris LauraBeatris commented May 20, 2026

Description

Introduce separate ProfileContentPage to allow for opt-out padding, an example being the new self-serve SSO page:

CleanShot 2026-05-20 at 10 36 43

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:

@LauraBeatris LauraBeatris self-assigned this May 20, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 20, 2026 2:54pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 0899b58

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension 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

@github-actions github-actions Bot added the ui label May 20, 2026
@LauraBeatris LauraBeatris changed the base branch from laura/add-self-serve-sso-org-profile to main May 20, 2026 14:45
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-padding-changes-1 branch from 3499e58 to d9dc3cc Compare May 20, 2026 14:46
@LauraBeatris LauraBeatris requested review from a team and alexcarpenter May 20, 2026 14:46
@LauraBeatris LauraBeatris marked this pull request as ready for review May 20, 2026 14:47
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request introduces ProfileCardPage, a reusable wrapper component that applies theme-based padding and optional content bleeding to profile and account pages. The new component is added to the ProfileCard module and exported as ProfileCard.Page. The implementation includes conditional early-return logic for cases where both padding and bleeding are disabled, and responsive margin overrides for edge-to-gutter bleed behavior. Subsequently, all user profile pages (Account, APIKeys, Billing, Plans, Security), organization profile pages (APIKeys, Billing, General, Members, Plans), and other page components (CustomPageContentContainer, PaymentAttemptPage, StatementPage) are updated to wrap their content within ProfileCard.Page. ProfileCardContent styling is simplified to remove now-redundant responsive padding overrides. A Changesets entry documents the new feature.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: introducing ProfileCard.Page for UserProfile and OrganizationProfile pages. It is specific and directly reflects the primary purpose of the PR.
Description check ✅ Passed The description clearly explains the motivation for the change: introducing a separate ProfileCardPage component to allow opting out of default padding, with a concrete example of the new self-serve SSO page. The description is directly related to the changeset.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@LauraBeatris LauraBeatris marked this pull request as ready for review May 20, 2026 15:00
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@packages/ui/src/elements/ProfileCard/ProfileCardPage.tsx`:
- Around line 39-48: The breakpoint-specific styles for small screens are
clobbered because both conditional spreads in ProfileCardPage create a separate
[mqu.sm] object (the padding branch and the bleeding branch), so when both
padding and bleeding are true the latter replaces the former; fix by merging the
small-breakpoint objects instead of emitting duplicate [mqu.sm] keys—e.g., build
a single [mqu.sm] object that spreads in the padding styles and also spreads in
the bleeding margin styles (or compute a merged object before spreading) so both
padding and bleeding styles coexist when both flags are true.
🪄 Autofix (Beta)

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

Run ID: a70c9db9-6a76-48cd-bc3a-3a4a341a44cb

📥 Commits

Reviewing files that changed from the base of the PR and between a043a15 and 0899b58.

📒 Files selected for processing (17)
  • .changeset/chatty-maps-shine.md
  • packages/ui/src/common/CustomPageContentContainer.tsx
  • packages/ui/src/components/OrganizationProfile/OrganizationAPIKeysPage.tsx
  • packages/ui/src/components/OrganizationProfile/OrganizationBillingPage.tsx
  • packages/ui/src/components/OrganizationProfile/OrganizationGeneralPage.tsx
  • packages/ui/src/components/OrganizationProfile/OrganizationMembers.tsx
  • packages/ui/src/components/OrganizationProfile/OrganizationPlansPage.tsx
  • packages/ui/src/components/PaymentAttempts/PaymentAttemptPage.tsx
  • packages/ui/src/components/Statements/StatementPage.tsx
  • packages/ui/src/components/UserProfile/APIKeysPage.tsx
  • packages/ui/src/components/UserProfile/AccountPage.tsx
  • packages/ui/src/components/UserProfile/BillingPage.tsx
  • packages/ui/src/components/UserProfile/PlansPage.tsx
  • packages/ui/src/components/UserProfile/SecurityPage.tsx
  • packages/ui/src/elements/ProfileCard/ProfileCardContent.tsx
  • packages/ui/src/elements/ProfileCard/ProfileCardPage.tsx
  • packages/ui/src/elements/ProfileCard/index.ts

Comment on lines +39 to +48
[mqu.sm]: {
padding: `${theme.space.$8} ${theme.space.$5}`,
},
}),
...(bleeding && {
marginInlineStart: `calc(${theme.space.$8} * -1)`,
marginInlineEnd: `calc(${theme.space.$6} * -1)`,
[mqu.sm]: {
marginInline: `calc(${theme.space.$5} * -1)`,
},
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Breakpoint styles are being overwritten when both padding and bleeding are enabled.

At Line 39 and Line 46, both conditional spreads write to [mqu.sm]. If both flags are true, the bleeding block replaces the padding block, so small-screen padding is lost.

Suggested fix
     <Col
       sx={theme => ({
         ...(padding && {
           paddingTop: theme.space.$7,
           paddingBottom: theme.space.$7,
           paddingInlineStart: theme.space.$8,
           paddingInlineEnd: theme.space.$6, //smaller because of stable scrollbar gutter on the parent
-          [mqu.sm]: {
-            padding: `${theme.space.$8} ${theme.space.$5}`,
-          },
         }),
         ...(bleeding && {
           marginInlineStart: `calc(${theme.space.$8} * -1)`,
           marginInlineEnd: `calc(${theme.space.$6} * -1)`,
-          [mqu.sm]: {
-            marginInline: `calc(${theme.space.$5} * -1)`,
-          },
         }),
+        [mqu.sm]: {
+          ...(padding && { padding: `${theme.space.$8} ${theme.space.$5}` }),
+          ...(bleeding && { marginInline: `calc(${theme.space.$5} * -1)` }),
+        },
       })}
     >
🤖 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/elements/ProfileCard/ProfileCardPage.tsx` around lines 39 -
48, The breakpoint-specific styles for small screens are clobbered because both
conditional spreads in ProfileCardPage create a separate [mqu.sm] object (the
padding branch and the bleeding branch), so when both padding and bleeding are
true the latter replaces the former; fix by merging the small-breakpoint objects
instead of emitting duplicate [mqu.sm] keys—e.g., build a single [mqu.sm] object
that spreads in the padding styles and also spreads in the bleeding margin
styles (or compute a merged object before spreading) so both padding and
bleeding styles coexist when both flags are true.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 20, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8602

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 0899b58

@LauraBeatris LauraBeatris merged commit 4696c51 into main May 20, 2026
50 checks passed
@LauraBeatris LauraBeatris deleted the laura/org-profile-padding-changes-1 branch May 20, 2026 20:38
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.

2 participants