Skip to content

fix(core): a block-edge reveal slides its parts on the glide's frames - #10296

Merged
cixzhang merged 10 commits into
meta:mainfrom
vjeux:uikit/c11b-reveal-ride
Nov 6, 2026
Merged

cixzhang merged 10 commits into
meta:mainfrom
vjeux:uikit/c11b-reveal-ride

Conversation

@vjeux

@vjeux vjeux commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

User impact

On an iPhone, a Collapsible, TreeList row or Table panel with an animatedLayout handle shows a band, then an overlap, beside its revealed content for a few frames.

Problem and solution fit

The reveal moved a clip-path, which WebKit paints on the main thread, while the content after it glides by a composited translate: same start and keyframes, different clocks.

Now the element's child elements in the band slide on the glide's frames under a still clip at its content box, and the element fades: one clock for both edges. Text of its own, a child a translation cannot move, or a box it paints (Table's muted panel) keeps the moving clip.

Expected behavior and authority

spec:AST-105 FR9: the moving edge and the content on that side move on one motion, "so the content beside the edge glides with it and no gap opens". FR9 now states the slide and fallbacks, architecture:react-component-runtime INV12 bounds its descent, and component:Table records the panel row's gap: Specs decision, Nov 6 2026 (consistency amendment; rationale: "the clip-only reveal drifts 3–5 frames on iOS WebKit; moving the band's own children keeps INV12's cost bound"). component:Collapsible AV5 marks its region's new inner element internal.

Smallest restoration

Only block-edge reveals and conceals change, on every engine: content slides in from its edge instead of a wipe. Inline edges follow separately.

Evidence

  • iOS Simulator: TreeList's expand showed a 14, then 23 px band, then 11→0 px overlaps over 8 frames; now rows keep their 42 px pitch within 1 px. Collapsible's 24–30 px bands are gone.
  • WebKit (CI profile): the new per-frame paint test fails 5 of 6 base runs and passes now; Chromium passes both.
  • Glide byte-identical: followers' keyframes and timing match the base in Collapsible (4), TreeList (6), Table (7) and AppShell (2).
  • Nested change, "Trips" 120 ms after "Photos": at 17c9f15 Party.jpg dropped over Documents (before); now the rows meet (after).
  • Slowed 4×, desktop with a mouse: Collapsible: desktop before, after; iPhone before, after. TreeList: desktop before, after; iPhone before, after. Table: desktop before, after; iPhone before, after. AppShell (unchanged): desktop before, after; iPhone before, after.

Writing rubric results

R1 narration: none. R2 research: none. R3 evidence: INV12's verification row names the new failures; the boundary and paint tests cover them. R4 rejected alternatives: none. R5 change references: none. R6 open questions: none.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  1. On an iPhone, in Storybook's "Animated layout" story, open "Shipping details": the content slides down under the trigger as the content after it glides, with no band between them. Close it: no overlap.
  2. Expand and collapse "Documents" in the same story's tree: the same.
  3. Open a row in TableRowExpansion's "Gliding rows" story: the panel slides in as the rows after it glide, and its divider rides its bottom.
  4. On a desktop browser with a mouse, Collapsible, TreeList and Table panel content now slides in from under its trigger or row instead of being uncovered in place.
  5. In the same story, expand "Photos", then "Trips" at once: the rows after Trips glide down with its rows, and none jumps.

What was run at dbe8bcf (WebKit in the Linux CI image):

  • check:repo, check:knowledge, changeset coverage and review:pre pass. CI=true pnpm lint: 0 errors. Core tsc: 0 errors.
  • Motion, TreeList and AppShell interaction specs, the paint test among them: Chromium 141 passed; WebKit 137 passed, 4 skipped. The new nested-change paint case fails at 17c9f15's runtime.
  • Collapsible, Table row glide and TreeList a11y specs, the divider case among them: Chromium 59 passed; Table row glide in WebKit 13 passed. TableRowExpandSlot: 1 passed in each engine.
  • Motion, Collapsible, Table and TreeList units: 1,832 passed. test:ui: 896 files, 21,934 tests. test:node: 936 files, 16,938 tests. No unhandled errors.

@vercel

vercel Bot commented Nov 6, 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 6, 2026 7:45pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 6, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 6, 2026
@github-actions
github-actions Bot requested a review from cvkxx November 6, 2026 15:15
@astracat-bot

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 8:02 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · dbe8bcf

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
TableBody 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableFooter 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableHeader 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
14 more components
Component Size LoC Visual · A11y · RTL
TableRow 6.7 kB (−1 B) · 3.9 kB CSS (0) — ✓ · ✓ · ✗
PowerSearch 272.5 kB (+1.4 kB) · 23.1 kB CSS (0) — — · — · —
TreeList 42.5 kB (+1.4 kB) · 5.4 kB CSS (0) — — · — · —
Collapsible 26.1 kB (+1.3 kB) · 4.5 kB CSS (0) — ✓ · ✓ · ✓
AppShell 81.5 kB (+3 B) · 12.8 kB CSS (0) — — · — · —
CollapsibleGroup 6.6 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✓
Markdown 162.2 kB (0) · 19.5 kB CSS (0) — — · — · —
SideNav 81.2 kB (0) · 10.7 kB CSS (0) — — · — · —
Table 99.9 kB (0) · 17.3 kB CSS (0) — ✓ · ✓ · —
TableCell 91.7 kB (0) · 17.0 kB CSS (0) — ✓ · ✓ · ✓
TableHeaderCell 91.3 kB (0) · 16.8 kB CSS (0) — ✓ · ✓ · ✓
TableSelectionToolbar 61.3 kB (0) · 12.4 kB CSS (0) — ✓ · ✓ · ✓
lab/Comments 306.5 kB (0) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 301.4 kB (0) · 2.4 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 6.79 MB packed (+6.3 kB); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.

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


Generated by PR Enrichment workflow | View full report

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

Approval waits on an engineering owner's spec decision and three fixes.

Spec decision. This pull request changes current spec text: spec:AST-105 FR4 moves the glide to --duration-medium (with a new DEC-3), FR9 says a block-edge reveal slides its children under a still clip, architecture:react-component-runtime INV12 lets the walk descend into the changed element's children and adds two verification failures, and component:Collapsible gains AV5. An engineering owner records the decision by commenting /approve-spec 362167ec0ae8b34859c44840fbb498b4ccfd3520 on this pull request; the author may do so as an engineering owner.

Blocking:

  • docs/specs/components/Table/Table.spec.md says expanded panel rows keep the moving clip, but in the "Gliding rows" story the default (transparent) panel's cell slides and only panelVariant="muted" keeps the clip, so the bullet should name the filled panel.
  • The Table test in animatedLayoutRevealPaint.interaction.browser.spec.ts reads [data-expansion-panel] > * after the panel has closed and unmounted, so cells.every(...) passes on an empty list; read the cells while the panel is open and assert a slide for the default panel and none for the muted one.
  • The description says desktop looks as before, but on every pointer the revealed content now slides in from the moving edge instead of being uncovered in place; please say so and show a mouse before and after.

This branch also carries #10261's duration change; adding Stack: #10261 → #10296 to both descriptions, or rebasing once #10261 lands, lets each be reviewed on its own change.

[Automated review]

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

Approval waits on an engineering owner's spec decision and two fixes.

Spec decision. This pull request changes current spec text: spec:AST-105 FR4 moves the glide to --duration-medium (with a new DEC-3), FR9 says a block-edge reveal slides its children under a still clip, architecture:react-component-runtime INV12 lets the walk descend into the changed element's children and adds two verification failures, component:Collapsible gains AV5, and component:Table records the muted panel's gap. An engineering owner records the decision by commenting /approve-spec a852fefc8bab996b27b8db0df5435ae4c775258a on this pull request; the author may do so as an engineering owner.

Blocking:

  • Miss: when a Table row's detail panel opens, the divider under it is missing for the whole glide, because markGlidingRows in packages/core/src/Table/glidingDivider.ts measures the panel cell after its slide has moved it up (offset -109px in the "Gliding rows" story), so read that offset before the entrance starts and cover the panel's divider mid-open in TableRowGlide.a11y.browser.spec.ts.
  • The description says desktop looks as before, but on every pointer the revealed content now slides in from the moving edge instead of being uncovered in place, so please say so and give mouse before-and-after results.

This branch also carries #10261's duration change; adding Stack: #10261 → #10296 to both descriptions, or rebasing once #10261 lands, lets each be reviewed on its own change.

[Automated review]

vjeux added 4 commits November 6, 2026 08:33
A block edge's reveal or conceal clipped the element with a moving
clip-path. WebKit paints that clip on the main thread while the content
beside it glides on the compositor, so on iOS the two parted for a few
frames. The element's child elements that the band can show now slide
on the glide's frames under a still clip on its box, and the two share
one clock. An element with text of its own keeps the clip. Collapsible's
region wraps its children in one element so they slide. The glide's
timing and curve are unchanged.
The default panel row slides its cell, and one that paints its own box
keeps the moving clip. Table's record scopes its gap to the muted panel.
The panel's divider offset was read after its entrance had started, when
its cell had already slid up by the panel's height, so the line hung
above the panel's clip for the whole glide. The offset is now read with
the panel's other borders, before its entrance moves its cell.

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

Approval waits on an engineering owner's spec decision and two fixes.

Spec decision: an engineering owner approves or amends the proposed changes by commenting /approve-spec dbe99e3d6366c9cb25575331ee97f7d951c2844d on this pull request; the author may do so as an engineering owner. The changes are the spec:AST-105 FR9 slide sentence, the architecture:react-component-runtime INV12 descent and its two verification failures, component:Collapsible AV5, and the component:Table muted-panel gap, and the approval also covers the slide mouse users now see.

Blocking:

  • Miss: while a default Collapsible with animatedLayout opens or closes, the sliding lines run into the trigger label's descenders, because the still clip sits at the region's border box and the trigger's trimmed label hangs below the button, so the clip should start at the region's content box, with a paint case that checks it mid-open.
  • Miss: the changeset says Table's row expansion now slides and stays with the content on iOS, but a panelVariant="muted" panel keeps the moving clip and its drift, so please name that exception there.

[Automated review]

Comment thread .changeset/edge-reveal-slide.md Resolved
The still clip sat on the element's border box, so the sliding parts
passed through its padding, where the content before it can draw: a
Collapsible trigger's label descenders hang there. The clip now starts
at the content box on the side the parts come from. The changeset names
the muted Table panel, which keeps the moving clip.
@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 6, 2026
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 17c9f15

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

Changes requested: two fixes before this can land.

  • Miss: expanding a nested row while its parent's reveal is still sliding (for example "Trips" within 120 ms of "Photos" in the Animated layout story) makes the rows after it jump to their final places and opens a 45 px gap, with Party.jpg drawn over Documents, because the follower pass counts a part's running slide as motion the app owns (animatedLayout.ts:637, :1501); carry the slide into that part's glide and add a paint case for a nested change mid-slide.
  • Miss: the title says every edge reveal slides, but only block edges do (animatedLayout.ts:1745), so please retitle it "fix(core): a block-edge reveal slides its parts on the glide's frames".

The spec changes are approved for this head, the earlier trigger-label collision, changeset wording and Table divider findings stay fixed, and three optional comment suggestions are inline.

[Automated review]

A second change in the area, such as a nested row expanding while its
parent's group still slides, read a part's running slide as the app's
own move. The part then landed at once, and the rows after it jumped.

A part's slide is now its glide, so the next change carries its rest
into the part's new glide. A ride reads each glide on its own clock, so
a nested reveal rides a neighbour that an earlier change set moving.
@vjeux vjeux changed the title fix(core): an edge reveal slides its parts on the glide's frames fix(core): a block-edge reveal slides its parts on the glide's frames Nov 6, 2026
A ride retimes a slide, so the part's glide reads the slide's length off
the slide. It records the part's ancestors' scale, read with the part's
box. A part that an earlier change still glides keeps that glide, and
the element keeps the moving clip.

@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 because the pull request is still a draft, and it runs once the pull request is marked ready for review.

Both earlier findings are fixed: a nested row expanded while its parent's group still slides now glides with the rows after it, and the title now says block-edge. The spec changes carry an engineering owner's approval for this head. A few optional suggestions are inline: name the still-gliding-part fallback in FR9 at its next edit, forget a cancelled slide's glide in the two fallback branches, and five comment rewordings.

[Automated review]

if (box.bottom >= band.start) {
// A part an earlier change still glides keeps that glide, which a slide
// would hide and then show again. The element keeps the moving clip.
if (glides.has(node as Element)) {

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: FR9's approved sentence lists the elements that keep a moving clip (text of its own, a child a translation cannot move, a box or generated box it paints), but not an element whose part still glides from an earlier change, which this check adds. The behaviour here is the base's and serves FR3, so naming the case at FR9's next edit keeps the record exact.

if (animation != null) {
if (animation == null) {
for (const part of partMotions) {
part.cancel();

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: now that a slide is registered as the part's glide, part.cancel() leaves it in glides, so a later reveal of this element finds a gliding part and keeps the moving clip. stopGlideOf(part) cancels it and forgets it; the same applies to holdLayoutExit's fallback at line 2664.

Comment on lines +2285 to +2286
// An exit's slide then holds its end until the release. The element is
// inert and has given up its space by then.

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 (INV29): this sits above the code that forgets a finished slide but does not say so. Suggested: "A finished slide is no glide. An exit's slide holds its end until the release, but the element is inert and has given up its space, so no later change carries it."

return duration > 0 ? duration : fallback;
}

/** Each part's slide, by its motion: a stopped slide is no glide. */

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 (INV29): "Each part's slide, by its motion" reads as the reverse of this map, which goes from a slide to its part. Suggested: "The part each slide moves, so stopping the slide also forgets it as that part's glide."

readonly animation: Animation;
/** The fraction of the element it shows `t` ms in (1: all of it). */
shownAt: (t: number) => number;
/** The parts that slide under the element's clip, and their motions. */

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 (INV29): this holds only the slide animations, not the parts. Suggested: "The parts' slide animations."

}

/** Stops `motion`'s sliding parts and puts back the element's clip, once. */
function stopSlides(motion: EdgeMotion): void {

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 (INV29): stopSlides only calls motion.release(); calling release() at its two callers lets this wrapper and its comment go.

Comment on lines +1803 to +1804
// The parts come in from one side. The clip holds them inside the content
// box there, off what the content before the element draws into its padding.

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 (INV29): for a block-start edge the clip sits at the bottom, where no content before the element draws. Suggested: "The clip holds them inside the content box on that side, off what a neighbour draws into the padding."

@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec dbe8bcf

@vjeux
vjeux marked this pull request as ready for review November 6, 2026 20:50
@cixzhang
cixzhang merged commit 0ecd324 into meta:main Nov 6, 2026
155 of 161 checks passed
@vjeux
vjeux deleted the uikit/c11b-reveal-ride branch November 6, 2026 22:13

This branch was successfully deployed

1 active deployment
Preview — dbe8bcf6 Deployed Nov 6, 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.

2 participants