Repository navigation
Conversation
…h the handle The resize gesture treated Alt, Control and Meta arrows as plain arrows: it resized and called preventDefault, so platform word and line movement and app shortcuts on those keys did nothing while a handle had focus. Its keys are plain or Shift arrows, Home, End and Enter. The gesture now leaves a modified arrow alone. Shift still takes the larger step. Resizable.spec AR1 states it. A ResizeHandle case checks each arrow with each modifier is not consumed and leaves the size unchanged; it fails before this change.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval waits on a spec decision, and three fixes are needed whatever that decision is.
The new behaviour (a focused ResizeHandle no longer resizes on an arrow with Alt, Control or Meta held and leaves the key to the page) is defined only by the sentence this pull request adds to the Resizable record's AR1, which the current record does not state. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner.
Fixes needed:
- The changeset, description and commit say platform word and line movement keeps working, but a focused separator has no text caret and word movement in text fields never reached the handle, so the note should say that the browser's and the app's own shortcuts on those keys now run instead.
- The new test checks
aria-valuenowonly once after ArrowRight, ArrowLeft, ArrowUp and ArrowDown, whose steps cancel out on the old code (210, 200, 190, 200), so it cannot catch a resize and should assert the size after each key. - The description needs a
## Writing rubric resultssection for the AR1 edit, which the repository's knowledge-record rules require for any pull request that changes a record.
Optional: list the new case in the AR1 verification-map row, and drop "word and line movement" from the comment in resizeGesture.ts.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: an arrow with Alt, Control or Meta held passes through the handle (title, changeset) — verified: guard in
resizeGesture.ts:324-326, the four new cases pass, and a real-browser run shows the size held and the key unconsumed. - Claim: before this change those chords resized the pane and were consumed — verified: the four new cases fail on the old code, and the old code widened the pane from 250 to 300 px in the browser run.
- Claim: platform word and line movement keeps working — false: a focused separator has no text caret, and keys typed in a text field never reached the handle.
- Claim: an app's own shortcuts on those keys keep working — verified: the event is no longer consumed and no resize happens.
- Claim: plain and Shift arrows, Home, End and Enter resize as before — verified: Resizable, SideNav and LayoutPanel suites pass (669 of 669) and the plain-arrow browser run is pixel-identical.
- Claim: no API change — verified: the only type change is internal, and the API surface comparison lists no rows.
- Claim: the cause was a key handler that ignored modifiers — verified in the old
resizeGesture.ts. - Claim: the key-event type gains three fields that React and native events carry — verified: Core typechecks.
- Claim: the Resizable record's AR1 states the rule — verified at
Resizable.spec.md:211-212; not yet approved. - Claim: the record already decides modified arrows — not established: the current AR1 is silent on them.
- Claim: each new case checks that the key is not consumed and the size stays unchanged — partly false: the size check runs once after four cancelling arrows.
- Claim: the new cases fail on the old code and pass here — verified.
- Claim: typecheck, lint and the knowledge check pass — verified.
- Claim: the overlapping pull request touches the pane module, not the keyboard path — verified from its file list.
- File:
.changeset/resize-handle-modified-arrows.md— finding (word and line movement wording). - File:
docs/specs/components/Resizable/Resizable.spec.md— spec decision pending; verification row not updated (optional). - File:
packages/core/src/Resizable/ResizeHandle.test.tsx— finding (size check cancels out). - File:
packages/core/src/Resizable/resizeGesture.ts— clear; comment wording optional.
…combination passes through Specs widened the rule: the key map is plain arrows, Shift+Arrow, Home, End and Enter, so Alt, Control or Meta with any of those keys, and Shift with Home, End or Enter, pass through unconsumed. AR1 says it in one sentence. The red-first matrix covers each combination.
|
/approve-spec 441bdcd |
There was a problem hiding this comment.
Changes requested: the spec decision is settled, and three fixes remain before approval.
An engineering owner approved the new AR1 sentence for this head, so the behaviour itself (a focused ResizeHandle acts only on plain keys and Shift with an arrow, and passes every other modifier combination to the page) is decided.
- The changeset, description and code comment say word and line movement and text selection keep working, but those never acted from a focused separator (it has no caret, and in Chromium the selection keys leave a page selection unchanged there whether or not the handle consumes them), so the note should say instead that the browser's own shortcuts on those keys, such as history navigation and scrolling to the top or bottom of the page, and the app's own shortcuts now run.
- The new test matrix checks
aria-valuenowonly once after all keys, and the four arrows step 210, 200, 190, 200, so a build that still resizes on a modified arrow but skipspreventDefaultpasses it; assert the size after each key. - The description needs a
## Writing rubric resultssection for the AR1 edit, which the repository's knowledge-record rules require for any pull request that changes a record.
Optional: list the new case in the AR1 verification row, and keep only the reason in the comment in resizeGesture.ts.
Claims and files checked
Review mode: same-head; reason: none
- Claim: a focused handle acts only on plain arrows, Shift with an arrow, Home, End and Enter, and passes every other modifier combination through unconsumed (title, changeset, description) — verified: the guard in
resizeGesture.ts:302-309, the five new cases, and a Chromium run where every chord reaches the page unconsumed and the size holds. - Claim: before this change those chords resized or collapsed the pane and were consumed — verified: the five new cases fail on the base, and in Chromium the base resized, dropped to the minimum and collapsed on the same chords.
- Claim: platform word and line movement and text selection keep working — false: a focused separator has no caret, keys typed in a text field never reach the handle, and in Chromium the selection keys leave a page selection unchanged from a focused separator either way, while they extend it with nothing focused.
- Claim: document movement, a Control or Command+Enter submit and an app's own shortcuts keep working — verified: those keys are no longer consumed and no longer resize or collapse the pane.
- Claim: plain arrows, Shift arrows, Home, End and Enter resize as before — verified: the Resizable, SideNav and Layout suites pass.
- Claim: no API change — verified: the API surface comparison lists no rows and the type change is internal.
- Claim: the cause was a key handler that ignored modifiers — verified in the base
resizeGesture.ts. - Claim: the key-event type gains three fields that React and native events carry — verified: Core builds and typechecks.
- Claim: AR1 states the rule — verified at
Resizable.spec.md:217-219, approved by an engineering owner for this head. - Claim: the current record already excludes modified keys — not established by the current AR1 text, which is silent on them; the approval of the new sentence settles it.
- Claim: each matrix case checks that the key is not consumed and the size stays unchanged — partly false: the size is checked once after all keys, so a resize on a modified arrow is not caught.
- Claim: all five cases fail on the base and pass here — verified.
- Claim: typecheck, lint and the knowledge check pass — verified.
- Claim: the overlapping Resizable pull request touches the pane module, not the keyboard path — verified from its file list.
- File:
.changeset/resize-handle-modified-arrows.md— finding (word and line movement and text selection wording). - File:
docs/specs/components/Resizable/Resizable.spec.md— clear; the AR1 sentence is owner-approved; verification row not updated (optional). - File:
packages/core/src/Resizable/ResizeHandle.test.tsx— finding (single size check). - File:
packages/core/src/Resizable/resizeGesture.ts— clear; comment wording optional.
…hat passes through The matrix now asserts the size after each key, so a build that resizes and then steps back no longer passes. The comment, changeset and record name what the passed-through keys reach: the browser's own shortcuts (history navigation, scrolling to the top or bottom) and the app's own. The AR1 verification row lists the new case.
|
/approve-spec 2e2a058 |
There was a problem hiding this comment.
Approved pending CI: CI is running on this head now that the pull request is ready for review, and the merge guard waits for its required checks.
An engineering owner approved the new AR1 sentence for this head, and nothing blocking remains. With a handle focused, Control+End now scrolls the page instead of being swallowed, while plain keys and Shift with an arrow still resize.
- Optional: the AR1 verification row quotes the new test as "leaves a key with {modifiers} that the map does not name to the page", which matches neither the source title (
$modifiers) nor the titles Vitest prints, so quoting the source title would keep it searchable.
Claims and files checked
Review mode: same-head; reason: none
- Claim: a focused handle acts only on plain arrows, Shift with an arrow, Home, End and Enter (title, release note, description) — verified: the guard in
resizeGesture.ts:299-309and the five new test cases. - Claim: Alt, Control or Command with an arrow, Home, End or Enter, and Shift with Home, End or Enter, now pass through to the page unconsumed — verified: the five cases, and a Chromium run where each chord reaches the page unconsumed and the size holds at 260 px.
- Claim: so the browser's own shortcuts (history navigation, scrolling to the top or bottom) and the app's own shortcuts run — verified for scrolling: Control+End scrolls a tall page to its end on this head and is swallowed on the base; for history navigation the chord reaches the page unconsumed, though the headless browser performs no navigation on either side.
- Claim: before this change those chords acted as the plain key and were swallowed — verified: the five cases fail on the base, and in Chromium the base resized to 270 px, dropped to 180 px and collapsed on the same chords.
- Claim: plain arrows, Shift arrows, Home, End and Enter resize as before — verified: the Resizable, SideNav and Layout suites pass.
- Claim: no API change for builders — verified: the API surface comparison of Core, build and the seven themes lists no rows, and the widened key-event type is not exported.
- Claim: the cause was a key handler that matched the arrow keys without looking at modifiers and called
preventDefaultfor every arrow — verified in the baseresizeGesture.ts. - Claim: the key-event type gains three fields that React and native key events both carry — verified: Core typechecks, and both callers pass their event straight through.
- Claim: AR1 states the rule — verified at
Resizable.spec.md:217-219, approved by an engineering owner for this head. - Claim: AR1 gives the handle's keys as the window splitter's, and modified keys are outside that map, a records-decided defect — the key list is verified; that the current AR1 already excludes modifiers is not established by its text, which is silent on them; the approval of the new sentence settles it.
- Claim: the matrix checks each arrow, Home, End and Enter with Alt, Control, Meta and Meta+Shift, and Home, End and Enter with Shift; after each key the key is not consumed and the size is unchanged; all five cases fail on the base and pass here — verified.
- Claim: the AR1 verification row lists the new case — verified, with the quoted name noted above.
- Claim: the existing Resizable, SideNav and LayoutPanel suites pass — verified: the Resizable, SideNav and Layout folders pass, 826 of 826 in this run, a wider selection than the description's count.
- Claim: typecheck, lint and the knowledge check pass — verified.
- Claim: the writing rubric results cover the AR1 sentence and the verification entry — verified against the record edit.
- Claim: the overlapping open Resizable pull request changes the pane module, not the keyboard path — verified from its file list.
- File:
.changeset/resize-handle-modified-arrows.md— clear. - File:
docs/specs/components/Resizable/Resizable.spec.md— clear; the AR1 sentence is owner-approved; the verification row's test name is optional to fix. - File:
packages/core/src/Resizable/ResizeHandle.test.tsx— clear. - File:
packages/core/src/Resizable/resizeGesture.ts— clear.
| | FR6 | `useResizable.test.ts`; typecheck | Numeric bounds; conflicting bounds | A removed alias that type-checks, a numeric bound that is not pixels, or a minimum that wins a conflict fails. | `audit:Resizable/behavior` | | ||
| | FR7 | `ResizeHandle.test.tsx` consumer `onKeyDown` test; source review | Caller props and `onKeyDown` | A consumer `onKeyDown` that stops keyboard resizing, or keyboard resizing that skips the consumer handler, fails. Gap: no test covers other caller props, the styling merge, caller `onFocus`, `onBlur`, or `onDoubleClick`, or a caller `role` or ARIA attribute. | `audit:Resizable/api` | | ||
| | FR8 | `paneSlide.interaction.browser.spec.ts`: a start and an end LayoutPanel collapsed from inside and opened with Enter, a toggle, a controlled `isCollapsed`, a double-click, the grow arrow, a lift past the threshold, a flick toward closing, a pull past the maximum and under the minimum, each at most about 8 px with no reflow, the Handle alone moving over the content, an arrow key at the maximum that draws no band, a panel at the hook's size alone at a limit, a press on the Handle mid-slide, a re-grab at once, 50 ms after and mid-settle after a pull past the maximum, a reopening drag, a hand-built `ResizableProps` pane, and Reduce Motion; `paneReveal.test.tsx` for `expand()`, `resize()` out of collapse, a re-grab while the pane slides shut, and a hook-only pane; source review: the resize gesture takes every pointer type alike | Start and end panes; `collapse()`, `expand()`, Enter, double-click, the grow arrow, a controlled `isCollapsed` change, a lift past `collapsedSize` and a flick; a pull past each limit and its spring-back, for every pointer type; an arrow key at a limit; a press mid-slide; a reopening drag; the hook's `props` and a hand-built object through `resizable`; Reduce Motion | A jump instead of a slide, a slide from the wrong edge, a hard stop at a limit, an edge more than about 8 px past a limit, content that reflows past a limit, a band from an arrow key at a limit, a collapse before the lift, a close not on `springs.settle`, a press mid-slide that misses the Handle, a slide during a reopening drag or on first render, a slide for a hook-only pane or a hand-built object, no slide for the hook's `props`, or a new prop, option or return member fails. | `audit:Resizable/behavior` | | ||
| | AR1 | `ResizeHandle.test.tsx` ("makes the separator focusable", "exposes the region size and bounds via ARIA", "grows the panel by a step on ArrowRight", "shrinks the panel by a step on ArrowLeft", "uses the large step when Shift is held", "jumps to the minimum on Home", "leaves a key with {modifiers} that the map does not name to the page", "jumps to the maximum on End", "collapses on Enter when the region is collapsible", "inverts the pointer delta under RTL so dragging resizes intuitively", "restores the previous size, not the minimum, when Enter reopens a collapsed pane", "reopens on Enter even when the minimum size sits below the collapse threshold", "reports the window basis as aria-valuemax when no maximum is configured; End leaves an unbounded region alone", "reports the container basis as aria-valuemax while a percentage bound already observes it", "never reports aria-valuemax below aria-valuemin while collapsed in a small window", "reports no aria-valuemax for an unbounded pixel-only region in a container, which stays unobserved", "a grow arrow opens a collapsed pane one step above its minimum; the shrink arrow leaves it collapsed", "a grow arrow opens a collapsed pane at its collapsedSize when the minimum sits below it", "a grow arrow opens a collapsed pane in the reversed layout and under RTL too", "in a reversed layout, ArrowLeft opens a collapsed pane and ArrowRight leaves it collapsed", "under RTL, ArrowLeft opens a collapsed pane and ArrowRight leaves it collapsed", "a grow arrow opens a hand-built collapsed region one step above its minimum", "with snap points, an arrow moves to the adjacent point in its direction and Shift moves two, clamped to the ends", "with snap points past the bounds, a point beyond maxSize or minSize counts as that bound", "with snap points, the arrows follow the reversed layout and the reading direction", "with snap points in a reversed layout, ArrowLeft moves to the next point and ArrowRight to the previous", "with snap points, the grow arrow opens a collapsed pane at the snap point nearest one step above its minimum") and `shippedDirections.test.ts`; `SideNav.test.tsx` ("names the nav it resizes with aria-controls (APG window splitter)"); RTL keyboard mirroring, and the disabled state under the Window Splitter accessibility contract (`internal/a11y-spec`, pending); `ResizeHandle.a11y.test.tsx` and `ResizeHandle.a11y.chromium.spec.ts` | Inline and block axes; LTR and RTL; collapsed; disabled | The Handle loses its role, name, orientation, or value properties; an arrow, Home, End, or Enter stops moving the divider or moves it against the reading direction. | `audit:Resizable/accessibility` | |
There was a problem hiding this comment.
Optional: the quoted name "leaves a key with {modifiers} that the map does not name to the page" matches neither the source title in ResizeHandle.test.tsx ($modifiers) nor the titles Vitest prints ({ altKey: true } and so on), so a search for it finds nothing. Quoting the source title keeps the row searchable: "leaves a key with $modifiers that the map does not name to the page".
|
/approve-spec 1689b33 |
Primary intent
Fix: a focused
ResizeHandleacts only on the keys in its key map; every other modifier combination passes through unconsumed.User impact
Keyboard users: with a resize handle focused, modified keys acted as plain ones and were swallowed:
Now they do nothing on the handle and reach the page. The browser's own shortcuts on those keys (history navigation such as Command+Left, scrolling to the top or bottom) and the app's own shortcuts (a Ctrl/Cmd+Enter submit, moving a card with Alt+Up or Alt+Down) run.
Unchanged: plain arrows and Shift arrows (larger step), Home, End and Enter resize as before.
Builders: no API change.
Cause
resizeGesture.ts'skeyDownmatched the arrow keys without looking at modifiers. It resized and calledpreventDefaultfor every arrow, whatever was held.Change
preventDefault. Shift+Arrow still takes the larger step.Resizable.spec.mdAR1 states it: "Only the keys above act; a key pressed with a modifier the map does not name does nothing and is not consumed."Authority
component:ResizableAR1 gives the handle's keys as plain or Shift arrows, Home, End and Enter (the WAI-ARIA window-splitter pattern). Modified arrows aren't part of that key map. Specs ruled this a records-decided defect.Evidence
Red first: a new
ResizeHandle.test.tsxmatrix checks:After each key, the key is not consumed (
fireEventreturns true) and the size is unchanged. All five cases fail on main and pass here.Verification map: the AR1 row lists the new case.
Existing suites: Resizable, SideNav and LayoutPanel pass 670 of 670.
Checks:
tscandeslintclean;pnpm check:knowledgepasses.Writing rubric results
For the
Resizable.spec.mdedits (the AR1 sentence and the verification-map entry):Owner and land path
Overlap checked: #11508 (Resizable overshoot and touch runtime; it touches resizablePane.ts, not the keyboard path in resizeGesture.ts)