Repository navigation
fix(core): migrate physical left/right CSS to logical properties for RTL (Phase 2) - #4434
Merged
Merged
Conversation
…valents for RTL Phase 2 of the RTL migration: a mechanical, one-to-one sweep converting physical left/right CSS properties to their logical (inline) equivalents. No-op in the default LTR direction; enables correct mirroring under dir=rtl. - textAlign left/right -> start/end - borderLeft*/borderRight* -> borderInlineStart*/borderInlineEnd* (kept as separate start/end declarations, not collapsed to shorthand) - static left/right positioning -> insetInlineStart/insetInlineEnd - inline marginLeft indentation -> marginInlineStart (TreeList) Behavioral/computed positioning (Slider, Resizable, floating layers, anchor-positioned popovers, transform-based centering) and directional radii are intentionally deferred to later phases.
nynexman4464
requested review from
cixzhang,
ejhammond and
imdreamrunner
as code owners
July 27, 2026 21:09
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
July 27, 2026 21:09
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsBanner · View in Storybook
Button · View in Storybook
Chat · View in Storybook
CodeBlock · View in Storybook
CommandPalette · View in Storybook
DateRangeInput · View in Storybook
DropdownMenu · View in Storybook
Field · View in Storybook
Lightbox · View in Storybook
NavMenu · View in Storybook
Selector · View in Storybook
TabList · View in Storybook
Table · View in Storybook
Thumbnail · View in Storybook
TreeList · View in Storybook
Typeahead · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 6 accessibility violation(s) found — 1 critical, 4 serious, 1 moderate. Banner - 1 issue(s)
Chat - 1 issue(s)
DateRangeInput - 1 issue(s)
TabList - 1 issue(s)
Table - 1 issue(s)
Thumbnail - 1 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
31 of 40 tasks
AKnassa
added a commit
to AKnassa/astryx
that referenced
this pull request
Aug 27, 2026
The eight add/add conflicts resolved to main's files in the merge; this ports back only the assertions main does not cover and that still hold today (render gates and sizing, layer groups and masks, style restore, registry glyph, xstyle forwarding, context guards). Duplicates of main's coverage are dropped rather than kept twice. Four files went stale over the 815-commit gap and follow today's behavior: the hidden data-table fallback (meta#4382) means chart label and tooltip queries scope to the svg; useTooltip's touch guard is per pointer type (meta#5248) and a controlled tooltip reports Escape through onHide (meta#4881); TableHeaderCell dividers are logical inline-end properties (meta#4434).
cixzhang
pushed a commit
that referenced
this pull request
Sep 3, 2026
…sted viz packages and hooks (#4295) (#4377) * test: cover the viz packages and five core hooks packages/charts and packages/vega had no functional tests at all, and packages/lab's chart primitives (Chart*, Radial*, ThreeD*, Sankey*, SVGIcon) rendered nothing under test. Add colocated tests for each, plus renderHook tests for the three useCalendar* hooks, useCollapsible and useTableFilterState. Harness: charts and vega were falling through to the `node` vitest project, which has no jsdom, no StyleX transform and no jest-dom, so their tests could never have run there. Move both into the `ui` project and give vega the test scripts the other packages already have. 53 test files, 307 tests. Verified: full suite 7943 pass / 430 files, still green with packages/core/dist absent (the cold-CI path, which charts needs because it imports core by bare name for values); 8 sampled mutations across all four packages, each killed by exactly the new test. Refs #4295 * test: cover remaining core hooks and components Finishes the functional-coverage sweep started in 64d9ea3. Adds renderHook tests for useScrollLock, useLightbox, useChatPasteAsToken, useImperativeAlertDialog, useTranslator and useTooltip, plus colocated tests for the components that had none: CommandPaletteEmpty, InputClearButton, TypeaheadItem, ChatSendButton, PowerSearchToken, PowerSearchFilterEditor and TableHeaderCell. Two of the issue's nine "zero-test" components already had tests (ChatComposerDrawer, MobileNavToggle, from #3996 and #3721), so the inventory is smaller than the issue states. Extracts the StyleX declaration read-back helper that three of these files each needed into __tests__/stylexDeclarations.ts rather than landing a third copy. Two branches are deliberately left uncovered, with the reason recorded next to them: the ignored-onOpenChange(true) guards in useLightbox and useImperativeAlertDialog are unreachable through the public surface, and reaching into element props to force them both breaks the repo's no-react-introspection lint rule and asserts a value that is already settled. useTooltip's focus paths are also omitted -- jsdom resolves :focus-visible as :focus, so those tests would pass with the gate deleted. Verified: 8101 tests / 443 files green, eslint and prettier clean, core typecheck clean; three sampled mutations (the send-button variant ternary, CommandPaletteEmpty's xstyle merge, useTooltip's touch suppression) each killed by exactly one new test. Refs #4295 * test: port the branch's remaining assertions onto main's test files The eight add/add conflicts resolved to main's files in the merge; this ports back only the assertions main does not cover and that still hold today (render gates and sizing, layer groups and masks, style restore, registry glyph, xstyle forwarding, context guards). Duplicates of main's coverage are dropped rather than kept twice. Four files went stale over the 815-commit gap and follow today's behavior: the hidden data-table fallback (#4382) means chart label and tooltip queries scope to the svg; useTooltip's touch guard is per pointer type (#5248) and a controlled tooltip reports Escape through onHide (#4881); TableHeaderCell dividers are logical inline-end properties (#4434). * test(calendar): assert month labels as English literals CI's lint job fails on the one raw Intl call left in these tests: main's no-raw-intl-locale rule keeps its test-oracle allowlist inside the rule, and this file is not on it. The oracle was also the wrong side: with no InternationalizationProvider mounted, useLocale() resolves to 'en', so the hook's labels never followed the machine locale that Intl.DateTimeFormat(undefined) reads. Literal 'April 2026' style assertions match Calendar.test.tsx and drop the Intl dependency.
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
RTL Phase 2 (refs #4116): a mechanical 1:1 conversion of physical left/right CSS properties to their logical equivalents across
@astryxdesign/core. This is a no-op in LTR (logicalinline-start/inline-endresolve to left/right in LTR) and makes components mirror correctly underdir="rtl".Builds on the direction API from #4269 (now merged).
What changed — 41 conversions across 20 files
textAlign: 'left'/'right''start'/'end'borderLeft*/borderRight*(width/style/color)borderInlineStart*/borderInlineEnd*left:/right:(positioning)insetInlineStart:/insetInlineEnd:marginLeft(inline style, TreeListItem)marginInlineStartOne-to-one, not collapsed. Symmetric
borderLeftWidth+borderRightWidthpairs become two distinct properties (borderInlineStartWidth+borderInlineEndWidth), not a singleborderInlineWidthshorthand. This keeps the diff a clean mechanical map and each side independently overridable.Deliberately left for Phase 4 (behavioral / higher-risk)
Not touched here — these need direction-aware logic or careful visual review, not a rename:
left: ${pct}%thumb positioning (behavioral)linear-gradient(to right/left))marginInlineStartfor coherent RTL tree mirroringMarkdowntextAlign: 'right'— semantic (from|---:|source alignment), intentionally preservedtranslateX(-50%)centering — direction-agnostic, untouchedTesting
TreeList.test.tsxupdated: it asserts on the inline-style property name (margin-inline-start), so the assertion + selector followed the source rename — a functional coupling, not a snapshot edit.typecheckclean (StyleX accepts the logical keys);check:repogreen.[fix], patch,@astryxdesign/core.Follow-ups
@stylexjs/eslint-pluginpropLimitsfor key-based bans + a small custom rule for value cases (textAlign). Will land after Phase 2+4 so it doesn't flag in-flight work.