Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
d054a49 to
bbecf51
Compare
There was a problem hiding this comment.
This review is on hold for a spec decision: the head carries a copy of docs/specs/AST-094-touch-presentations/spec.md marked authority: current, but AST-094 is not on main and has no approval for this head, so approval waits on an engineering owner, who either approves it for this head by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner) or asks for the copy to leave this branch so AST-094 is decided in its own spec pull request. Independently of that decision, these changes are needed before approval:
- Land #8134 and its predecessors, or retarget onto #8134's branch: against
mainthis diff is about 40,000 authored lines, of which this change is 581. revealinuseSwipeAction.tsalso rests aswipeBehavior="commit"row open over a panel with no button, which AST-057 FR5 and AR1 rule out; guardcommitand add a test.- The changed Effects in
ItemSwipeLayer.tsxname no external system and now setItemstate throughonBridge; forward through the bridge ref without state, or justify them under the runtime contract's INV3. - The stacked swipe changes contradict AST-057 FR2 (custom-property travel) and FR5 (a fling fires), which needs settling in #8134.
[Automated review]
| // A control in the row opens it, as UIKit's edit-mode delete control does: | ||
| // the row settles open on the side exactly as a release past half the panel | ||
| // leaves it, so it closes by the same tap, pointer, scroll or Escape. | ||
| const reveal = useCallback( |
There was a problem hiding this comment.
reveal never reads latestRef.current.behavior, so on a swipeBehavior="commit" row it settles the row open over a panel that is aria-hidden and inert with no button, and the root stops taking presses. AST-057 FR5 says nothing rests under commit, and AR1 that its panel is never tappable. Return early for commit (or publish null for commit rows) and add the case to the new tests.
| onBridge(null); | ||
| }; | ||
| }); | ||
| }, [onBridge]); |
There was a problem hiding this comment.
This changed Effect, and the latest-handler Effect above it, name no external system (react-component-runtime INV3), and through onBridge this one now sets Item's hasSwipeBridge state, so each swipe row renders again once its layer mounts. Forwarding reveal and close through swipeBridgeRef with no state, as the key forwarder already does, avoids the Effect-set state.
| template_version: 2 | ||
| kind: system-spec | ||
| id: spec:AST-094 | ||
| authority: current |
There was a problem hiding this comment.
This stacked copy says authority: current (and approved_by, line 9), but AST-094 is not on main, its spec pull requests are open, and this head has no spec-owner approval, so merging would publish it as current without one. Drop the copy, as an earlier commit on this branch did, or have an engineering owner approve this exact head.
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsItem (@astryxdesign/core) · View in Storybook
MultiSelector (@astryxdesign/core) · View in Storybook
Component 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.
|
| Component | JavaScript | CSS |
|---|---|---|
| core/BottomSheet | +33.1KB |
+98B |
| core/BreadcrumbItem | +34.1KB |
+87B |
| core/CheckboxListItem | +33.8KB |
+16B |
| core/ContextMenu | +35.0KB |
+109B |
| core/DateInput | +33.2KB |
+85B |
| core/DateTimeInput | +33.3KB |
+89B |
| core/DropdownMenu | +35.1KB |
+115B |
| core/DropdownMenuCheckboxItem | +33.6KB |
+41B |
| core/DropdownMenuItem | +33.5KB |
+34B |
| core/DropdownMenuRadioItem | +33.6KB |
+41B |
| core/DropdownMenuSubMenu | +33.6KB |
+46B |
| core/Item | +33.5KB |
+27B |
| core/ListItem | +33.8KB |
+16B |
| core/Markdown | +35.0KB |
+75B |
| core/MoreMenu | +34.9KB |
+115B |
| core/Pagination | +35.3KB |
+88B |
| core/PowerSearch | +41.4KB |
+124B |
| core/RadioListItem | +33.9KB |
+10B |
| core/Selector | +35.5KB |
+117B |
| core/SelectorOption | +33.5KB |
+29B |
| core/Table | +35.0KB |
+85B |
| core/TableCell | +34.9KB |
+63B |
| core/TableHeaderCell | +35.0KB |
+71B |
| core/TimeInput | +33.4KB |
+92B |
Bundle Size Summary
Gzip figures measure each package's entry file, not the code an import pulls in.
| Package | Entry (ESM) | Entry gzip before | Entry gzip after | Delta |
|---|---|---|---|---|
| @astryxdesign/core | 4.9KB | 1.2KB | 1.2KB | 0B |
| Package stylesheet | Gzip before | Gzip after | Delta |
|---|---|---|---|
| @astryxdesign/core | 34.6KB | 34.6KB | +38B |
Accessibility Audit
Status: No accessibility violations detected.
Visual Regression
55 of 504 shot(s) changed.
A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.
| component | story | theme | mode | pixels |
|---|---|---|---|---|
| Selector | Indicator Space Bottom Sheet Narrow End RTL | neutral | light | 753,933 |
| Selector | Indicator Space Bottom Sheet Wide Start | neutral | light | 740,072 |
| RichTextEditor | Markdown parity: side by side | probe | dark | 558,840 |
| RichTextEditor | Markdown parity: side by side | probe | light | 540,756 |
| Chat | Full AI Chat | probe | light | 230,823 |
| Chat | Full AI Chat | probe | dark | 229,805 |
| AppShell | With Mobile Nav | probe | light | 217,010 |
| AppShell | With Mobile Nav | probe | dark | 216,960 |
| Collapsible | Dividers | probe | dark | 66,445 |
| Collapsible | Dividers | probe | light | 66,445 |
| AppShell | Playground | neutral | dark | 65,198 |
| AppShell | Playground | neutral | light | 63,788 |
| Chat | Default | neutral | dark | 36,304 |
| Chat | Default | neutral | light | 35,767 |
| Chat | Empty State | probe | light | 23,531 |
| Chat | Empty State | probe | dark | 22,622 |
| ChatAutoScroll | Scroll Behavior Comparison | neutral | dark | 15,378 |
| ChatAutoScroll | Scroll Behavior Comparison | neutral | light | 14,107 |
| Chat | With Attachments | probe | light | 13,406 |
| Chat | With Attachments | probe | dark | 11,232 |
and 35 more.
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report
…-mode stack # Conflicts: # packages/core/src/Item/Item.tsx # packages/core/src/List/List.test.tsx # packages/core/src/motion/MEASUREMENTS.md # packages/core/src/motion/README.md # packages/core/src/utils/pressFeedback.ts
bbecf51 to
8bab129
Compare
There was a problem hiding this comment.
This review is on hold for an owner decision: the change gives a control inside a swipe row a programmatic reveal(side) and close() for List's planned edit mode, but current spec:AST-057 lists a programmatic open or close as not admitted (DEC-3 rejects an imperative open), and no current record governs List's edit mode. Approval needs an engineering owner to admit that addition, in this internal-context shape and on every pointer (AST-057 AR2 and DEC-4 keep the panel from mouse and keyboard users), or to name the record that will govern it; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently of that decision, these changes are needed before approval:
- Land #8134 and its predecessors, or retarget onto #8134's branch: against
mainthis diff is 43,481 authored lines, of which this change is 586, and it now conflicts withmainin 11 files. - Guard
revealagainstswipeBehavior="commit"rows, which it rests open over a panel with no button (AST-057 FR5 and AR1), and add that case to the tests. - Rework the bridge Effect in
ItemSwipeLayer.tsx, which now setsItem's state and names no external system (react-component-runtime INV3). - Settle the stacked swipe changes' contradictions of AST-057 FR2 (custom-property travel) and FR5 (a fling fires) in #8134.
[Automated review]
There was a problem hiding this comment.
This review is on hold for an owner decision: the change gives a control inside a swipe row a programmatic reveal(side) and close() for List's planned edit mode, but current spec:AST-057 lists a programmatic open or close as not admitted (DEC-3 rejects an imperative open), and no current record governs List's edit mode. Approval needs an engineering owner to admit that addition, in this internal-context shape and on every pointer (AST-057 AR2 and DEC-4 keep the panel from mouse and keyboard users), or to identify the spec that will govern it; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently of that decision, these changes are needed before approval:
- Land #8134 and its predecessors, or retarget onto #8134's branch: against
mainthis diff is 40,866 authored lines, of which this change is 586, and it conflicts withmainin two files. - Guard
revealagainstswipeBehavior="commit"rows, which it rests open over a panel with no button although AST-057 FR5 says nothing rests undercommit, and add that case to the tests. - Rework the bridge Effect in
ItemSwipeLayer.tsx, which now setsItem's state and names no external system (react-component-runtime INV3). - Settle the stacked swipe changes' contradictions of AST-057 FR2 (custom-property travel) and FR5 (a fling fires) in #8134.
[Automated review]
There was a problem hiding this comment.
This review is on hold for an owner decision: the change gives a control inside a swipe row a programmatic reveal(side) and close() for List's planned edit mode, but current spec:AST-057 lists a programmatic open or close as not admitted (DEC-3 rejects an imperative open), and no current record governs List's edit mode. Approval needs an engineering owner to admit that addition, in this internal-context shape and on every pointer (AST-057 AR2 and DEC-4 keep the panel from mouse and keyboard users), or to identify the spec that will govern it; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Independently of that decision, these changes are needed before approval:
- Land #8134 and its predecessors, or retarget onto #8134's branch: against
mainthis diff is 42,645 authored lines, of which this change is 586, and it now conflicts withmainin 17 files. - Guard
revealagainstswipeBehavior="commit"rows, which it rests open over a panel with no button although AST-057 FR5 says nothing rests undercommit, and add that case to the tests. - Rework the bridge Effects in
ItemSwipeLayer.tsx, which name no external system and now setItem's state (react-component-runtime INV3). - Settle the stacked swipe changes' contradictions of AST-057 FR2 (custom-property travel) and FR5 (a fling fires) in #8134.
[Automated review]
Folds this pull request onto the canonical gesture foundation, meta#8360's head, which carries meta#8076, and onto main, in place of the old meta#8076 and harness copies it carried. The one conflict is the motion README's Files table: meta#8360's table, with this pull request's progress.ts row added after presentation.ts.
There was a problem hiding this comment.
This review is on hold for an engineering-owner decision: useItemSwipeReveal() gives a control inside a swipe row a programmatic reveal(side) and close(), which current spec:AST-057 does not admit (its Non-goals decline a programmatic open or close and DEC-3 rejects an imperative open), and the seam also opens the panel under a mouse, where DEC-4 and AR2 apply. Approval needs an engineering owner to settle whether AST-057 admits this internal seam and on which pointers, by amending AST-057 on main or by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or to say it waits for a record that governs List’s edit mode. Independently of that decision, two changes are still needed:
- Land after #8344’s line, or rebase onto
mainonce it lands, so this pull request carries only its 7-file seam instead of 49,808 authored lines. - The interaction case at
ItemSwipeActions.interaction.browser.spec.ts:1035taps the control’s centre after the open row has carried it outside the list, so it passes through the outside-pointer close; tap the open row’s visible content instead, or assert the hit target before tapping.
[Automated review]
| * The swipe of the row this component renders in, or `null` where the row | ||
| * has none to reveal (see the file header). | ||
| */ | ||
| export function useItemSwipeReveal(): ItemSwipeReveal | null { |
There was a problem hiding this comment.
This is the programmatic open and close that spec:AST-057 currently declines (Non-goals: “A programmatic open or close. Not admitted”; DEC-3 rejects “an imperative or controlled open”), and it is live under a mouse too, where DEC-4 and AR2 apply. It needs an engineering owner’s decision, by /approve-spec <full head SHA> on this pull request or an amendment to AST-057, before it can be approved.
| // Open, a touch on the control is the row's dismissing tap: the row closes | ||
| // and the browser makes no click, so nothing opens it again. | ||
| const clicks = await countClicks(control); | ||
| await engineTap(page, browserName, driver, await centerOf()); |
There was a problem hiding this comment.
Once the row is open, centerOf() returns a point the control no longer occupies: the row has carried its marker by at least the 72 px entry width past the list’s inline clip, so this tap lands outside the list and the row closes through the outside-pointer path, not a tap on the control. Tap the open row’s visible content (as the next case does), or assert document.elementFromPoint returns the control before tapping, and retitle the case.
|
Superseded: this was built on the old swipe layer, which createSwipe replaces. The branch is kept. |
Depends on #8344. Review only this PR's change: vjeux/astryx@84a4c89...f38a89a
Why
List's edit mode, which comes next, needs UIKit's delete control: the red minus button in a row whose tap opens the row's trailing actions exactly as a swipe does, while any tap on the open row closes them. Without a way in, List would need its own copy of the swipe.
What led to it
Part of a series bringing Astryx's touch interactions to parity with native iOS (UIKit). Only
Itemholds a row's swipe state, so a control rendered inside the row has no way to ask the row to open.Options and tradeoffs
Item:spec:AST-057declines a programmatic open (its non-goals and DEC-3).useItemSwipeReveal(), not exported, gives a control inside the rowreveal(side)andclose(). A reveal settles the row exactly as a release past half its buttons does, so it closes by the same tap, scroll, outside press or Escape. Precedent:ItemDescriptionContext, Item's internal seam to a control in a slot.Open owner question: whether
spec:AST-057admits this internal open, and for which pointers (a mouse click on the control opens the row today).Why this choice
It changes no product behavior until List's edit mode uses it, and keeps one swipe implementation.
How to check it
In Storybook, open the Item story "Swipe Reveal Control" (it is off the docs page):
We ran these with real taps in Chromium and WebKit; each behaved as listed. The unit tests pass. Of the eleven new ones, each that needs the seam failed before the change; the two for a row with no swipe actions or with
swipeBehavior="commit"(no seam) pass either way.Evidence
Item.test.tsx, "a reveal from a control in the row".Itemfails by design.Scope