Skip to content

chore(Item): a control in the row opens the row's swipe actions (internal seam) - #8375

Closed
vjeux wants to merge 2265 commits into
meta:mainfrom
vjeux:uikit/c12-swipe-reveal
Closed

vjeux wants to merge 2265 commits into
meta:mainfrom
vjeux:uikit/c12-swipe-reveal

Conversation

@vjeux

@vjeux vjeux commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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 Item holds a row's swipe state, so a control rendered inside the row has no way to ask the row to open.

Options and tradeoffs

  1. Copy the swipe into List: duplicates the travel, spring, buttons and closing rules, which would drift apart.
  2. A public open/close prop on Item: spec:AST-057 declines a programmatic open (its non-goals and DEC-3).
  3. An internal seam (chosen): useItemSwipeReveal(), not exported, gives a control inside the row reveal(side) and close(). 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-057 admits 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):

  1. Tap the "−" control at a row's start: the row opens its Delete action on the same spring as a swipe.
  2. Tap anywhere on the open row: it closes, and nothing activates.
  3. Open one row, then press Enter on another row's control: the first closes and the second opens.

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

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split (the hidden side's panel staying live is fixed in fix(Item): swipe actions on the gesture system #8096).
  • Public text and artifacts contain no internal Meta context.

@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 30, 2026 2:18am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 2:37 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 25, 2026
@vjeux
vjeux force-pushed the uikit/c12-swipe-reveal branch from d054a49 to bbecf51 Compare October 25, 2026 08:01
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main this diff is about 40,000 authored lines, of which this change is 581.
  • reveal in useSwipeAction.ts also rests a swipeBehavior="commit" row open over a panel with no button, which AST-057 FR5 and AR1 rule out; guard commit and add a test.
  • The changed Effects in ItemSwipeLayer.tsx name no external system and now set Item state through onBridge; 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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

Item (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 284B 284B 0B
Lines of Code 1372 1883 -
Complexity Very High Very High (116) -
MultiSelector (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 273B 273B 0B
Lines of Code 2642 2642 -
Complexity Very High Very High (344) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 57.0KB 57.3KB +292B 12.4KB 12.4KB 0B
core/AppShell 58.0KB 58.3KB +239B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 40.1KB 40.3KB +304B 6.4KB 6.4KB 0B
core/Banner 48.0KB 48.2KB +290B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.5KB 54.7KB +242B 9.9KB 9.9KB 0B
core/BottomSheet 33.9KB 67.1KB +33.1KB ⚠️ 7.9KB 8.0KB +98B
core/BottomSheetSwitcher 14.8KB 14.8KB 0B 3.3KB 3.3KB 0B
core/BreadcrumbItem 66.5KB 100.6KB +34.1KB ⚠️ 11.0KB 11.1KB +87B
core/Button 43.4KB 43.7KB +267B 9.2KB 9.2KB 0B
core/Calendar 55.1KB 55.3KB +283B 10.0KB 10.0KB 0B
core/Carousel 50.4KB 50.7KB +390B 10.2KB 10.2KB 0B
core/ChatComposer 60.8KB 61.0KB +276B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.9KB 56.2KB +266B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.9KB 56.2KB +265B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.6KB 46.9KB +266B 9.5KB 9.5KB 0B
core/ChatLayout 49.0KB 49.2KB +272B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.5KB 46.8KB +255B 9.6KB 9.6KB 0B
core/ChatSendButton 46.0KB 46.2KB +263B 9.2KB 9.2KB 0B
core/CheckboxInput 50.1KB 50.3KB +268B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.2KB 88.1KB +33.8KB ⚠️ 10.5KB 10.5KB +16B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.7KB 60.9KB +273B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 51.0KB 51.3KB +336B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 56.0KB 56.3KB +279B 10.6KB 10.6KB 0B
core/ContextMenu 74.7KB 109.7KB +35.0KB ⚠️ 14.6KB 14.7KB +109B
core/ContextMenuItem 53.0KB 51.3KB -1.7KB 9.6KB 5.2KB -4.3KB
core/DateInput 99.7KB 132.9KB +33.2KB ⚠️ 14.8KB 14.9KB +85B
core/DateRangeInput 69.5KB 70.0KB +504B 11.2KB 11.2KB 0B
core/DateTimeInput 109.8KB 143.1KB +33.3KB ⚠️ 15.2KB 15.3KB +89B
core/DialogHeader 49.0KB 49.2KB +272B 9.8KB 9.8KB 0B
core/DrawerHeader 49.1KB 49.3KB +248B 11.2KB 11.2KB 0B
core/DropdownMenu 72.8KB 107.9KB +35.1KB ⚠️ 14.7KB 14.8KB +115B
core/DropdownMenuCheckboxItem 16.1KB 49.7KB +33.6KB ⚠️ 5.6KB 5.6KB +41B
core/DropdownMenuItem 15.4KB 48.9KB +33.5KB ⚠️ 5.2KB 5.2KB +34B
core/DropdownMenuRadioItem 16.2KB 49.8KB +33.6KB ⚠️ 5.6KB 5.6KB +41B
core/DropdownMenuSubMenu 58.2KB 91.8KB +33.6KB ⚠️ 9.5KB 9.6KB +46B
core/FileInput 54.3KB 54.5KB +262B 10.3KB 10.3KB 0B
core/IconButton 43.5KB 43.7KB +272B 9.2KB 9.2KB 0B
core/Item 11.4KB 44.8KB +33.5KB ⚠️ 4.7KB 4.7KB +27B
core/LayerProvider 63.4KB 63.7KB +285B 10.1KB 10.1KB 0B
core/Lightbox 51.3KB 51.6KB +254B 9.8KB 9.8KB 0B
core/Link 43.7KB 43.9KB +281B 7.6KB 7.6KB 0B
core/List 6.7KB 6.7KB 0B 3.4KB 3.4KB 0B
core/ListItem 53.7KB 87.5KB +33.8KB ⚠️ 10.5KB 10.5KB +16B
core/Markdown 144.5KB 179.5KB +35.0KB ⚠️ 17.4KB 17.4KB +75B
core/MobileNav 51.2KB 51.4KB +261B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.4KB 46.6KB +259B 9.4KB 9.4KB 0B
core/MoreMenu 73.2KB 108.1KB +34.9KB ⚠️ 14.7KB 14.8KB +115B
core/MultiSelector 73.1KB 73.3KB +272B 14.6KB 14.7KB +95B
core/NumberInput 55.9KB 56.1KB +290B 10.7KB 10.7KB 0B
core/Outline 28.8KB 29.0KB +285B 4.0KB 4.0KB 0B
core/Pagination 84.9KB 120.3KB +35.3KB ⚠️ 15.3KB 15.4KB +88B
core/Popover 50.0KB 50.2KB +216B 12.1KB 12.2KB +87B
core/PowerSearch 158.2KB 199.6KB +41.4KB ⚠️ 19.9KB 20.0KB +124B
core/RadioListItem 52.4KB 86.2KB +33.9KB ⚠️ 9.7KB 9.7KB +10B
core/SegmentedControlItem 8.6KB 8.9KB +285B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 13.1KB +294B 7.1KB 7.1KB 0B
core/Selector 76.5KB 111.9KB +35.5KB ⚠️ 15.0KB 15.1KB +117B
core/SelectorOption 14.5KB 48.0KB +33.5KB ⚠️ 5.1KB 5.1KB +29B
core/SideNav 58.1KB 58.4KB +277B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.8KB 47.0KB +248B 9.5KB 9.5KB 0B
core/SideNavHeading 54.9KB 55.1KB +248B 10.1KB 10.1KB 0B
core/SideNavItem 54.6KB 54.9KB +270B 10.1KB 10.1KB 0B
core/Step 32.6KB 32.8KB +279B 5.3KB 5.3KB 0B
core/Stepper 47.5KB 47.8KB +270B 9.6KB 9.6KB 0B
core/Switch 48.5KB 48.8KB +279B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.8KB 52.0KB +276B 10.0KB 10.0KB 0B
core/Table 83.9KB 118.9KB +35.0KB ⚠️ 15.1KB 15.2KB +85B
core/TableCell 75.8KB 110.7KB +34.9KB ⚠️ 14.8KB 14.9KB +63B
core/TableHeaderCell 75.5KB 110.5KB +35.0KB ⚠️ 14.8KB 14.9KB +71B
core/TableSelectionToolbar 52.5KB 52.8KB +278B 11.2KB 11.2KB 0B
core/TextInput 53.7KB 54.0KB +274B 10.5KB 10.5KB 0B
core/Thumbnail 50.8KB 51.1KB +272B 11.0KB 11.0KB 0B
core/TimeInput 86.9KB 120.3KB +33.4KB ⚠️ 13.8KB 13.8KB +92B
core/Timestamp 27.7KB 27.7KB +1B 9.5KB 9.5KB 0B
core/Toast 60.0KB 60.2KB +258B 9.7KB 9.7KB 0B
core/ToggleButton 44.3KB 44.5KB +245B 9.3KB 9.3KB 0B
core/Token 29.7KB 30.0KB +289B 4.5KB 4.5KB 0B
core/Tokenizer 68.8KB 69.3KB +582B 16.5KB 16.6KB +71B
core/TopNav 52.0KB 52.3KB +274B 10.4KB 10.4KB 0B
core/TopNavHeading 54.3KB 54.5KB +223B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.3KB 54.6KB +273B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.7KB 54.0KB +258B 10.1KB 10.1KB 0B
core/TreeList 32.7KB 33.0KB +279B 4.7KB 4.7KB 0B
core/Typeahead 61.6KB 61.9KB +269B 11.3KB 11.3KB 0B
lab/ChatEmojiPicker N/A 65.2KB N/A N/A 773B N/A
lab/ChatReactionBar N/A 65.7KB N/A N/A 1.1KB N/A
lab/CommentComposer N/A 94.2KB N/A N/A 1.9KB N/A
lab/CommentPin N/A 47.8KB N/A N/A 1.2KB N/A
lab/CommentThread N/A 250.6KB N/A N/A 2.4KB N/A
lab/Comments N/A 254.8KB N/A N/A 2.5KB N/A
lab/DiffViewer N/A 46.0KB N/A N/A 2.1KB N/A
lab/EmojiPicker N/A 63.3KB N/A N/A 722B N/A
lab/ListInput N/A 75.3KB N/A N/A 1.6KB N/A
lab/MobilePowerSearch N/A 199.4KB N/A N/A 1.4KB N/A
lab/MobileTokenizer N/A 124.7KB N/A N/A 775B N/A
lab/Schedule N/A 66.3KB N/A N/A 3.9KB N/A
lab/TourStep N/A 55.6KB N/A N/A 590B N/A
lab/TransferList N/A 101.6KB N/A N/A 1.7KB N/A
lab/TransferListSelector N/A 107.6KB N/A N/A 1.9KB N/A
richtext/RichTextEditor N/A 271.1KB N/A N/A 2.6KB N/A
richtext/RichTextEditorToolbar N/A 248.0KB N/A N/A 454B N/A
richtext/RichTextView N/A 251.6KB N/A N/A 2.3KB N/A

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.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

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

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
…-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
@vjeux
vjeux force-pushed the uikit/c12-swipe-reveal branch from bbecf51 to 8bab129 Compare October 25, 2026 21:39
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main this diff is 43,481 authored lines, of which this change is 586, and it now conflicts with main in 11 files.
  • Guard reveal against swipeBehavior="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 sets Item'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]

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main this diff is 40,866 authored lines, of which this change is 586, and it conflicts with main in two files.
  • Guard reveal against swipeBehavior="commit" rows, which it rests open over a panel with no button although AST-057 FR5 says nothing rests under commit, and add that case to the tests.
  • Rework the bridge Effect in ItemSwipeLayer.tsx, which now sets Item'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]

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main this diff is 42,645 authored lines, of which this change is 586, and it now conflicts with main in 17 files.
  • Guard reveal against swipeBehavior="commit" rows, which it rests open over a panel with no button although AST-057 FR5 says nothing rests under commit, and add that case to the tests.
  • Rework the bridge Effects in ItemSwipeLayer.tsx, which name no external system and now set Item'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]

vjeux added 18 commits October 29, 2026 12:26
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.
Folds this pull request onto meta#8340's head (the animator's presentation
start, on meta#8360 and main) and meta#8497's new head (the progress module, on
meta#8360 and main), in place of the old copies of meta#8340, meta#8497, meta#8076 and the
harness it carried. No conflicts.
motion/README.md: the table is meta#8329's, with this stack's two rows kept in
place: uikit/sheet.ts (with its rubber band past the tallest detent) and
interactive.ts, the driver; Prettier realigns the table.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:36
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
… the input drivers helper 4c0e0a5) into meta#8690

# Conflicts:
#	packages/core/src/Item/useSwipeAction.ts
#	packages/core/src/motion/README.md

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main once 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:1035 taps 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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vjeux

vjeux commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: this was built on the old swipe layer, which createSwipe replaces. The branch is kept.

@vjeux vjeux closed this Nov 10, 2026

This branch was successfully deployed

1 active deployment
Preview — f38a89a4 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants