Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
… isRtlElement Review follow-up (one implementation per behaviour): the touch layer's geometry asks core's `isRtlElement` (exported from `@astryxdesign/core/hooks` by meta#8330, merged below) instead of reading the computed `direction` itself. No behaviour change; the right-to-left proofs pass as before.
There was a problem hiding this comment.
Approval waits on an engineering owner deciding whether isRtlElement should join @astryxdesign/core's public API at @astryxdesign/core/hooks, which through export * from './hooks' also exposes it from the package root: no current spec covers that addition. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. Separately, please remove “(proposed; pending owner review)” from the changeset and the isRtlElement.ts header before landing, since the changeset text is published in the CHANGELOG, and name every entry point the export ships on.
[Automated review]
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] `isRtlElement` is exported from `@astryxdesign/core/hooks` (proposed; pending owner review): whether an element renders right to left, read from its computed `direction` when it is called, for drag, scroll and layout math. |
There was a problem hiding this comment.
This text is published in the CHANGELOG; the formatter renders it as “- [feat] isRtlElement is exported from @astryxdesign/core/hooks (proposed; pending owner review): …”. Once an owner decides, please drop “(proposed; pending owner review)” and name every entry point the export ships on: export * from './hooks' in packages/core/src/index.ts also exports it from @astryxdesign/core.
| * @position Exported from `@astryxdesign/core/hooks` (proposed; pending | ||
| * owner review); used by useListFocus and useGridFocus to auto-detect RTL |
There was a problem hiding this comment.
“(proposed; pending owner review)” would stay in the shipped source after the decision; please drop it together with the changeset wording.
…isRtlElement One implementation of direction detection (design:bidirectionality DR13): the stack asks core's isRtlElement, exported from @astryxdesign/core/hooks by meta#8330, instead of reading the computed direction itself.
…it/c09-search-field
… isRtlElement Review follow-up (one implementation per behaviour): the touch layer's geometry asks core's `isRtlElement` (exported from `@astryxdesign/core/hooks` by meta#8330, merged below) instead of reading the computed `direction` itself. No behaviour change; the right-to-left proofs pass as before.
…it/c23-page-control
…it/c09-search-field
… isRtlElement Review follow-up (one implementation per behaviour): the touch layer's geometry asks core's `isRtlElement` (exported from `@astryxdesign/core/hooks` by meta#8330, merged below) instead of reading the computed `direction` itself. No behaviour change; the right-to-left proofs pass as before.
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewComponent Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: No accessibility violations detected. Visual Regression55 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 35 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
…it/c23-page-control
…n lens
A capsule of tabs floating above the bottom edge, with UIKit's measured
geometry (62 px capsule 21 px from the edges, 76 x 54 items 4 px inside
it) and a selection lens that carries the selected look: the items are
drawn twice and the selected copy lives inside the lens, counter-
translated, so an item half under a sliding lens is half tinted. Under a
finger (a coarse primary pointer, iOS and Android alike: one touch model,
AST-094) the lens slides on core's animator with UIKit's spring (response
0.4 s, damping ratio 0.85), keeping its speed when a second tap turns it
around; that motion is TabBar's touch layer, TabBarTouch.ts, its one import
site. Under a mouse the lens slides in CSS on the theme's duration and
easing (keyed on the touch query, spelled as the resolver's constant), and
no touch code runs. Under Reduce
Motion nothing travels
(design:reduced-motion, applied by the animator): on a touch screen the
lens cross-fades in 200 ms, under a mouse it moves at once. Choosing the
selected tab again calls onReselect. Badges sit over the icon's
top-trailing corner and never animate. The tabs are a named tablist with
one tab stop. The lens is one element per role: its resting fill is its
own background.
Values live in motion/uikit/tabBar.ts, read from a stock
UITabBarController on iOS 26.2; the table is registered, so each spring
is a motion role a theme may retune (tabBar.lensTravel).
The bar sets no page-level stacking rank: its root isolates its own layers
(the lens and the badges order inside it). A badge's spoken suffix comes
from the message catalog (@astryx.tabBar.badge, ", {badge}"), separator
included. The docs and stories declare the bar on LayerProvider
(inset={{blockEnd: 83}}) so menus, popovers and toasts clear it. Writing
direction comes from core's isRtlElement (exported by meta#8330).
…n lens
A capsule of tabs floating above the bottom edge, with UIKit's measured
geometry (62 px capsule 21 px from the edges, 76 x 54 items 4 px inside
it) and a selection lens that carries the selected look: the items are
drawn twice and the selected copy lives inside the lens, counter-
translated, so an item half under a sliding lens is half tinted. Under a
finger (a coarse primary pointer, iOS and Android alike: one touch model,
AST-094) the lens slides on core's animator with UIKit's spring (response
0.4 s, damping ratio 0.85), keeping its speed when a second tap turns it
around; that motion is TabBar's touch layer, TabBarTouch.ts, its one import
site. Under a mouse the lens slides in CSS on the theme's duration and
easing (keyed on the touch query, spelled as the resolver's constant), and
no touch code runs. Under Reduce
Motion nothing travels
(design:reduced-motion, applied by the animator): on a touch screen the
lens cross-fades in 200 ms, under a mouse it moves at once. Choosing the
selected tab again calls onReselect. Badges sit over the icon's
top-trailing corner and never animate. The tabs are a named tablist with
one tab stop. The lens is one element per role: its resting fill is its
own background.
Values live in motion/uikit/tabBar.ts, read from a stock
UITabBarController on iOS 26.2. registerTabBarTable() beside the data makes
each spring a motion role a theme may retune (tabBar.lensTravel); nothing
registers on import, and TabBar's touch layer calls it under a finger
before its first animation.
The bar sets no page-level stacking rank: its root isolates its own layers
(the lens and the badges order inside it). A badge's spoken suffix comes
from the message catalog (@astryx.tabBar.badge, ", {badge}"), separator
included. The docs and stories declare the bar on LayerProvider
(inset={{blockEnd: 83}}) so menus, popovers and toasts clear it. Writing
direction comes from core's isRtlElement (exported by meta#8330).
An element's computed `direction`, read when it is called, so a component doing drag, scroll or layout math asks once instead of detecting it inline. useListFocus, useGridFocus, Carousel and the swipe actions already read it inside core; lab's TabBar reads the same helper for its lens. The changeset and the file header no longer carry "proposed; pending owner review": what ships is the export, and the question of its contract belongs in the pull request, not in the CHANGELOG.
dc9d16a to
36d487c
Compare
|
Fixed at 36d487c: neither the changeset nor the file header says "proposed; pending owner review" any more. The changeset describes what ships — the export and what it reads — and the open question, whether a utility like this belongs on the stable |
|
The Merged main (b298b37) at 4aa6e4a — no conflicts. On it: |
There was a problem hiding this comment.
Approval waits on an engineering owner providing or identifying the spec that governs this addition: no current spec gives isRtlElement a public contract, spec:AST-017 FR21 keeps a utility without one unexported, and through export * from './hooks' the export reaches the @astryxdesign/core root as well as @astryxdesign/core/hooks. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request to approve the export as proposed, and the author may do so as an engineering owner; alternatively an owner can name another entry point, such as @astryxdesign/core/i18n or @astryxdesign/core/utils, or keep the helper internal, in which case the export comes out. No other change is needed: the export adds only isRtlElement to those two entry points, and the earlier release-note wording is fixed.
[Automated review]
|
Closing this: nothing needs the export any more. Both consumers now read the writing direction from Lab's own one-liner ( That leaves this pull request with no content anyone depends on, so it goes rather than lingering as an open decision. |
…rnal entry meta#8330, which would have exported `isRtlElement` from `@astryxdesign/core/hooks`, is closed: the helper stays off Core's stable `hooks` entry (`spec:AST-017` FR21). This pull request no longer carries that export, its changeset, its test or its header edit. PageControl takes Core's one `isRtlElement` through `@astryxdesign/core/internal/touch` instead, as a named re-export with its line in scripts/core-internal-entries.test.mjs, so Lab and Core read the direction with one implementation and nothing new is public. PageControl.tsx's header now names the internal entries it imports from.
…gh Core's internal entry PageControl.tsx and PageControlTouch.ts take Core's `isRtlElement` through `@astryxdesign/core/internal/touch`, which meta#8164 now re-exports by name in place of meta#8330's closed public export. PageControl.tsx's header names the internal entries and the touch layer it imports.
User need
Lab components that drag, scroll or lay out by writing direction (the tab bar's lens, the search field, the navigation stack's swipe back) read the direction inline with
getComputedStyle(el).direction. Core already has the one helper for this,isRtlElement, used by list and grid focus, Carousel and swipe actions, but no package export carries it, so lab can't use it and each component keeps its own read. Review asked for one implementation (design:bidirectionality DR13: drag, resize and scroll outcomes mirror).Problem and solution fit
Exporting the existing helper from
@astryxdesign/core/hookslets every lab component read the direction the way core does. Nothing else changes.Current specification
Proposed; pending owner review: this adds
isRtlElementto core's public surface.useDirection(the i18n context's direction) already namesisRtlElementas the read for behavioral logic such as drag math; this PR only makes it importable.Public delta and caller burden
isRtlElement(el: HTMLElement | null): booleanfrom@astryxdesign/core/hooks.Design and alternatives
useDirectionalone. It answers the provider's direction during render, not the computed direction of an element inside adir="rtl"region.Evidence
Unit tests: it is exported from the hooks entry; it reads right to left and the left-to-right default; it is false for no element.
Scope
Testing
pnpm exec vitest run packages/core/src/hooks(506 passed)pnpm -F @astryxdesign/core typecheck,pnpm check:changesets, ESLint and Prettier on the touched files