Repository navigation
feat(TreeList): the expand moves as one under a finger - #8088
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
f912e37 to
d8e3297
Compare
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TreeList · Storybook | 43.9 kB (+661 B) · 5.6 kB CSS (+12 B) | 1,220 (+42) | ✓ · ✓ · ✓ |
| PowerSearch | 282.0 kB (+452 B) · 23.5 kB CSS (0) | — | — · — · — |
| List | 17.6 kB (0) · 651 B CSS (0) | — | ✓ · ✓ · — |
1 more component
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ListItem | 68.6 kB (0) · 11.3 kB CSS (0) | — | ✓ · ✓ · ✓ |
Package size: @astryxdesign/core 6.97 MB packed (+1.6 kB); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 29 rows, core 39 rows; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approval is on hold for an owner decision: the TreeList touch expansion, its new followingContent prop, the transient translate TreeList writes onto page content below it, and the rest of the touch stack (List row heights, holdSelection, the adaptive threshold) have no current spec, and spec:AST-094 is still a draft. An engineering owner records that decision by commenting /approve-spec <full head SHA> once the records describe these behaviors (the author may do so as an engineering owner), and independently of it the change needs these fixes:
- Merge the predecessor PRs first so this one is only its two TreeList commits, since the diff now carries 15,771 authored lines.
- In
useTreeExpansionMotion, add an effect cleanup so an unmount mid-collapse cannot leave page content translated, and release each row's inlinetranslatewhen its own spring settles.
[Automated review]
a448c3b to
02811f3
Compare
02811f3 to
4f2fd44
Compare
There was a problem hiding this comment.
Approval is on hold for an owner decision: the TreeList touch expansion, its new followingContent prop, the transient translate it writes onto page content outside the tree, and the rest of the touch stack (List row heights, holdSelection, the adaptive threshold) have no current spec, and spec:AST-094 is still a draft. An engineering owner records that decision by commenting /approve-spec <full head SHA> once the records describe these behaviors, including whether the slide stays under Reduce Motion (the author may do so as an engineering owner). Independently of that decision, the change needs these fixes:
- Land the predecessor PRs first so this one is only its two TreeList commits; the diff now carries 16,735 authored lines.
- In
useTreeExpansionMotion, return an effect cleanup so an unmount mid-collapse cannot leave page content translated, and release each element's inlinetranslatewhen its own spring settles. - Move content below the tree by its measured layout change instead of the group height, so content layout does not move (a footer below a taller column) stops sliding.
[Automated review]
4f2fd44 to
bea7d0f
Compare
There was a problem hiding this comment.
Approval is on hold for an owner decision: the TreeList touch expansion, its new followingContent prop, the transient translate it writes onto page content outside the tree, and the rest of the touch stack (List row heights and dividers, holdSelection, the adaptive threshold) have no current spec, and spec:AST-094 is still a draft. An engineering owner records that decision by commenting /approve-spec <full head SHA> once the records describe these behaviors, including whether the slide stays under Reduce Motion (the author may do so as an engineering owner). Independently of that decision, the change needs these fixes:
- Land the predecessor PRs first so this one is only its two TreeList commits; the diff now carries 17,240 authored lines.
- In
useTreeExpansionMotion, return an effect cleanup so an unmount mid-collapse cannot leave page content translated, and release each element's inlinetranslatewhen its own spring settles. - Move content below the tree by its measured layout change instead of the group height, so content that layout does not move (a footer below a taller column) stops sliding.
- In
spec:AST-094, fix FR7's reference to an AST-090 record that does not exist in the repository.
[Automated review]
bea7d0f to
c1d18da
Compare
There was a problem hiding this comment.
Approval is on hold for an owner decision: the TreeList touch expansion, its new followingContent prop, the transient translate it writes onto page content outside the tree, and the rest of the touch stack (List row heights and dividers, holdSelection, the adaptive threshold) have no current spec, and spec:AST-094 is still a draft. An engineering owner records that decision by commenting /approve-spec <full head SHA> once the records describe these behaviors, including whether the slide stays under Reduce Motion (the author may do so as an engineering owner). Independently of that decision, the change needs these fixes:
- Make
HoldCurveTiming'scurveoptional, or pass a curve from the new "Back, slowly" story button, so the Storybooktypecheckcheck and thebuildgate pass again. - In
useTreeExpansionMotion, return an effect cleanup so an unmount mid-collapse cannot leave page content translated, and release each element's inlinetranslatewhen its own spring settles. - Move content below the tree by its measured layout change instead of the group height, so content that layout does not move (a footer below a taller column) stops sliding.
- Land the predecessor PRs first so this one is only its two TreeList commits; the diff now carries 17,251 authored lines.
- In
spec:AST-094, fix FR7's reference to an AST-090 record that does not exist in the repository.
[Automated review]
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this head's spec changes: component:TreeList FR8 (the touch glide and slide inside the tree) and DD5, and the records this branch brings from #10296 (spec:AST-105 FR9's block-edge slide, architecture:react-component-runtime INV12's child walk, component:Collapsible AV5 and component:Table's muted-panel gap). An engineering owner records that decision by commenting /approve-spec 6995cb02dea3cda352eca5bfd85bbc722e1f5105 on this pull request, and the author may do so as an engineering owner.
These need fixing either way:
- At 2,535 authored lines this pull request carries all eight #10296 commits (1,171 lines) beside its own TreeList commits, so please land #10296 first or drop those commits so this one carries only the TreeList change.
- The description still says a collapse removes the group at the tap, the rows below move at once, there is no caller burden and FR8 is approved, while this head glides the rows below, keeps a collapsing group inert and fading, wraps every Collapsible's content in a new element and has no approval for this head, so please update it, including the #10296 changes and the evidence.
The guide lines now start at their row wrapper's top edge and match main at rest, including at a widened row gap. One optional addition: the touch collapse case could assert that the leaving group is inert, as FR8's verification row says it does.
[Automated review]
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this head's spec changes: component:TreeList FR8 (the touch glide inside the tree) and DD5, and the records this branch brings from #10296 (spec:AST-105 FR9's block-edge slide, architecture:react-component-runtime INV12's child walk, component:Collapsible AV5 and component:Table's muted-panel gap). An engineering owner records that decision by commenting /approve-spec 274ff878117c4b43ab8382d5333d1e42ef0054a0 on this pull request (the author may do so as an engineering owner), and the two points below need fixing either way:
- At 2,766 authored lines this pull request carries all ten #10296 commits (1,402 lines) beside its own TreeList commits, so please land #10296 first or drop those commits so this one carries only the TreeList change.
- The description still says a collapse removes the group at the tap, the rows below move at once, there is no caller burden and FR8 is approved, while this head glides the rows below, keeps a collapsing group inert and fading, wraps every Collapsible's content in a new element and has no approval for this head, so please update it, including the #10296 changes and the evidence.
The two #10296 commits added since the last review keep a nested row opened mid-slide in step with the rows after it, and that case passes here while it fails against main. One optional addition: the touch collapse case could assert that the leaving group is inert, as FR8's verification row says it does.
[Automated review]
Under a coarse pointer without a handle, the tree runs its own animated layout: the rows below glide on the shared glide while the group slides and fades on its frames, and the chevron turns on the same timing. The tree clips its bottom edge while it moves. Each row draws only its own part of the guide lines, reading each column from the ancestor whose connector sits there. TreeList FR8 takes the spec owners' wording, and the guide behavior is a proposed design decision (DD5).
Inside the padded row wrapper, the absolute guide container took its static place at the wrapper's content edge, so each segment started half a row gap low and a last connector ran half a gap past its row. It now starts at the wrapper's top edge.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this head's spec changes:
component:TreeListFR8: the touch glide inside the tree, including the bottom-edge clip, which FR8 does not yet describe.- The new DD5: guide lines that show and hide with their rows. This also changes trees under a mouse.
- Whether TreeList joins the components
architecture:react-component-runtimeINV12 names as holding their own animated-layout handle.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on the head that carries it (for this head, /approve-spec c0f5381af76b044e4b748a2160dca12eb42898de). The author may do so as an engineering owner. Two points need fixing either way:
- Miss: the changeset, the description and the record's Compatibility lines say trees driven by a mouse are unchanged, but the per-row guides change them at rest (a guide no longer runs on beside an expanded last row's children), so please describe that change for every pointer.
- Miss: under a finger,
TreeListnow creates its own animated-layout handle, butarchitecture:react-component-runtimeINV12 names only AppShell's content area, the SideNav rail and the resize controller as holders, so please add TreeList there (and tospec:AST-105FR2's list) for the same approval.
The earlier points are resolved. #10296 has landed, so this pull request carries only the TreeList change, and the guide lines at a wide row gap and in the Themed guides story now meet their rows. One optional addition: the touch collapse case could assert that the leaving group is inert, as FR8's verification row says.
[Automated review]
A guide line now ends at the last row it joins under every pointer, so the release note says so instead of calling mouse trees unchanged. The touch collapse case also checks that the leaving group is inert while it fades.
TreeList's compatibility lines say the Guide lines change under every pointer (DD5). INV12 and AST-105 FR2 name TreeList among the components that animate their own change: under a coarse pointer and without a handle from the app, it holds its own for its expand and collapse.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this head's spec changes:
component:TreeListFR8: under a coarse pointer and without ananimatedLayouthandle, the tree plays the shared layout glide inside itself, including the bottom-edge clip while it moves, which FR8 does not yet state.- DD5: guide lines that show and hide with their rows and end at the last row they join, a change that also reaches mouse trees at rest.
- The
architecture:react-component-runtimeINV12 andspec:AST-105FR2 lines that name TreeList's own handle.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner.
These need fixing whatever the decision:
- Miss:
TreeList.tsx:320-323re-creates the body ofuseAnimatedLayoutinstead of callinguseAnimatedLayout({containerRef: treeElementRef}), so a later change to how handles are made would silently miss TreeList. - DD5 (
TreeList.spec.md:225) still scopes itself to "under a coarse pointer", while the record's Compatibility lines and the per-row guides apply it under every pointer. - Miss: DD5's "Proposed:" prefix and its sentence about the card describe a decision process rather than the system, so the record would still read as undecided after approval.
The earlier changeset, INV12 and inert-assertion findings are fixed.
[Automated review]
|
/approve-spec 853b61f |
AST-105 keeps both lines: DEC-3 names List among the glide's adopters, and FR2 names TreeList's own handle under a coarse pointer.
Under a coarse pointer, a tree with no handle from the app made its own with createAnimatedLayout, the body of useAnimatedLayout copied. It now calls useAnimatedLayout with the tree element's ref, so a later change to how handles are made reaches TreeList too.
Card 88b passed, so DD5 drops its "Proposed:" prefix and its sentence about the card. Its scope says what the record's Compatibility lines and the guides already do: a Guide ends at the last row it joins under every pointer, and shows and hides with an entering or leaving group.
|
/approve-spec 50fa230 |
There was a problem hiding this comment.
Changes requested for one test fix; the spec changes are approved for this head.
- Regression: since
mainwas merged in, the interaction harness'sarmHoldandanimationStoryboardrequire ajudgesoption, andTreeListExpand.interaction.browser.spec.tslines 672, 705, 714, 781 and 865 omit it, so the core type check fails and four of the spec's cases (both Reduce Motion cases, content after the tree, and the storyboard) throw before they check anything.
The earlier useAnimatedLayout and DD5 findings are fixed, and in Chromium the touch glide, the moving clip and the per-row guides behave as FR8 and DD5 describe.
[Automated review]
Since main was merged in, armHold and animationStoryboard need the motion a hold judges, and TreeListExpand's five holds named none, so the type check failed and four cases threw before they checked anything. Each now names the motion it reads: the chevron's transform, the group's opacity, and the row below's translate.
|
/approve-spec 47024c8 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it runs once the pull request is marked ready for review.
The interaction-harness holds in TreeListExpand.interaction.browser.spec.ts now name the motion each one judges, so the core type check is clean and the FR8 browser spec passes in Chromium, its Reduce Motion and content-after cases included. The spec changes are approved for this head.
- Optional: the comment above
MOVING_CLIPinTreeList.tsx(lines 62-65) has a sentence fragment; for example, "Rows that glide up into a shorter tree show only inside it, so they never paint over the content after it. Only the bottom edge clips, past the reach of a row's focus ring."
[Automated review]
The expand and collapse proofs counted the frames that showed the row below inside its travel. A WebKit runner presented none for 609 ms of a 300 ms glide, so one frame landed there and the expand failed on a bare count. The proofs keep their minimums (two frames inside the travel, five of the leaving group, three of its fade) as requireFrames floors, so a page starved of frames fails by name. A hold armed before the tap then seeks the glide to where the theme's move curve covers a fifth to four fifths of the way: the row is inside its travel at each point, in order, and a leaving group stays there, inert and fading.
|
/approve-spec 4b04c01 |
There was a problem hiding this comment.
Approved: CI passes on this head, and the spec changes carry an engineering owner's approval for it.
Since the last review, the expand and collapse proofs in TreeListExpand.interaction.browser.spec.ts keep their frame minimums as named requireFrames floors and then seek the held glide along the theme's move curve, so they no longer rest on how many frames a runner happens to draw. TreeList's interaction specs pass in Chromium and WebKit, the core type check is clean, and product code and records are unchanged.
One optional cleanup stays open from earlier: the comment above MOVING_CLIP in TreeList.tsx still has a sentence fragment.
[Automated review]
|
/approve-spec 4252b6c |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
Since the last review, only main was merged in, with no conflict resolution. With it, TreeList's interaction specs pass in Chromium and WebKit, the TreeList and animated-layout unit tests pass, and the core type check is clean. The spec changes carry an engineering owner's approval for this head.
One optional cleanup stays open from earlier: the comment above MOVING_CLIP in TreeList.tsx still has a sentence fragment.
[Automated review]
There was a problem hiding this comment.
Changes requested: one test fix, found by CI.
- Found by CI:
expand under a fingerinTreeListExpand.interaction.browser.spec.tsfails the required WebKit leg withFrameStarvationErroron this head (one frame in the glide, then 89 ms with none), as it did in the previous head's second CI run, so the smallest fix is to warm the page before this proof records, for example with an untimed expand and collapse followed bytreeAtRest, as the collapse proof already does.
The same leg also failed a harness case this pull request does not touch (harness.interaction.browser.spec.ts:434), which a re-run may clear. The spec changes carry an engineering owner's approval for this head, and with main merged in TreeList's interaction specs, unit tests and the core type check pass locally. One optional cleanup stays open: the comment above MOVING_CLIP in TreeList.tsx still has a sentence fragment.
[Automated review]
WebKit can present no frame for about 70 ms while it first composites a newly animated layer, longer on a loaded runner. The stock 300 ms glide eases out and is mid-travel for only about 113 ms, so CI's WebKit legs drew one frame there and the expand failed as named starvation. The two cases that record every frame now set the tree's --duration-medium to 1200 ms, as a theme does, which keeps the same curve mid-travel for about 450 ms. Their floors and curve-share seeks are unchanged, and the case that reads the started durations still checks the stock timing.
A comment line read as a fragment. It now says that rows gliding up into a shorter tree show only inside it, and names the table view's clip in a sentence of its own. Comment only; no behavior changes.
|
/approve-spec e1baef4 |
There was a problem hiding this comment.
Approved: CI passes on this head, and the spec changes carry an engineering owner's approval for it.
- The WebKit frame starvation from the last review is fixed: the two proofs that record every frame now judge a 1,200 ms glide, and CI's WebKit leg passes them.
- The comment above
MOVING_CLIPinTreeList.tsxnow reads as whole sentences.
[Automated review]
|
/approve-spec e1baef4 |
User need
On iOS, opening a folder in an outline list moves the rows below it down as its children appear. Under a finger, a TreeList's children appear in one frame.
Problem and solution fit
Under a coarse pointer, an expand glides the rows below on the shared glide while the children slide in under the row and fade, and the chevron turns with them; a collapse reverses it. With a mouse, rows still change at once; under every pointer, a guide line ends at the last row it joins. Without a handle, content after the tree takes its place at once (AST-105 DEC-1), and the tree clips its bottom edge while it moves, as a UITableView clips to its bounds, so rows glide in from its edge.
Current specification
component:TreeListFR8 takes the spec owners' wording, credited to the owner's feedback. DD5, the guides, is decided for every pointer. Its compatibility lines, INV12 andspec:AST-105FR2 name the guide change and TreeList's own handle.Public delta and caller burden
None.
Design and alternatives
Evidence
The glide's 300 ms is
spec:AST-105FR4's--duration-medium.Before (main) and after (6995cb0, which plays this head's frames), 4× slower, under a finger:
At this head's preview, the rows below, the group's slide, its fade and the chevron run 300 ms, the Neutral glide; before, the slide ran 125 ms.
Writing rubric results
R1 narration: FR8's "no longer use" is now present tense ("take the glide's timing, not
--duration-fast"); the compatibility bullet names the released default it changes. R2 research: none. R3 evidence: the FR8 and DD5 verification rows name the per-frame browser cases. R4 rejected alternatives: none. R5 change references: none. R6 open questions: none.Scope
Testing
What was run at e1baef4 (main merged in; WebKit in the Linux CI image): TreeList's specs record every frame, with the motion specs, in Chromium twice (346 passed) and in WebKit twice (328 passed; Chromium-only cases skip). The core type check, check:repo, check:knowledge and review:pre (1,627 authored lines) pass.
The two cases that record every frame set the tree's glide to 1200 ms (its
--duration-medium, as a theme does): WebKit can present no frame for about 70 ms while it first composites a newly animated layer, and the stock 300 ms ease-out glide is mid-travel for only about 113 ms. "The rows below, the group and the chevron move on one timing: the theme's glide" still checks the stock timing. The expand and collapse proofs need at least two frames inside the glide (and the collapse five of the leaving group, three of its fade), or fail by name withFrameStarvationError. A held glide is then sought to where the theme's move curve covers a fifth to four fifths of the way, and the row must be inside its travel at each point, in order.Arms, not for landing, in WebKit: CI's 89 ms stall, replayed right after the tap, starves the expand by name on every run at 300 ms and the collapse on some (d7e1255); at 1200 ms both pass (306f322). On the 300 ms proofs, a page that draws no frame of the glide (208e6de before the floors, 6fc24bb with them) and one that draws one (3cdf790, 0ab1cb2) fail bare before the floors and by name with them; one frame cannot vouch for a glide's frames, so a runner that draws one fails as starvation. Rows that snap (a1766d6) fail the sought points. The no-frame arm drops the recorder's frames in the 400 ms after the tap, because no main-thread block reaches zero frames: WebKit draws the glide's first frame mid-travel before any block, and the module replays a motion that a long task delayed.
The comment above
MOVING_CLIPinTreeList.tsxis now whole sentences (comment only).At main they fail: the group shows at rest on its first frame with a 126 px blank band above the rows below, the collapse removes it at once, and only the chevron runs, on 125 ms. Each red-first case fails without its fix: a guide line ran 15 px past the last row it joins; a collapse painted the last row 99 px past the tree's edge; a parent's line broke at an expanded child (Themed guides); at a 16 px gap, connectors ran 8 px past their rows. Focus rings on the first and last rows stay whole while the tree moves, and WebKit meets Chromium's 1.5 px band.