-
Notifications
You must be signed in to change notification settings - Fork 369
fix(clerk-js): Fix layout shift when navigating after task resolution #6265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(clerk-js): Fix layout shift when navigating after task resolution #6265
Conversation
🦋 Changeset detectedLatest commit: 00e36ea The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
c5eb64b
to
00e36ea
Compare
📝 WalkthroughWalkthroughThis change introduces a React ref named Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (10)`**/*.{js,jsx,ts,tsx}`: All code must pass ESLint checks with the project's conf...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`packages/**/*.{ts,tsx,d.ts}`: Packages should export TypeScript types alongside runtime code
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Use proper TypeScript error types
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`**/*.{tsx,jsx}`: Use error boundaries in React components Minimize re-renders in React components
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`packages/{clerk-js,elements,themes}/**/*`: Visual regression testing should be performed for UI components.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/monorepo.mdc) List of files the instruction was applied to:
`**/*.{jsx,tsx}`: Always use functional components with hooks instead of class c...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/react.mdc) List of files the instruction was applied to:
`**/*.tsx`: Use proper type definitions for props and state Leverage TypeScript'...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/react.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Always define explicit return types for functions, especially p...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/typescript.mdc) List of files the instruction was applied to:
`packages/**/*.ts`: TypeScript is required for all packages
📄 Source: CodeRabbit Inference Engine (.cursor/rules/development.mdc) List of files the instruction was applied to:
`**/*.ts`: If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.
⚙️ Source: CodeRabbit Configuration File List of files the instruction was applied to:
🧠 Learnings (5)📓 Common learnings
packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (10)
.changeset/ripe-months-stay.md (12)
packages/clerk-js/src/ui/types.ts (5)
packages/clerk-js/src/ui/components/SessionTasks/index.tsx (19)
🧬 Code Graph Analysis (2)packages/clerk-js/src/ui/components/SessionTasks/tasks/ForceOrganizationSelection.tsx (1)
packages/clerk-js/src/ui/components/SessionTasks/index.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (9)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
Description
This PR maintains the height of the current task being rendered when it gets resolved, and the loading container gets displayed for navigation, avoiding a layout shift.
It's not possible to set a minimum height ahead of time, since there could be multiple tasks, each with a different height depending on the number of resources or content.
CleanShot.2025-07-07.at.15.29.34.mp4
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit
Bug Fixes
Chores