Repository navigation
fix(core): complete RTL physical→logical migration + enforce no-physical-properties (error) - #4564
Closed
nynexman4464 wants to merge 5 commits into
Closed
nynexman4464 wants to merge 5 commits into
nynexman4464 wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
July 30, 2026 21:36
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsAvatar (@astryxdesign/core) · View in Storybook
Banner (@astryxdesign/core) · View in Storybook
Calendar (@astryxdesign/core) · View in Storybook
Chat (@astryxdesign/core) · View in Storybook
Dialog (@astryxdesign/core) · View in Storybook
Markdown (@astryxdesign/core) · View in Storybook
Popover (@astryxdesign/core) · View in Storybook
Resizable (@astryxdesign/core) · View in Storybook
Slider (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 2 accessibility violation(s) found — 2 serious. Banner - 1 issue(s)
Chat - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
nynexman4464
added a commit
that referenced
this pull request
Jul 30, 2026
#4564 converted the status dot's anchor from `right` to `insetInlineEnd` (right edge in LTR, left edge in RTL) but left the paired outward-push `transform: translate(50%, 50%)` physical, so under RTL the dot pulled inward toward the avatar center instead of hugging the bottom-leading corner. Make the X translate direction-aware via the established `:is([dir="rtl"] *)` idiom (as in MobileNav/Carousel): default `translate(50%, 50%)`, RTL `translate(-50%, 50%)`. Only the X sign flips; Y (+50%, downward) is direction-neutral. The dot now overhangs the bottom-inline-end corner in both directions (bottom-right LTR, bottom-left RTL), matching the anchor. LTR is unchanged / pixel-identical. Note: the no-physical-properties lint flags physical `left`/`right` keys but not physical `translate()` in transforms, so this class of bug (logical anchor + unflipped physical transform) is not lint-catchable today.
nynexman4464
added a commit
that referenced
this pull request
Jul 30, 2026
This was referenced Jul 30, 2026
…cal-properties (error) Convert the final physical left/right CSS properties in the core package to their logical equivalents (insetInlineStart/End, borderStart*/End* radii, textAlign: end) across Avatar, Banner, Calendar, Chat composer, Chat composer drawer, Dialog, FieldStatus, Markdown, and Popover, so they mirror correctly under RTL. With the migration complete, promote @astryx/no-physical-properties from warn to error in both the recommended and strict tiers to gate against regressions. LTR rendering is pixel-identical.
#4564 converted the status dot's anchor from `right` to `insetInlineEnd` (right edge in LTR, left edge in RTL) but left the paired outward-push `transform: translate(50%, 50%)` physical, so under RTL the dot pulled inward toward the avatar center instead of hugging the bottom-leading corner. Make the X translate direction-aware via the established `:is([dir="rtl"] *)` idiom (as in MobileNav/Carousel): default `translate(50%, 50%)`, RTL `translate(-50%, 50%)`. Only the X sign flips; Y (+50%, downward) is direction-neutral. The dot now overhangs the bottom-inline-end corner in both directions (bottom-right LTR, bottom-left RTL), matching the anchor. LTR is unchanged / pixel-identical. Note: the no-physical-properties lint flags physical `left`/`right` keys but not physical `translate()` in transforms, so this class of bug (logical anchor + unflipped physical transform) is not lint-catchable today.
…ration split to its own PR)
nynexman4464
force-pushed
the
nynexman4464/feat/rtl-complete-physical-props
branch
from
July 31, 2026 18:03
e9d6989 to
9c43eb3
Compare
…fix Popover/Slider/ResizeHandle off-center in RTL
Contributor
Author
github-actions
Bot
deleted the
nynexman4464/feat/rtl-complete-physical-props
branch
August 1, 2026 06:54
This was referenced Aug 7, 2026
nynexman4464
added a commit
that referenced
this pull request
Aug 7, 2026
rtl-audit.mjs hardcoded a "known real bug pending a fix branch" note for the Avatar status-dot, pointing at #4564. Both halves are now wrong: - Avatar passes D5. Across all 15 Avatar stories in a full sweep the verdicts are only N-A and pass — zero fails. - #4564 was closed without merging, so the referenced fix branch never landed. Because the banner printed whenever ANY D5 fail existed, not just an Avatar one, the next unrelated finding would have been captioned with a misleading "known real bug" pointing at a dead PR. Removes the field and both consumers (the pr-rtl scorecard in ci.yml and the weekly summary). Test plan: full-sweep report confirms Avatar is clean (15 stories, N-A/pass only). Audit runs and the emitted report no longer carries the key (positionalMirror keys: total, applicable, pass, fail, na, tolerancePx, results). The findings-path summary still renders its D5 table with the banner gone. ci.yml parses; prettier-clean.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the RTL physical→logical CSS migration for the core package and flips the guard rail on.
The last 22 physical
left/rightCSS properties across 9 components (Avatar, Banner, Calendar, Chat composer, Chat composer drawer, Dialog, FieldStatus, Markdown, Popover) are converted to their CSS logical equivalents —insetInlineStart/insetInlineEnd, the diagonal-awareborderStart*/borderEnd*corner radii, andtextAlign: 'end'— so these components mirror correctly under RTL. Each conversion is a strict 1:1 logical rename; separate corner radii are kept separate (no collapsing) even where the value is the same.With the migration finished,
@astryx/no-physical-propertiesis promoted fromwarntoerrorin both therecommendedandstricttiers. The rule was deliberately shipped atwarnpending this migration (the config comment said "flip to error afterward" — this is afterward). It now gates against any future physical-property regression across the package.Why logical properties
Physical
left/rightdon't flip under RTL; the CSS logical equivalents (inset-inline-*,*-start/*-end) do. StyleX compiles these to native CSS logical properties, so the browser handles direction mapping — LTR rendering is pixel-identical (inset-inline-end===right,border-start-start-radius===border-top-left-radius,text-align: end===rightin LTR).Testing
pnpm lint(rule now at error): 0 errors — the whole repo passes with the rule gating.pnpm --filter @astryxdesign/core typecheck: 0 errors.pnpm check:repo: green.Completes the RTL migration. Refs #3636, #4116.
Follow-up: Avatar status-dot RTL fix (2nd commit)
The initial pass converted the Avatar status dot's anchor
right→insetInlineEnd(right edge in LTR, left edge in RTL) but left the paired outward-pushtransform: translate(50%, 50%)physical — so under RTL the dot pulled inward toward the avatar center instead of hugging the bottom-leading corner. Fixed by making the X translate direction-aware (:is([dir="rtl"] *)→translate(-50%, 50%)); Y is direction-neutral. The dot now overhangs the bottom-inline-end corner in both directions (bottom-right LTR, bottom-left RTL).Measured (Playwright, real StyleX-compiled CSS,
dirinherited to the avatar subtree):Exact mirror about the avatar center; LTR is unchanged / pixel-identical.
Lint gap noted:
@astryx/no-physical-propertiesflags physicalleft/rightkeys but not physicaltranslate()in transforms, so this bug class (logical anchor + unflipped physical transform) isn't lint-catchable today — candidate for a future rule enhancement.