refactor(ui): Migrate to focus-visibile usage#8595
Conversation
🦋 Changeset detectedLatest commit: 4fbca13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis pull request systematically replaces Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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/customizables/classGeneration.ts`:
- Around line 129-141: normalizeFocusSelectors currently duplicates :focus rules
as :focus-visible but leaves the original :focus keys, so the migration doesn't
disable :focus styles; update normalizeFocusSelectors to replace the :focus key
with the :focus-visible key (remove the original :focus entry) when no existing
:focus-visible key exists, ensuring you still clone the input only when needed
(result = result === val ? { ...val } : result) and preserving values via
result[newKey] = val[key] and then delete result[key]; keep logic that skips
keys already containing :focus-visible or :focus-within to avoid accidental
changes.
🪄 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: dd664e7f-1dbd-4051-bb4a-7caa7eee7e3f
📒 Files selected for processing (11)
packages/ui/src/baseTheme.tspackages/ui/src/customizables/classGeneration.tspackages/ui/src/elements/ArrowBlockButton.tsxpackages/ui/src/elements/InputGroup.tsxpackages/ui/src/elements/Navbar.tsxpackages/ui/src/elements/PhoneInput/index.tsxpackages/ui/src/elements/Tabs.tsxpackages/ui/src/primitives/Button.tsxpackages/ui/src/primitives/Link.tsxpackages/ui/src/styledSystem/common.tspackages/ui/src/themes/neobrutalism.ts
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@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: |
Description
Migrate
:focusto:focus-visibleacross packages/ui so focus rings only appear during keyboard navigation, not mouse clicks.BEFORE
focus-before.mov
AFTER
focus-after.mov
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change