feat(mosaic): mirror direction-aware icons under rtl - #9803
Conversation
|
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: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (13)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. 📝 WalkthroughWalkthroughSwingset now provides direction state through Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains in the RTL support change. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 15 files. (4 skipped: 4 unsupported.)
Comment |
🦋 Changeset detectedLatest commit: d4b2df6 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 |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
🔴 Breaking changes index (2)Every breaking change, up front. Full diffs are in the package sections below.
@clerk/sharedCurrent version: 4.33.0 Subpath
|
ab6b7cf to
d4b2df6
Compare
Description
Adds
rtl.mirror(packages/mosaic/src/utils/rtl.styles.ts), a shared StyleX atom that flips an element withscaleX(-1)only under an ancestor carryingdir="rtl". It follows thertlStyles.mirrorpattern from facebook/astryx: the flip is horizontal only, and it lives outside any state-driven rotation so it composes with one.The atom is composed via
xstyleonto the icons whose shape encodes movement, so the same glyph reads correctly in both writing directions without mirrored twins in the icon registry:Icons that point at a dropdown (
chevron-down) and the external-link arrow (arrow-right-top) are left unmirrored on purpose.The selector is
:is([dir="rtl"] *)rather thanstylex.when.ancestor, because the latter compiles to:where(.<marker>[dir="rtl"] *)and only matches an ancestor that carries a StyleX marker class, so it cannot see a plain<html dir="rtl">.Swingset gains an RTL switch in the header next to the dark-mode toggle. It sets
diron<html>rather than on the preview container, since popover and menu popups portal to<body>and a container-scopeddirwould never reach them.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change