Skip to content

fix(Popover): touch growth starts where the popover meets its trigger - #10949

Merged
cixzhang merged 12 commits into
meta:mainfrom
vjeux:layer-side-rule
Nov 13, 2026
Merged

cixzhang merged 12 commits into
meta:mainfrom
vjeux:layer-side-rule

Conversation

@vjeux

@vjeux vjeux commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Under a finger, a Popover grows out of its trigger. It found its side and starting point by a rule of its own: the widest gap, with any overlap growing from below. The pointer entrance found them by another rule. The two disagreed only where a popover overlaps its trigger.

Now both read one rule. A popover a few pixels over its trigger's side grows from that side, not from below. A popover over its trigger's center grows from that center by scale only. Every other landing grows as before, flipped ones included.

Visual authority

No current record decides where the touch growth starts when a popover overlaps its trigger. The spec owners ruled that it takes its side and meeting point from the layer side rule. A popover over its trigger's center only scales. INV20 in architecture:layer-runtime now says so:

Popover's touch growth starts from the same point. Over its trigger's center it has no side to lengthen along, so it only scales.

INV20 also names the shared entrance (layerAnimations), which runs under a finger too. Its one read per show now covers only a layer left in place. This record change needs the spec owners' approval at this head.

How it works

popoverCollapsedState takes its side and meeting point from layerEntranceSide, the helper the pointer entrance uses. When the popover covers its trigger's center, there is no side, so its length starts full and only its scale grows. layerEntranceSide.test.ts and popoverSurfaceMotion.test.ts read one fixture table, so the two paths cannot drift apart again.

Before and after

Chromium with touch emulation at a 402 × 714 viewport, at normal speed: before left, this change right. No popover lands over its trigger on its own. So the two overlap clips place it there with a style, the same on both sides.

  • Over its trigger's center: clip, slow
  • A few pixels over its trigger's side: clip, slow
  • Flipped above, unchanged: clip, slow

State matrix

  • Chromium and WebKit, touch, with a coarse primary pointer.
  • A mouse is unchanged: the pointer entrance already used this rule.
  • Right to left: the side comes from boxes, so it is physical.
  • Reduced motion: unchanged; that presentation cross-fades.

Scope

Components: Popover, Layer. Selector loses one comment that restated its code.

  • Appearance is the primary intent.
  • Behavior, API, interaction model, and unrelated layout changes were removed or split.
  • The evidence shows the changed pixels actively running, not only source or computed styles.
  • Public text and artifacts contain no internal Meta context.

Testing

Every browser run uses 1 worker, which is CI's profile. The green runs are at this head (fb34403). It merges main at 36f68b0 into a76ed0f, which merged main at f04a3d6. Since f04a3d6, main changed docs/architecture/layer-runtime.md, which this pull request edits, and Layer/useLayer.tsx, which Selector.tsx imports directly. The record's evidence table conflicted, and the merge keeps main's table with this pull request's INV20 row. At run time, its code also reaches six more of those changes: Layer/gestureCounter.ts, utils/clickGuard.ts, utils/touchEndMark.ts, Popover/usePopover.tsx, BottomSheet/BottomSheetPanel.tsx and BottomSheet/useSheetGestures.ts. From 9b5ad42 to f04a3d6, main changed none of its own files or direct imports. At run time its code reached two of those changes: Text/useTruncation.ts and utils/sharedResizeObserver.ts. Before that, from 2025dc7 to 9b5ad42, main changed 26 files that this pull request's code reaches at run time. It imports seven of them directly. They are Layer/layerEntranceSide.ts, which it also changes, Layer/layerAnimations.stylex.ts, Layer/useLayer.tsx and Field/InputClearButton.tsx. The others are Selector/useSelectorPresentation.ts, hooks/useMenuPress.ts and utils/themeProps.ts. layerEntranceSide.ts now also returns the room to a sized trigger, and the merge adds that room to the shared table. Popover's touch growth reads only the side and the meeting point, which are unchanged. No device run has been taken at this head. The red-first runs used main's code at 19eadab, which holds #10771.

  • Red first, units: on main's code, the shared table fails on the touch path in exactly the three rows where the rules disagreed. Those are a few pixels over the side, over the center, and a list over its selected option.
  • No shipped layout changes: the table's five rows where the popover clears its trigger pass on main's rule and on this one. The flipped-above browser case passes on both builds too. Only Popover plays this growth, and no shipped Popover layout overlaps its trigger.
  • Red first, browser: three new PopoverTouchMotion cases tap a popover under a finger. On main's build, the two overlap cases fail on the origin in Chromium and WebKit: the growth starts at the top edge. The flipped case passes there too, as it should.
  • Green: every spec in Layer, Popover and Selector passes at this head. The 12 interaction specs pass 119 tests in Chromium and 82 in WebKit, with LayerSamePress passing its 9 in each. Every skip is main's: fixme cases in LayerPressTransform, recorded gaps in LayerPanLightDismiss, which runs in Chromium only, and 18 cases main skips in WebKit.
  • The 17 accessibility specs pass in Chromium (151 tests), and the 3 that also run in WebKit pass there (11 tests).
  • The three Lightbox accessibility specs that main changed since 9b5ad42 pass in Chromium (70 tests).
  • Unit: the whole ui project, which CI shards four ways, passes (25240 tests). It holds the shared table and the Layer, Popover and Selector suites.
  • pnpm lint:strict (CI's mode), core's typecheck, pnpm check:knowledge, changesets, and the public-text check pass.
  • CLI suite: 13363 pass and 1 fails. In stored-docs.test.mjs, one case ran past its 30 s deadline. This pull request changes no CLI code, and packages/cli is the same at main 36f68b0. In four full runs back to back, alternating this head and main 36f68b0 in one checkout, each gave 13363 passes and that one failure.
  • At a76ed0f, the same four-run control against main f04a3d6 gave 13324 passes and that one failure each time.
  • At fc3bbe5, the CLI suite had 12821 passes and 10 failures, and two suite hooks ran past 30 s.

Writing rubric results

  • R1 narration: none; INV20 states where each entrance starts.
  • R2 research: none in the record; the clips live in this description.
  • R3 evidence: none; verified_by names the tests.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.

Public and internal API delta

  • Public: none. No export, prop, type, default, theme variable or theme target changes in Popover, Layer or Selector.
  • Internal: Popover's touch growth now calls the existing internal layerEntranceSide() from Layer/layerEntranceSide, in place of its own side rule. Usage: const side = layerEntranceSide(surface, source);. Why: one rule for both entrances (architecture:layer-runtime INV20), so they cannot drift apart.
  • layerEntranceSide.ts changes only its header comment, and Popover's private clamp and EDGE helpers go away. No module is added.
  • Test-only: a shared fixture table, Layer/__tests__/layerEntranceSide.fixture.ts, that both suites read. Each row also gives the room at which the pointer entrance's step stops.
  • Size: +336/−112 lines (36f68b0..fb34403): source +20/−43, tests +296/−61, records and docs +20/−8.
  • App-level size: +0 B gzip, eager, on the four Sandbox routes measured, at fc3bbe5 against main 9b5ad42. The whole app's JS shrinks by 133 B gzip, because the side rule moves into code Popover already loads. The merges since then change none of this pull request's own lines.

vjeux added 2 commits November 9, 2026 16:58
An anchored layer with no room on its requested side flips, but its
entrance still slid from the requested side, onto its trigger. Every
entrance also scaled about the center of its box.

As it shows an anchored layer, the runtime reads the anchor and the
layer's settled box in one pass, and reuses the boxes keepAnchorClear
read. It writes the side as custom properties that the shared keyframes
read: a step toward the trigger on each axis, and the origin where the
layer meets the trigger. Without them, an entrance keeps its placement's
side. A layer over its trigger's center, as a Selector list over its
selected item, scales about that center and does not slide. That
Selector writes the side itself after the commit that moves its list,
and the runtime skips its own read.
Popover's touch growth found its side and meeting point with its own
rule: the widest gap, with any overlap growing from below. The layer
runtime's entrance found them by the larger center separation. The two
disagreed only where the popover overlaps its trigger. Now
popoverCollapsedState takes both from layerEntranceSide, so a finger
and a mouse grow from one point. A popover over its trigger's center
has no side to lengthen along, so it grows from that center by scale
only.

Both unit tests read one fixture table. INV20 now states the rule for
the shared entrance, which also runs under a finger, and its
verification row names its failure signals.
@vercel

vercel Bot commented Nov 10, 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 Nov 13, 2026 5:23am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 13, 2026, 5:42 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 10, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · fb34403

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
LayerProvider 4.4 kB (0) · 20 B CSS (0) — ✓ · ✓ · ✗
Selector 106.6 kB (0) · 17.9 kB CSS (0) — ✗ · ✓ · ✓
SelectorOption 21.6 kB (0) · 6.4 kB CSS (0) — ✗ · ✓ · ✓
116 more components
Component Size LoC Visual · A11y · RTL
charts/Chart 211.5 kB (0) · 516 B CSS (0) — — · — · —
charts/ChartLegend 54.8 kB (0) · 224 B CSS (0) — — · — · —
charts/ChartTooltip 188.6 kB (0) · 451 B CSS (0) — — · — · —
AlertDialog 110.6 kB (0) · 15.0 kB CSS (0) — — · — · —
AppShell 96.2 kB (0) · 13.8 kB CSS (0) — — · — · —
Avatar 45.8 kB (0) · 5.7 kB CSS (0) — — · — · —
AvatarGroup 48.6 kB (0) · 5.8 kB CSS (0) — — · — · —
AvatarGroupOverflow 51.8 kB (0) · 5.7 kB CSS (0) — — · — · —
Banner 66.4 kB (0) · 10.9 kB CSS (0) — — · — · —
BaseTypeahead 77.7 kB (0) · 11.3 kB CSS (0) — — · — · —
BreadcrumbItem 91.0 kB (0) · 12.5 kB CSS (0) — — · — · —
Button 64.4 kB (0) · 10.3 kB CSS (0) — — · — · —
Calendar 75.5 kB (0) · 11.0 kB CSS (0) — — · — · —
Carousel 74.1 kB (0) · 11.3 kB CSS (0) — — · — · —
ChatComposer 83.9 kB (0) · 12.4 kB CSS (0) — — · — · —
ChatComposerInput 81.6 kB (0) · 11.7 kB CSS (0) — — · — · —
ChatComposerTokenElement 81.6 kB (0) · 11.7 kB CSS (0) — — · — · —
ChatDictationButton 65.0 kB (0) · 10.4 kB CSS (0) — — · — · —
ChatLayout 87.7 kB (0) · 10.9 kB CSS (0) — — · — · —
ChatLayoutScrollButton 65.0 kB (0) · 10.5 kB CSS (0) — — · — · —
ChatMessageList 30.6 kB (0) · 7.1 kB CSS (0) — — · — · —
ChatSendButton 64.8 kB (0) · 10.3 kB CSS (0) — — · — · —
ChatToolCalls 34.8 kB (0) · 8.4 kB CSS (0) — — · — · —
CheckboxInput 68.7 kB (0) · 10.1 kB CSS (0) — — · — · —
CheckboxList 72.9 kB (0) · 7.8 kB CSS (0) — — · — · —
CheckboxListItem 75.6 kB (0) · 11.7 kB CSS (0) — — · — · —
CodeBlock 79.7 kB (0) · 11.6 kB CSS (0) — — · — · —
CommandPalette 75.9 kB (0) · 12.7 kB CSS (0) — — · — · —
CommandPaletteInput 34.3 kB (0) · 7.6 kB CSS (0) — — · — · —
ComplexSelector 76.9 kB (0) · 12.2 kB CSS (0) — — · — · —
ContextMenu 114.3 kB (0) · 17.8 kB CSS (0) — — · — · —
DateInput 196.2 kB (0) · 17.4 kB CSS (0) — — · — · —
DateRangeInput 98.6 kB (0) · 12.9 kB CSS (0) — — · — · —
DateTimeInput 218.6 kB (0) · 19.1 kB CSS (0) — — · — · —
DialogHeader 67.3 kB (0) · 11.9 kB CSS (0) — — · — · —
DrawerHeader 67.5 kB (0) · 13.3 kB CSS (0) — — · — · —
DropdownMenu 103.6 kB (0) · 17.9 kB CSS (0) — — · — · —
DropdownMenuSubMenu 74.3 kB (0) · 10.1 kB CSS (0) — — · — · —
Field 59.3 kB (0) · 7.3 kB CSS (0) — — · — · —
FieldLabel 55.2 kB (0) · 5.8 kB CSS (0) — — · — · —
FileInput 73.5 kB (0) · 11.3 kB CSS (0) — — · — · —
Heading 14.8 kB (0) · 5.5 kB CSS (0) — — · — · —
HoverCard 30.1 kB (0) · 4.5 kB CSS (0) — — · — · —
IconButton 64.5 kB (0) · 10.3 kB CSS (0) — — · — · —
InfoTip 50.2 kB (0) · 5.4 kB CSS (0) — — · — · —
InputGroup 60.9 kB (0) · 7.9 kB CSS (0) — — · — · —
Lightbox 145.3 kB (0) · 11.5 kB CSS (0) — — · — · —
Link 56.1 kB (0) · 7.1 kB CSS (0) — — · — · —
ListItem 74.7 kB (0) · 11.7 kB CSS (0) — — · — · —
Markdown 195.4 kB (0) · 21.1 kB CSS (0) — — · — · —
MobileNav 74.9 kB (0) · 11.0 kB CSS (0) — — · — · —
MobileNavToggle 64.8 kB (0) · 10.3 kB CSS (0) — — · — · —
MoreMenu 103.8 kB (0) · 17.9 kB CSS (0) — — · — · —
MultiSelector 100.7 kB (0) · 17.2 kB CSS (0) — — · — · —
NumberInput 76.9 kB (0) · 11.8 kB CSS (0) — — · — · —
Pagination 117.7 kB (0) · 18.2 kB CSS (0) — — · — · —
PowerSearch 303.7 kB (0) · 24.7 kB CSS (0) — — · — · —
ProgressBar 12.0 kB (0) · 6.4 kB CSS (0) — — · — · —
RadioList 60.6 kB (0) · 7.3 kB CSS (0) — — · — · —
RadioListItem 71.9 kB (0) · 10.4 kB CSS (0) — — · — · —
SegmentedControl 101.9 kB (0) · 6.9 kB CSS (0) — — · — · —
SideNav 119.7 kB (0) · 11.7 kB CSS (0) — — · — · —
SideNavCollapseButton 65.3 kB (0) · 10.4 kB CSS (0) — — · — · —
SideNavHeading 81.8 kB (0) · 11.7 kB CSS (0) — — · — · —
SideNavItem 76.3 kB (0) · 11.5 kB CSS (0) — — · — · —
Slider 114.2 kB (0) · 8.9 kB CSS (0) — — · — · —
Spinner 27.1 kB (0) · 6.3 kB CSS (0) — — · — · —
StatusDot 33.6 kB (0) · 5.4 kB CSS (0) — — · — · —
Stepper 66.1 kB (0) · 10.5 kB CSS (0) — — · — · —
Switch 108.7 kB (0) · 10.0 kB CSS (0) — — · — · —
Table 132.4 kB (0) · 18.7 kB CSS (0) — — · — · —
TableCell 115.6 kB (0) · 18.3 kB CSS (0) — — · — · —
TableHeaderCell 115.2 kB (0) · 18.0 kB CSS (0) — — · — · —
TableSelectionToolbar 74.7 kB (0) · 13.6 kB CSS (0) — — · — · —
TabList 47.1 kB (0) · 6.5 kB CSS (0) — — · — · —
TabMenu 78.1 kB (0) · 11.5 kB CSS (0) — — · — · —
Text 14.2 kB (0) · 5.5 kB CSS (0) — — · — · —
TextArea 66.7 kB (0) · 9.4 kB CSS (0) — — · — · —
TextInput 72.1 kB (0) · 11.5 kB CSS (0) — — · — · —
Thumbnail 68.8 kB (0) · 11.9 kB CSS (0) — — · — · —
TimeInput 169.4 kB (0) · 16.4 kB CSS (0) — — · — · —
Timer 16.3 kB (0) · 6.1 kB CSS (0) — — · — · —
Timestamp 35.8 kB (0) · 10.6 kB CSS (0) — — · — · —
Toast 102.7 kB (0) · 10.6 kB CSS (0) — — · — · —
ToggleButton 91.4 kB (0) · 10.4 kB CSS (0) — — · — · —
Tokenizer 103.1 kB (0) · 19.5 kB CSS (0) — — · — · —
Toolbar 47.0 kB (0) · 8.1 kB CSS (0) — — · — · —
Tooltip 31.9 kB (0) · 4.5 kB CSS (0) — — · — · —
TopNav 76.6 kB (0) · 11.3 kB CSS (0) — — · — · —
TopNavHeading 81.5 kB (0) · 11.6 kB CSS (0) — — · — · —
TopNavMegaMenu 75.4 kB (0) · 12.2 kB CSS (0) — — · — · —
TopNavMenu 80.8 kB (0) · 11.6 kB CSS (0) — — · — · —
Typeahead 86.9 kB (0) · 12.8 kB CSS (0) — — · — · —
lab/CommentPin 60.2 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/DialogHeroHeader 87.9 kB (0) · 372 B CSS (0) — — · — · —
lab/DiffViewer 92.3 kB (0) · 2.1 kB CSS (0) — — · — · —
lab/EmojiPicker 91.8 kB (0) · 751 B CSS (0) — — · — · —
lab/LineClamp 16.4 kB (0) · 168 B CSS (0) — — · — · —
lab/ListInput 92.9 kB (0) · 922 B CSS (0) — — · — · —
lab/Schedule 111.4 kB (0) · 3.9 kB CSS (0) — — · — · —
lab/SelectableCardGroup 68.6 kB (0) · 162 B CSS (0) — — · — · —
lab/TabBarMoreList 97.4 kB (0) · 1.8 kB CSS (0) — — · — · —
lab/TourStep 92.4 kB (0) · 691 B CSS (0) — — · — · —
lab/TransferList 107.1 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/TransferListSelector 115.9 kB (0) · 1.4 kB CSS (0) — — · — · —
richtext/RichTextEditor 303.7 kB (0) · 2.6 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 286.3 kB (0) · 454 B CSS (0) — — · — · —
richtext/RichTextView 281.4 kB (0) · 2.3 kB CSS (0) — — · — · —
Popover · Storybook 96.7 kB (−126 B) · 14.6 kB CSS (0) 1,540 (−23) ✓ · ✓ · ✓
lab/ChatReactionBar 113.1 kB (−127 B) · 1.1 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 112.0 kB (−130 B) · 773 B CSS (0) — — · — · —
lab/CommentComposer 158.1 kB (−136 B) · 1.9 kB CSS (0) — — · — · —
lab/CommentThread 360.2 kB (−136 B) · 2.4 kB CSS (0) — — · — · —
lab/Comments 367.2 kB (−143 B) · 2.5 kB CSS (0) — — · — · —
layer — — — · ✓ · —
Layer — — ✓ · ✓ · —
Visual changes: 4 snapshots in 1 component

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
Selector · Indicator Space Bottom Sheet Wide Start (neutral, dark) before frame after frame diff frame
Selector · Indicator Space Bottom Sheet Wide Start (neutral, light) before frame after frame diff frame
Selector · Indicator Space Bottom Sheet Narrow End RTL (neutral, dark) before frame after frame diff frame
Selector · Indicator Space Bottom Sheet Narrow End RTL (neutral, light) before frame after frame diff frame

Package size: @astryxdesign/core 7.48 MB packed (−410 B); no new dependencies.

Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 8e32a44

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 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.

Waiting on one owner decision. INV20 is approved at this head, and the design decision on file covers flipped layers. Approval waits on the owner confirming it also covers these two mouse and trackpad changes, or on gating them to touch input:

  • Every unflipped anchored-layer entrance that plays layerAnimations now scales about the point where the layer meets its trigger instead of its box center.
  • Selector's list that opens over its selected option no longer slides and only scales about the trigger's center.

No blocking defect found: the touch-growth fix matches the shared fixture, and the new browser cases pass in Chromium. CI has not run on this head yet because the pull request is a draft, so its checks still need to pass.

[Automated review]

Comment thread docs/architecture/layer-runtime.md Resolved
Comment thread packages/core/src/Selector/Selector.tsx Resolved
A show that places a layer afresh reads its side again after the
placement, by design. INV20 now says the one measurement pass holds for
a layer the show leaves in place, in its rule and its failure signal.
@vjeux

vjeux commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Both changes came from #10771, which has merged with the spec owner's approval. After this PR's merge of main, neither is in its diff.

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Waiting on one owner decision. The touch fix itself looks right. A Popover placed over its trigger now grows from where it meets the trigger. The shared-fixture tests fail on main in exactly the three overlap rows and pass here, and the mouse path is untouched.

Approval waits on an engineering owner approving the rewritten architecture:layer-runtime INV20 at this head. The earlier /approve-spec named an older head. Since then the branch merged main and reworded one INV20 sentence. Against the current record, INV20 now:

  • adds that Popover's touch growth starts from the point where the popover meets its trigger, and only scales over the trigger's center;
  • covers the shared entrance (layerAnimations) under every pointer, not only on the pointer path;
  • limits the one read per show to a layer that the show leaves in place.

An engineering owner records the decision by commenting /approve-spec 3df0122d6619693adf87be974e7e4a896dfc2f5e. The author may do this as an engineering owner. CI has not run on this draft head yet.

Both earlier inline notes are fixed at this head: the INV20 verification row and the Selector comment.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 3df0122

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Approved pending CI: CI has not run on this head yet. The pull request is a draft from a fork, so CI runs once it is marked ready for review and a maintainer adds the ci:run label.

Under a finger, a Popover that overlaps its trigger now grows from where it meets the trigger, by the same side rule as the mouse entrance; the shared-fixture tests fail on main in exactly the three overlap rows and pass here. The architecture:layer-runtime INV20 change is approved by an engineering owner at this head, and both earlier inline notes are fixed.

Automated review (maintainer link)

@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 11, 2026
@vjeux
vjeux marked this pull request as ready for review November 11, 2026 01:43
@vjeux
vjeux requested a review from cixzhang as a code owner November 11, 2026 01:43
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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.

Approved pending CI: CI has not run on this head yet. The pull request is a draft, so CI runs once it is marked ready for review.

Under a finger, a Popover that overlaps its trigger now grows from where it meets the trigger, by the same rule the pointer entrance uses. The layer-runtime record change has an engineering owner's approval for this head, and the shared fixture table fails on the base code in exactly the three overlap rows and passes here.

  • Non-blocking: the INV20 row in the layer-runtime verification table has no failure signal, unlike every other row; the merge of main dropped the one the earlier version carried.
Claims and files checked
  • Claim: under a finger, a Popover that overlaps its trigger grows from where it meets the trigger. Verified by the shared fixture table, which fails on the base code in the three overlap rows and passes here, and by touch frames.
  • Claim: a popover a few pixels over its trigger's side grows from that side, not from below. Verified: the origin moves from the top-left corner to the facing edge (fixture row and frames).
  • Claim: a popover over its trigger's center grows from that center by scale only. Verified: the length starts full and the frames show an even scale about the center.
  • Claim: every other landing grows as before, flipped ones included. Verified: the five clear rows pass on both builds, and the flipped-above frame is pixel-identical.
  • Claim: a mouse is unchanged. Verified: the touch growth runs only under a coarse primary pointer, and the browser spec's mouse case passes.
  • Claim: right to left needs nothing, because the side comes from physical boxes. Verified in the shared side helper.
  • Claim: Reduced Motion is unchanged. Verified: the Reduce Motion unit and browser cases pass.
  • Claim: both unit suites read one fixture table. Verified.
  • Claim: the record now covers the shared entrance, one read per show for a layer left in place, and where the touch growth starts. Verified against the layer runtime code.
  • Claim: no public API change, the side helper changes only its header comment, the private helpers in the frame module are removed, and only a test fixture is added. Verified.
  • Claim: the merge adds the step room to the shared table, and the touch growth reads only the side and point. Verified.
  • Claim: Selector loses one comment that restated its code. Verified.
  • Claim: the size is +336/−112, split as source +20/−43, tests +296/−61, records and docs +20/−8. Verified.
  • Claims about the author's full-suite, WebKit, accessibility, CLI and bundle-size runs: not re-run here. The relevant unit suites and the Chromium touch spec re-run here pass, and the CLI package is untouched.
  • Files: the changeset, the three Layer files, the two Popover test files, popoverSurfaceFrame.ts and Selector.tsx are clear. docs/architecture/layer-runtime.md has one non-blocking note.

Automated review (maintainer link)

Comment thread docs/architecture/layer-runtime.md Resolved
@vjeux
vjeux marked this pull request as ready for review November 12, 2026 22:21
github-actions Bot added a commit that referenced this pull request Nov 12, 2026
@vjeux
vjeux marked this pull request as draft November 13, 2026 02:44

@kentonquatman kentonquatman 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.

Design looks good 👍

@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Nov 13, 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.

Approved pending CI: CI has not run on this head yet. The pull request is a draft, so CI runs once it is marked ready for review.

Under a finger, a Popover that overlaps its trigger now grows from where it meets the trigger, by the same rule the pointer entrance uses. The layer-runtime record change carries an engineering owner's approval for this head, and the shared fixture table fails on the base code in exactly the three overlap rows and passes here.

  • Non-blocking: the INV20 row in the layer-runtime verification table still has no failure signal, unlike the other rows in that table.
Claims and files checked
  • Claim: under a finger, Popover used its own side rule (widest gap, overlaps growing from below), and the two rules disagreed only where a popover overlaps its trigger. Verified: the removed code in the Popover frame module, and the shared fixture's five clear rows pass on the base code.
  • Claim: both entrances now read one rule. Verified: the touch growth calls the shared side helper.
  • Claim: a popover a few pixels over its trigger's side grows from that side, not from below. Verified: fixture row and frames (origin moves from the top-left corner to the facing edge, growth turns sideways).
  • Claim: a popover over its trigger's center grows from that center by scale only. Verified: its length starts full, and the frames show an even scale about the center.
  • Claim: every other landing grows as before, flipped ones included. Verified: the clear fixture rows pass on both builds and the flipped frame is pixel-identical.
  • Claim: no current record decides where the touch growth starts over an overlap, and the record now says so. Verified against the current layer-runtime, touch-presentation and Popover records and the head's INV20.
  • Claim: the record also names the shared entrance and scopes its one read per show to a layer left in place. Verified against the layer runtime code.
  • Claim: the record change needs the spec owners' approval at this head. Satisfied: the spec-owner status succeeds for this head.
  • Claim: both unit suites read one fixture table. Verified.
  • Claim: a mouse is unchanged. Verified: the touch growth runs only under a coarse primary pointer, and the browser spec's mouse case passes.
  • Claim: right to left needs nothing, because the side comes from physical boxes. Verified in the shared side helper.
  • Claim: Reduced Motion is unchanged. Verified: the Reduce Motion browser case passes.
  • Claim: Selector only loses one comment that restated its code. Verified.
  • Claim: no public API change; the side helper changes only its header comment; the frame module's private helpers go away; only a test fixture is added. Verified, including a build-and-compare of the published surface (no rows).
  • Claim: the size is +336/−112 (source +20/−43, tests +296/−61, records and docs +20/−8). Verified.
  • Claim: since the previous merge, main changed none of this pull request's files or direct imports. Verified.
  • Claim: on the base code the shared table fails in exactly the three overlap rows. Verified.
  • Claims about the author's WebKit, accessibility, full-suite, lint, CLI, bundle-size and device runs: not re-run here. The relevant unit suites and the Chromium touch spec re-run here pass.
  • Files: the changeset, the three Layer files, the two Popover test files, the Popover frame module and Selector.tsx are clear; docs/architecture/layer-runtime.md has one non-blocking note.

Automated review (maintainer link)

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 13, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec fb34403

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 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.

Approved pending CI: CI has not run on this head yet. The pull request is a draft, so CI runs once it is marked ready for review.

Under a finger, a Popover that overlaps its trigger now grows from where it meets the trigger, through the same side rule the pointer entrance uses. The shared-fixture unit tests and the new browser cases fail on main's code only in the overlap landings and pass here, the mouse path is untouched, and the INV20 change carries an engineering owner's approval for this head.

  • Non-blocking: INV20's verification row in docs/architecture/layer-runtime.md has no failure-signal cell, unlike every other row in the table; consider restoring one.
Claims and files checked
  • Claims
    • Changeset: an overlapping popover under a finger grows from where it meets its trigger. Verified: the overlap fixture rows and the two overlap browser cases fail on main's code and pass here.
    • Changeset: a popover a few pixels over the trigger's side grows from that side, and one over the trigger's center only scales. Verified by the fixture rows and the held frames at 60 ms.
    • Changeset and description: every other landing, flipped ones included, grows as before. Verified: the five clear fixture rows and the flipped browser case pass on both.
    • Description: the old rule took the widest gap and grew any overlap from below. Verified against the code popoverSurfaceFrame.ts removes.
    • Description: one fixture table feeds both unit suites. Verified.
    • Description: a mouse is unchanged, and right to left and reduced motion need nothing. Verified: the growth runs only under a coarse pointer, it reads physical boxes, and the reduced-motion case passes.
    • Description: no public API changes, no module is added, and Popover's private helpers go away. Verified: the built API surfaces compare with zero rows.
    • Description: the size is +336/−112 lines. Verified.
    • Description: the record change needs owner approval at this head. Verified, and the approval is given.
    • Description: the full-suite, WebKit, CLI and bundle-size results are the author's runs. The Layer and Popover unit suites and the Popover touch browser spec in Chromium were re-run here and pass.
  • Files
    • .changeset/popover-touch-side-rule.md: clear
    • docs/architecture/layer-runtime.md: one non-blocking note
    • packages/core/src/Layer/__tests__/layerEntranceSide.fixture.ts: clear
    • packages/core/src/Layer/layerEntranceSide.test.ts: clear
    • packages/core/src/Layer/layerEntranceSide.ts: clear
    • packages/core/src/Popover/__tests__/PopoverTouchMotion.interaction.browser.spec.ts: clear
    • packages/core/src/Popover/popoverSurfaceFrame.ts: clear
    • packages/core/src/Popover/popoverSurfaceMotion.test.ts: clear
    • packages/core/src/Selector/Selector.tsx: clear

Automated review (maintainer link)

| INV18 | `useLayer.test.tsx` (a closed trigger has no anchor-name, and the trigger of a shown or fading layer does) and `TooltipClosedTriggerAnchor.interaction.browser.spec.ts` in Chromium and WebKit | A closed trigger with an anchor-name, a shown or fading layer placed away from its anchor, or a surface around a closed trigger that stops while the main thread is busy |
| INV18 | `useLayer.test.tsx`: a closed state that declares a discrete `display` transition or a keyframe animation keeps the trigger's anchor name until those animations end, read from the closed state's style; a layer whose closed state declares neither is not read for animations at the close | A layer with such a closed-state exit placed away from its anchor while it fades, or an animation read on the close of a layer whose closed state declares no exit |
| INV20 | `layerEntranceSide.test.ts` for the side, the meeting point and a step that stops at the room to a sized trigger, with no step for a layer flush against or over it, and `LayerEntranceSide.interaction.browser.spec.ts` in Chromium and WebKit for the first frame of each anchored layer that flips |
| INV20 | `layerEntranceSide.test.ts` and `popoverSurfaceMotion.test.ts`, which read one fixture table, for the side and the meeting point; `layerEntranceSide.test.ts` also for a step that stops at the room to a sized trigger, with no step for a layer flush against or over it; `LayerEntranceSide.interaction.browser.spec.ts` in Chromium and WebKit for the first frame of each anchored layer that flips, and `PopoverTouchMotion.interaction.browser.spec.ts` in Chromium and WebKit; `useLayer.test.tsx` |

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.

Non-blocking: this row has no failure-signal cell, while every other row in the table has one. Consider restoring it with main's step clause, for example: "A flipped layer whose first frame moves onto its trigger, a step past the room to a sized trigger, an origin off the point where the layer meets its trigger, a layer over its trigger that steps, a touch growth that starts anywhere else, or a show that reads a layer left in place twice."

@vjeux
vjeux marked this pull request as ready for review November 13, 2026 05:50
@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) and removed ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) labels Nov 13, 2026
github-actions Bot added a commit that referenced this pull request Nov 13, 2026
@cixzhang
cixzhang merged commit e372e39 into meta:main Nov 13, 2026
139 checks passed
@vjeux
vjeux deleted the layer-side-rule branch November 13, 2026 09:02

This branch was successfully deployed

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

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants