Skip to content

feat(Resizable): a resizable LayoutPanel slides closed and open under every pointer - #9989

Open
vjeux wants to merge 30 commits into
meta:mainfrom
vjeux:resizable/c20-layout-panel-slide
Open

vjeux wants to merge 30 commits into
meta:mainfrom
vjeux:resizable/c20-layout-panel-slide

Conversation

@vjeux

@vjeux vjeux commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #9989 → #10292 → #10333

Behavior module: the resize controller's pane reveal.

User need

A resizable LayoutPanel jumps shut and open. spec:AST-105 FR9 slides it, with the content beside it.

Problem and solution fit

  • A LayoutPanel with a useResizable region slides closed and open, with the content beside it moving on the same motion.
  • Every collapse and open plays it: collapse(), expand(), Enter, a double-click, the grow arrow, a controlled isCollapsed, and a drag past the collapse threshold. A drag that reopens follows the pointer.
  • A press on the handle mid-slide takes it.
  • Reduce Motion lands at once.

The rubber band at the limits and the close decided on the lift are in the pull request stacked on this one.

Current specification

component:Resizable FR8 and component:LayoutPanel FR7; spec:AST-105 FR5, FR9.

Authority for every pointer, desktop included: Cindy's specs decision on #8783, Oct 31 2026, verbatim: "edge reveal A". A LayoutPanel slides by default, with no new API.

Public delta and caller burden

No prop, option or export; size, isCollapsed, callbacks, persistence and ARIA are unchanged. Changeset: [feat].

Design and alternatives

  • The panel lends its element in a layout Effect (architecture:react-component-runtime INV6).
  • The controller measures the pane before and after the collapse commits, and core's shared edge reveal plays it.
  • The handle stacks above the gliding content, so a press lands on it where it shows.
  • Rejected: a touch-only gate (FR5).

Evidence

  • Chromium and WebKit: a start and an end panel slide with their handle, for every trigger above, and Reduce Motion lands at once (paneSlide.interaction.browser.spec.ts).
  • Chromium touch, release then re-grab at about 15, 65 and 170 ms after a resize, a close and an open: every re-grab takes the handle.
  • iOS 26.2 Simulator: mid-slide grabs take the handle, 11 of 11.

Writing rubric results

Over component:Resizable and component:LayoutPanel: the FR8 and FR7 gaps go. R3 evidence: rows name tests. R1, R2, R4–R6: none.

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

On main 3bd058c (#10236 merged). This head's tree is the one these checks ran on (6c71421); the try-it stories' commit is out of its history.

  • Local checks at this head: core typecheck; the Resizable, Layout, motion, Collapsible, TreeList, SideNav, AppShell, Table, BottomSheet and gestures units (4,024 passed); CI=true pnpm lint (0 errors); check:knowledge; check:changesets; the Storybook build; paneSlide in Chromium (13) and in WebKit under the CI profile (13).
  • Red first: each slide case fails before its change.
  • The slide captures wait for a commit by frames, not 1 s: under six pinned busy loops the old wait timed out 1 of 8; now 20 of 20 pass.

@vercel

vercel Bot commented Nov 4, 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 7, 2026 12:58pm UTC

Request Review

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

astracat-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 7, 2026, 1:07 PM UTC

@cixzhang

cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 9474c56

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

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 662ec2c

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
LayoutPanel 20.7 kB (+205 B) · 4.9 kB CSS (0) — ✗ · ✓ · ✓
Layout 6.8 kB (0) · 2.3 kB CSS (0) — ✗ · ✓ · ✓
LayoutContent 17.4 kB (0) · 1.7 kB CSS (0) — ✗ · ✓ · ✓
21 more components
Component Size LoC Visual · A11y · RTL
LayoutFooter 5.9 kB (0) · 1.6 kB CSS (0) — ✗ · ✓ · ✗
LayoutHeader 6.0 kB (0) · 1.6 kB CSS (0) — ✗ · ✓ · ✗
SideNav 🔴 93.3 kB (+5.6 kB) · 11.3 kB CSS (0) — — · — · —
AppShell 88.7 kB (+376 B) · 13.4 kB CSS (0) — — · — · —
ResizeHandle 20.6 kB (+74 B) · 4.3 kB CSS (0) — ✓ · ✓ · ✓
TableCell 106.5 kB (+6 B) · 17.4 kB CSS (0) — — · — · —
TableHeaderCell 106.1 kB (+2 B) · 17.2 kB CSS (0) — — · — · —
lab/Comments 321.2 kB (+2 B) · 2.5 kB CSS (0) — — · — · —
List 17.4 kB (+1 B) · 651 B CSS (0) — — · — · —
Collapsible 26.4 kB (0) · 4.5 kB CSS (0) — — · — · —
ContextMenu 105.3 kB (0) · 17.0 kB CSS (0) — — · — · —
DropdownMenu 93.7 kB (0) · 17.1 kB CSS (0) — — · — · —
Markdown 177.3 kB (0) · 20.0 kB CSS (0) — — · — · —
MoreMenu 94.0 kB (0) · 17.1 kB CSS (0) — — · — · —
PowerSearch 279.3 kB (0) · 23.5 kB CSS (0) — — · — · —
Table 114.7 kB (0) · 17.7 kB CSS (0) — — · — · —
lab/TransferList 105.3 kB (0) · 1.7 kB CSS (0) — — · — · —
CheckboxList 67.3 kB (−1 B) · 8.1 kB CSS (0) — — · — · —
TreeList 43.0 kB (−1 B) · 5.6 kB CSS (0) — — · — · —
lab/TransferListSelector 111.9 kB (−1 B) · 1.9 kB CSS (0) — — · — · —
lab/CommentThread 316.3 kB (−2 B) · 2.4 kB CSS (0) — — · — · —
Visual changes: 2 snapshots in 1 component

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

Component · story Before After Diff
Layout · Content Width — Scrollbar Placement (neutral, dark) before frame after frame diff frame
Layout · Content Width — Scrollbar Placement (neutral, light) before frame after frame diff frame

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

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 25 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.

Requesting changes: two blocking items.

  • Desktop behavior change needs an owner decision: the LayoutPanel slide plays under a mouse and trackpad as well as touch (createResizable.ts lines 749–767 measure it and resizablePane.ts line 382 plays it, and the changeset says "under every pointer"), so either gate the slide to touch input or cite the owner decision that covers this desktop change.
  • Size: at 2,832 authored lines this branch is over the 2,000-line threshold because it carries #9300's commits while #9300's body does not carry the identical Stack: #9300 → #9989 line, so add that line to #9300 (or land #9300 first) so the stack rules apply.

Non-blocking: new comments in resizablePane.ts and createResizable.ts call the hook's own region, which slides, the "configuration-object form", while component:LayoutPanel FR7 and AR2 say the configuration-object form never slides; "the hook's region" would read unambiguously.

Otherwise the slide, the focus move and the widened resizable slot match their records, and the new tests cover each path. CI has not run on this head yet.

[Automated review]

@vjeux
vjeux force-pushed the resizable/c20-layout-panel-slide branch from 9474c56 to 891333d Compare November 4, 2026 17:59
@vjeux
vjeux force-pushed the resizable/c20-layout-panel-slide branch from 891333d to 4cf1f97 Compare November 4, 2026 19:54
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 4, 2026
@cixzhang

cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 4cf1f97

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

Requesting changes on the stack.

#9300: approved, pending CI

No blocking findings: the widened resizable slot, SideNav's region path and the focus move follow component:Resizable FR9, component:LayoutPanel FR8 and AR2, and component:SideNav FR7, and the records now name the widened type.

#9989: changes requested

The record edits are approved at this head; one blocker remains.

  • Desktop behavior change needs an owner decision: the LayoutPanel slide plays under a mouse and trackpad as well as touch (createResizable.ts lines 744–767 measure it and resizablePane.ts line 382 plays it, with no pointer gate), so either gate the slide to touch input or cite the owner decision that covers this desktop change (an approval of the spec text alone is not that decision).

Non-blocking: the browser test named for the hook's props passes the region (Resizable.stories.tsx line 903), so no real-browser test drives resizable={region.props}.

Whole stack: it does not pass while #9989's slide waits on that decision. A pull request lands only when it and every pull request below it are approved. CI has not run on either head: both are drafts from a fork, so CI runs once each is marked ready for review and a maintainer adds the ci:run label.

[Automated review]

@vjeux
vjeux force-pushed the resizable/c20-layout-panel-slide branch from 4cf1f97 to ab40e35 Compare November 4, 2026 20:28
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 4, 2026
@cixzhang

cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

/approve-spec ab40e35

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

Requesting changes: two blocking items.

  • Desktop behavior change needs an owner decision: the LayoutPanel slide plays under a mouse and trackpad as well as touch (createResizable.ts lines 753 and 766 measure it and resizablePane.ts line 382 plays it, with no pointer gate), so either gate the slide to touch input or cite the owner decision that covers this desktop change.
  • Regression: at 2,960 authored lines this branch is over the 2,000-line threshold because it carries #9300's commits while #9300's body no longer carries the identical Stack: #9300 → #9989 line, so restore that line in #9300 (or land #9300 first) so the stack rules apply.

The record edits are approved at this head, and the slide, the focus move and the widened resizable slot match their records with passing tests. Non-blocking: two new comments in createResizable.ts (lines 460–465 and 471–473) read as fragments; suggested rewrites are inline. CI has not run on this draft head yet.

[Automated review]

@vjeux

vjeux commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

On the two blocking items at ab40e35:

  1. Desktop slide: the owner decides it on this pull request's feel check in the timing batch. It stays a draft until then.
  2. Size: the Stack: line came off feat(Resizable): resizable takes useResizable's output on LayoutPanel, ResizeHandle and SideNav, and focus leaves a collapsing panel #9300 at the maintainers' request, so that feat(Resizable): resizable takes useResizable's output on LayoutPanel, ResizeHandle and SideNav, and focus leaves a collapsing panel #9300 is reviewed and merged on its own; it is now ready. Once feat(Resizable): resizable takes useResizable's output on LayoutPanel, ResizeHandle and SideNav, and focus leaves a collapsing panel #9300 merges, this branch rebases onto main and carries only its own five commits.

The two comment rewrites will go into that rebase.

@vjeux
vjeux force-pushed the resizable/c20-layout-panel-slide branch from ab40e35 to 281668b Compare November 5, 2026 03:51
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 5, 2026
@cixzhang

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 281668b

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

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 6c71421

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

A resizable LayoutPanel given the hook's value now slides on every collapse and open path the Resizable and LayoutPanel specs list, and the slide cases pass in Chromium. The rubber band and the release close have moved out of this pull request, and the desktop reach is covered by the owner decision the description cites.

Next steps:

  • Mark the pull request ready for review; because the branch lives in a fork, a maintainer adds the ci:run label so CI runs.

Non-blocking:

  • The three member comments on LaidOutInside in animatedLayout.ts restate their fields; renaming gutters to padding lets them go (see the inline note).

[Automated review]

Comment on lines +2819 to +2824
/** Its padding at the axis's start and end. */
readonly gutters: readonly [string, string];
/** Its overflow across and down. */
readonly overflow: readonly [string, string];
/** Its scroll offset across and down. */
readonly scroll: readonly [number, number];

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): these three comments restate the fields' names and types. Suggested: rename gutters to padding and drop the three member comments; the interface's own JSDoc already says why the values are kept.

This pull request carries the slide alone. The rubber band at the
limits, the close decided on the lift, their FR8 sentences and their
tests move to the pull request stacked on this one. The tree is the
slide's own commits on main 3bd058c, with the slide captures that
wait for a commit by frames.
@cixzhang

cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

/approve-spec fa3bfea

@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 pull request is reviewed as part of its stack; see the review on #10292.

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 7, 2026
@vjeux
vjeux marked this pull request as ready for review November 7, 2026 01:00
github-actions Bot added a commit that referenced this pull request Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 78117f7

@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. A LayoutPanel given useResizable's value now slides closed and open on every collapse and open path, as component:Resizable FR8, component:LayoutPanel FR7 and spec:AST-105 FR9 describe, and the record edits carry an engineering owner's /approve-spec for this head. This pull request is judged on its own: its Stack: line lists #10292 above it, but #10292 does not contain this head, which merged main after #10292 was built.

Before merging:

  • The pr-a11y browser-spec checks failed before running any test because the job found no Storybook build (apps/storybook/dist/index.json); nothing in this change causes that, but those checks need a green re-run.

Non-blocking:

  • The description's Testing note says its checks ran on this head's tree, but they ran before the merge of main; the interaction suites pass in CI at this head, so only that sentence is stale.

[Automated review]


export type {LayoutEdge};

/** The width a panel renders: pixels, a CSS length, or none. */

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 restates the type below it, and the comment on renderedWidth() (line 40) restates the method name. Suggested: drop both comments.

@cixzhang
cixzhang marked this pull request as draft November 7, 2026 09:51
@cixzhang
cixzhang marked this pull request as ready for review November 7, 2026 09:51
github-actions Bot added a commit that referenced this pull request Nov 7, 2026
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 662ec2c

@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 finished on this head yet. A LayoutPanel given useResizable's value now slides closed and open on every collapse and open path, as component:Resizable FR8, component:LayoutPanel FR7 and spec:AST-105 FR9 describe, and the record edits carry an engineering owner's /approve-spec for this head. This pull request is judged on its own: its Stack: line lists #10292 above it, but #10292 does not contain this head, which merged main after #10292 was built.

Non-blocking:

  • The description's Testing note says its checks ran on this head's tree, but they ran before the merges of main; only that sentence is stale.

[Automated review]

github-actions Bot added a commit that referenced this pull request Nov 7, 2026

This branch was successfully deployed

1 active deployment
Preview — 662ec2ce Deployed Nov 7, 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