Repository navigation
fix(List): a reorder handle's name follows its row's place and label - #10815
Conversation
|
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 |
Conformance tidy, no visible change. The reorder session's list getter and the mode hint's layer handle were copied into refs during render. Each is now written in a one-line layout effect, so a render React discards leaves nothing behind. No failure is reachable today. Every list getter returns the same element. The layer ref's only reader is the hint's layout effect. It reads the ref at the commit, right after the committed render wrote it. The cleanup uses the handle it captured.
db41faa to
fa0e10d
Compare
There was a problem hiding this comment.
Changes requested. The handle-name fix itself does what spec:AST-103 FR4 asks: the new cases fail on main and pass here, and Chromium's accessibility tree shows the names following their rows. Two things need to change before approval:
- The reorder session creates its own
MutationObserver(listReorderEngine.tsx:882) instead of registering throughobserveMutationsinutils/sharedMutationObserver.ts, which Core uses as the one owner of DOM mutation observation (INV16 in the React component runtime record); please register the list and each label element through it and drop the session's own observer. - The changeset says a handle's name now stays current "when the row moves or its label changes", but on main a row named by its text already kept its name through moves and text edits, so please narrow it to handles named after their place and to labels that gain or lose their text.
Optional: move the new helpers below rowsOf's doc comment so it stays on rowsOf, and remove positionOf, which no longer has a caller.
[Automated review]
fa0e10d to
550318d
Compare
There was a problem hiding this comment.
Changes requested: one sentence in the changeset needs narrowing. The handle-name fix itself does what spec:AST-103 FR4 asks, and both points from the last review are addressed.
- The changeset's first sentence (
.changeset/list-reorder-handle-name-follows-row.md:5) says a place-named handle now follows its place when rows above it go or the rows reorder, but rows that render again already did that on main, so scope it to rows that do not render again (wording suggested inline).
The new cases fail on main and pass here, and the names follow memoized rows in Chromium's accessibility tree. One non-blocking comment suggestion is inline.
[Automated review]
550318d to
8578c96
Compare
There was a problem hiding this comment.
Changes requested: one regression in the new name refresh. The handle-name fix itself does what spec:AST-103 FR4 asks, and the points from the last review are addressed.
- Miss: after a List's
listStyleswitches to or from'decimal', the reorder session keeps observing the replaced list element (listReorderEngine.tsx:886), so a later reorder leaves every place-named handle with its old place, also on rows that render again, which main names correctly; re-observe whengetList()returns a new element, and add a test that turns numbering on and then reorders.
The new cases fail on main and pass here. Details and a suggested fix are inline.
[Automated review]
8578c96 to
0dbd6ca
Compare
There was a problem hiding this comment.
Changes requested: one lint fix in the new tests. The handle-name fix itself does what spec:AST-103 FR4 and FR1 ask, and place names now keep following reorders after the list's numbering switches, which settles the earlier finding.
- Miss:
ListReorderNames.test.tsx:28typeskeysasreadonly string[], and the new numbering case repeats it at:83; the repository's ESLint config makes@typescript-eslint/array-typean error wheneverCIis set, so the required Lint job fails once this pull request leaves draft, and writingReadonlyArray<string>on both lines (or runningeslint --fix) clears it.
[Automated review]
A reorder handle named itself from the DOM in a passive effect: after
Item's label element when that element shows a name, else after the
row's place ("Reorder item N"). The effect ran only when the handle
rendered. A memoized row whose place changed, because a row above it
went or the rows reordered, kept the old place in its handle's name. A
label that gained or lost its text through its own state left the
handle named the old way.
The reorder session now reads both from the DOM, outside React. It
registers the list's rows and its handles' label elements with Core's
shared mutation observer, and releases them with the list. It keeps
each handle's label naming, and the place only for a handle named after
it. The handle reads them through useSyncExternalStore, as it reads
reorder mode, and renders its name from them. Only a change renders
the handle again, so its passive effect is gone. A row named after its
place still warns in development, once, from the session. positionOf
loses its last caller and goes.
The session follows the list element the List renders, which changes
when its numbering turns on or off.
ListReorderNames.test.tsx covers a row above that goes, a reorder, and
a label that gains and loses text: each fails on main and passes here.
A reorder after the numbering turns on passes on both.
0dbd6ca to
8903a22
Compare
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 leaves draft.
The handle-name fix does what spec:AST-103 FR4 and FR1 ask: the new cases fail on main and pass here, and every point from the last review is addressed, including the test file's lint errors.
- Miss (non-blocking, inherited from main): move announcements still use the label text read when the handle registers, so a row whose icon-only label shows "Starred" through its own state is announced as "Item 2, position 2 of 3, …" while its handle says "Reorder Starred";
refreshNamescould refresh that name in a follow-up.
[Automated review]
| return controller?.registerName(ref.current, spoken); | ||
| }, [controller, callerLabel, text, labelID]); | ||
| (text !== '' ? text : labelTextOf(handle, labelID ?? null)); | ||
| const unname = controller?.registerName(handle, spoken); |
There was a problem hiding this comment.
Miss (non-blocking, inherited from main): the announcement name registered here is the label text read when this Effect runs. When the row's icon-only label later shows "Starred" through its own state, the handle says "Reorder Starred", but a move announces "Item 2, position 2 of 3, after Inbox, before Item 3" (main announces the same). refreshNames already reads this label element, so it could update the row's announcement name too, in a follow-up.
There was a problem hiding this comment.
Left for a follow-up after this lands; main reads the announcement name the same way.
Main brings in meta#11199, whose controller reads a collection's rows through a reader, and meta#11352's committed-ref hook. meta#11199 edits positionOf, which this branch removes; it stays removed. One hand edit: refreshNames reads this.rows.read(list) instead of rowsOf(list), as meta#11199's positionOf did, so a collection's own reader numbers its rows.
There was a problem hiding this comment.
Changes requested: one fix in the new name refresh. The handle-name fix itself follows spec:AST-103 FR4 and FR1, and the earlier points on the rows watch and the stored places stay fixed.
- Miss:
refreshNamescompares withthis.handleNames.get(handle)(listReorderEngine.tsx:990-997) and the handle keeps its ownUNREAD_NAMEas the server snapshot (ListReorderHandle.tsx:398-401), so a handle named by its row'saria-labeloraria-labelledby, or byListInput's text, gets a new snapshot with the same values after mounting, and again after hydration because the server snapshot is a different object, which renders it again against INV9 of the React component runtime record; comparing throughthis.handleNameOf(handle)and using the engine'sUNREAD_NAMEin the handle fixes both, and a render-count case would hold it.
CI has not run on this head yet because the pull request is a draft. Non-blocking, inherited from main: move announcements still use the label text read when the handle registers, so an icon-only label that later shows text is announced as "Item N" while its handle says "Reorder" and the label.
Claims and files checked
- Changeset, a handle's name follows its row when the row does not render again: verified by reading (
listReorderEngine.tsx:944-1029,ListReorderHandle.tsx:291-335; new cases 1, 2 and 4). - Changeset, a place-named handle follows its place when rows above go or the rows reorder: verified (
listReorderEngine.tsx:949-997; cases 1 and 2). - Changeset, a label that gains or loses its text renames the handle: verified (
listReorderEngine.tsx:973-982; case 4). - Description, main names a handle after its row, else after its place, from a passive Effect that ran only when the handle rendered: verified (the removed Effect in
ListReorderHandle.tsx). - Description, memoized rows and labels changing through their own state kept stale names on main: verified by reading the base code; the failing runs were not reproduced.
- Description, the session watches the rows and the label elements through the shared mutation observer and follows the list across numbering toggles: verified (
listReorderEngine.tsx:903-907,:956-964,:978). - Description, the session keeps the place only for a handle named after it: verified (
listReorderEngine.tsx:988). - Description, only a change renders the handle again: false, see the finding above.
- Description, the nameless-row warning moves into the session, once per handle: verified (
listReorderEngine.tsx:998-1010). - Description, the specification names the handle "Reorder" and the row's label, and a nameless row takes its place with a development warning: the names match FR4 and FR1; the warning is existing behavior the specification does not state for List rows.
- Description, two latest-value refs move onto the committed-ref hook, superseding an earlier closed pull request, with no reachable discriminating test: verified (
listReorderContext.ts:194,listReorderEngine.tsx:2543; both List getters read one list ref). - Description, the old position helper loses its last caller and goes: verified (no caller left in Core or Lab).
- Description, the merge of main brings the rows reader and the committed-ref hook with one hand edit: verified (the merge's only two-parent difference is
this.rows.read(list)). - Description, test, type-check, lint, browser, mutant and timing results: not reproduced.
- Description, no hidden public API, visual, default or interaction change, and no internal context in public text: verified.
- Files:
listReorderEngine.tsx(finding: snapshot comparison),ListReorderHandle.tsx(finding: secondUNREAD_NAME; inherited announcement note),listReorderContext.ts(clear),ListReorderNames.test.tsx(clear),.changeset/list-reorder-handle-name-follows-row.md(clear).
The names refresh compared each handle's name with the session's own
entry, which a handle named some other way has none of before the
first read. So it stored a new {position: null, labelNamesRow: null}
and the handle rendered again with the same name on every mount
(architecture:react-component-runtime INV9). It now compares with
handleNameOf, whose shared unread name has the same fields.
A test counts the handle's renders through the verb it reads each
render: once per handle on mount, and once for a row that mounts later.
The handle's server snapshot was its own unread name, and the session answered an unread handle with another object with the same fields. So after hydration React saw a new snapshot, and each handle rendered again with the same name (architecture:react-component-runtime INV9). The handle now exports one unread name, and the session answers with it. A test hydrates server markup and counts the handle's renders through the verb it reads each render: once per handle.
|
/approve-spec 1205c61 |
There was a problem hiding this comment.
Changes requested: one fix left in the handle-name snapshot. The handle-name fix follows spec:AST-103 FR4 and FR1, and a handle named by aria-label, aria-labelledby or ListInput's text now keeps one snapshot through mount and hydration.
- Miss: a row named by its text label (
<ListItem itemKey="inbox" label="Inbox" />) gets a new handle snapshot on the first read, becauserefreshNamesmoveslabelNamesRowfromnulltotrue(listReorderEngine.tsx:979,:987-994) though the handle and the session both treat the two values alike, so every such handle renders again with the same name after mounting and after hydrating, against INV9 of the React component runtime record and against the description's "only a change renders it" and "a hydrated handle renders once"; giving "unread" and "the label names the row" one value (for examplelabel?.labelId == null || namesRow(element) ? null : false) and adding a text-labelled row to the two render-count cases fixes it.
Non-blocking, inherited from main: move announcements still use the label text read when the handle registers, which you have already planned as a follow-up. CI has not run on this head yet because the pull request is a draft.
Claims and files checked
- Changeset, a handle's name follows its row when the row does not render again: verified (
listReorderEngine.tsx:941-1026,ListReorderHandle.tsx:291-335; test cases at lines 45, 73 and 133). - Changeset, a place-named handle follows its place when rows above go or the rows reorder: verified (
listReorderEngine.tsx:946-948,:985-986; cases at lines 45, 73 and 103). - Changeset, a label that gains or loses its text renames the handle: verified (
listReorderEngine.tsx:970-982; case at line 133). - Description, main named the handle from a passive Effect that ran only when the handle rendered: verified (the removed Effect in
ListReorderHandle.tsx). - Description, memoized rows and labels changing through their own state kept stale names on main: verified by reading the base code; the failing runs were not reproduced.
- Description, the session watches the rows and the label elements through the shared mutation observer, across numbering toggles: verified (
listReorderEngine.tsx:898-904,:953-961,:970-977). - Description, the session keeps the place only for a handle named after it: verified (
listReorderEngine.tsx:985). - Description, the handle reads the names through an external store, so only a change renders it: false for rows named by their text label, see the finding; true for handles named some other way.
- Description, the nameless-row warning moves into the session, once per handle: verified (
listReorderEngine.tsx:995-1007). - Description, the specification names the handle "Reorder" and the row's label, and a nameless row takes its place with a development warning: the names match FR4 and FR1; the warning is existing behavior the specification does not state for List rows.
- Description, two latest-value refs move onto the committed-ref hook, superseding an earlier closed pull request, with no reachable discriminating test: verified (
listReorderContext.ts:194,listReorderEngine.tsx:2540; both List getters read one list ref). - Description, the old position helper loses its last caller and goes: verified (no caller left in Core or Lab).
- Description, the merge of main brings the rows reader and the committed-ref hook with one hand edit: verified (the merge's only two-parent difference reads the rows through the rows reader).
- Description, the follow-up commits keep an unchanged name's snapshot: verified for handles named by
aria-label,aria-labelledbyorListInput's text (listReorderEngine.tsx:987); false for a text-labelled row's first read. - Description, the server snapshot and the session's unread answer are one object, so a hydrated handle renders once: the shared object is verified (
ListReorderHandle.tsx:294,:403); "renders once" is false for rows named by their text label. - Description, a handle named by
aria-labelrenders once per mount and once when it hydrates: verified by reading (cases at lines 161 and 196), not executed. - Description, test, type-check, lint, browser, mutant and timing results: not reproduced.
- Description, no hidden public API, visual, default or interaction change, and no internal context in public text: verified.
- Files:
listReorderEngine.tsx(finding: first-read snapshot),ListReorderHandle.tsx(same finding: its unread snapshot comment; inherited announcement note),listReorderContext.ts(clear),ListReorderNames.test.tsx(clear; its render-count cases coveraria-labelrows only),.changeset/list-reorder-handle-name-follows-row.md(clear).
The names refresh stored whether Item's label element names the row: null before the first read, and true after it, though the handle and the session read both alike. So a handle named by its row's text label rendered again with the same name after mounting and after hydrating (architecture:react-component-runtime INV9). The snapshot now records whether the label shows no name, which stays false until a read finds the label blank. Both render-count cases add a row named by its text label.
|
/approve-spec 2c1fdb4 |
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, and it runs once the pull request leaves draft.
The handle-name fix follows spec:AST-103 FR4 and FR1: a place-named handle now follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. The remaining snapshot point from the last review is fixed: a handle named by its text label keeps the unread snapshot, so it renders once per mount and once when it hydrates. The announcement name for a label that changes through its own state stays the follow-up you already noted.
Claims and files checked
- Changeset: a handle's name follows a row that does not render again, a place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and the new cases.
- The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name derivation and the English catalog.
- Main wrote these names in an Effect that ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified by tracing main's handle, which
ListItemmemoizes. - The session registers the rows and label elements with the shared mutation observer, across numbering toggles, and keeps the place only for place-named handles. Verified.
- The handle reads a snapshot through
useSyncExternalStorethat changes only with its payload, including the first read and hydration. Verified. - The nameless-row warning moves into the session, once per handle. Verified; it is the existing warning, unchanged.
- The two ref swaps follow the committed-ref hook rule and change no behavior, and no test can tell them apart. Verified.
- The unused
positionOfis removed. Verified: nothing references it. - The three new cases fail on main and pass here, with the numbering case and the render-count cases. Verified by tracing; not run here.
- The reported suite counts, typecheck, lint, Playwright results and 510-row timings were not reproduced here and are left to CI. Fifteen test files were confirmed in the listed paths, and the timing direction matches the code.
- The mutation-sensitivity commits are not in the repository. The same mutations, reasoned on this head, each fail a named case.
- The merge's one hand edit and each later commit match the history the description gives. Verified.
- Files, all clear: the changeset,
ListReorderHandle.tsx,listReorderEngine.tsx,listReorderContext.tsandListReorderNames.test.tsx, which agree on the shared snapshot type and its unread value.
Main brings in meta#10912, which changes Layer/useLayer.tsx, the layer the mode hint shows. The merge needs no hand edit.
|
/approve-spec a09b127 |
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, and it runs once the pull request leaves draft.
The merge of main leaves the handle-name fix unchanged. It still follows spec:AST-103 FR4 and FR1: a place-named handle follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. Miss, non-blocking: the ListReorderHandleName comment says position is null only until the session reads it, but it also stays null for a handle that is not named after its place (inline suggestion). The announcement name for a label that changes through its own state stays the follow-up you already noted.
Claims and files checked
- Changeset: a handle's name follows a row that does not render again. A place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and new cases 1, 2 and 4.
- The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name logic and the English catalog.
- On main, a passive Effect set these names and ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified in main's handle code and in
ListItem's memoized handle element. - The session registers the rows and label elements with the shared mutation observer across numbering toggles. It keeps each handle's label naming, and the place only for place-named handles. Verified.
- The handle reads a snapshot through
useSyncExternalStore, so only a change renders it. Verified, including the first read and hydration. - The nameless-row warning moves into the session, once per handle. Verified: the message and the condition are unchanged.
- The reorderable record names the handle "Reorder" plus the row's label, and a row with no text takes its place. Verified. The development warning is existing behavior; the record states one only for attached plain elements.
- The two ref moves follow the committed-ref rule, change no behavior and leave no test that can tell them apart. Verified by reading both sites.
- The fix removes the unused
positionOf. Verified: nothing else references it. - Later commits keep an unchanged name's snapshot. Verified in
refreshNamesand the shared unread value. - The three new cases fail on main and pass here, as do the numbering case and the render-count cases. Verified by tracing on main and the head; not run here.
- Each listed mutant fails named cases. The mutant commits are not in the repository. The same mutations, reasoned on this head, each fail a named case.
- The 510-row timings were not reproduced here. Their direction matches the code: one pass per change instead of one list read per handle.
- The scope boxes say one defect, no hidden public API, default or interaction change, and no internal context. Verified. The ref moves are a no-behavior conformance change that the description names.
- The reported test, typecheck, lint, Playwright and knowledge-check runs were not reproduced here and are left to CI.
- No public API changes, and the internal additions and the removal are as listed. Verified: no package entry,
./internal/reorderincluded, exports any of them. - The size is 543 added and 92 deleted lines in 5 files. Verified.
- The history matches. The last merge of
mainneeds no hand edit and leaves the pull request's own patch unchanged. Verified: the patch is byte-identical to the one at the last reviewed revision. - Files,
.changeset/list-reorder-handle-name-follows-row.md: clear. - Files,
packages/core/src/List/ListReorderHandle.tsx: clear. - Files,
packages/core/src/List/listReorderEngine.tsx: one non-blocking comment suggestion (ListReorderHandleName). - Files,
packages/core/src/List/listReorderContext.ts: clear. - Files,
packages/core/src/List/__tests__/ListReorderNames.test.tsx: clear. It agrees with the engine and the handle on the shared snapshot type and its unread value.
| * What names a handle besides its own text, as the list last showed it. Its | ||
| * row's 1-based place among the list's rows, null until the session reads | ||
| * it. And whether Item's label element shows no name: an unread label counts | ||
| * as one that shows a name, so a first read that finds a name changes nothing. |
There was a problem hiding this comment.
Miss (non-blocking, INV29): this says position is null until the session reads it, but refreshNames also keeps it null for every handle that is not named after its place (line 986). A shorter version keeps only the facts:
/**
* A handle's place and label naming, as the list last showed them.
* `position` is the row's 1-based place. It is null before the first read
* and for a handle that is not named after its place.
* `labelShowsNoName` starts false, so a first read that finds a name
* changes nothing.
*/Main brings in meta#11336, which changes List/ListItem.tsx, the row that renders the reorder handle. The merge needs no hand edit.
|
/approve-spec 1f32922 |
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, and it runs once the pull request leaves draft.
The merge of main leaves the handle-name fix unchanged, and it still follows spec:AST-103 FR4 and FR1: a place-named handle follows its row's place after removals and reorders, and an icon-only label that gains or loses text renames its handle, even when the handle does not render again. Two non-blocking points stay open: the ListReorderHandleName comment still says position is null only until the session reads it, though it also stays null for a handle not named after its place (inline suggestion), and the announcement name for a label that changes through its own state is the follow-up you already noted.
Claims and files checked
- Changeset: a handle's name follows a row that does not render again; a place name follows removals above and reorders, and a label that gains or loses text renames the handle. Verified in the session's refresh and new cases 1, 2 and 4.
- The handle is named "Reorder" plus the row's name, or "Reorder item N" for a nameless row. Verified in the handle's name logic and the English catalog.
- On main, a passive Effect set these names and ran only when the handle rendered, so memoized rows and labels that change through their own state kept old names. Verified in main's handle code,
ListItem's memoized handle element andList's memoized context. - The session registers the rows and label elements with the shared mutation observer across numbering toggles, keeping each handle's label naming and the place only for place-named handles. Verified.
- The handle reads a snapshot through
useSyncExternalStore, so only a change renders it. Verified, including the first read and hydration. - The nameless-row warning moves into the session, once per handle. Verified: the message and the condition are unchanged.
- The reorderable record names the handle "Reorder" plus the row's label, and a row with no text takes its place. Verified; the development warning is existing behavior, which the record states only for attached plain elements.
- The two ref moves follow the committed-ref rule, change no behavior and leave no test that can tell them apart. Verified by reading both sites.
- The fix removes the unused
positionOf. Verified: nothing else references it. - Later commits keep an unchanged name's snapshot. Verified in
refreshNamesand the shared unread value. - The three new cases fail on main and pass here, as do the numbering case and the render-count cases. Verified by tracing on main and the head; not run here.
- Each listed mutant fails named cases. The mutant commits are not in the repository; the same mutations, reasoned on this head, each fail a named case.
- The 510-row timings were not reproduced here; their direction matches the code, one pass per change instead of one list read per handle.
- The scope boxes say one defect, no hidden public API, default or interaction change, and no internal context. Verified; the ref moves are a no-behavior conformance change that the description names.
- The reported test, typecheck, lint, Playwright and knowledge-check runs at this head were not reproduced here and are left to CI.
- No public API changes, and the internal additions and the removal are as listed. Verified: no package entry, the internal reorder entry included, exports any of them.
- The size is 543 added and 92 deleted lines in 5 files. Verified.
- The history matches, and the latest merge of
main, which brings a documentation-only change toListItem, needs no hand edit and leaves the pull request's own patch unchanged. Verified: the patch is byte-identical to the one at the last reviewed revision. - Files,
.changeset/list-reorder-handle-name-follows-row.md: clear. - Files,
packages/core/src/List/ListReorderHandle.tsx: clear. - Files,
packages/core/src/List/listReorderEngine.tsx: one non-blocking comment suggestion (ListReorderHandleName). - Files,
packages/core/src/List/listReorderContext.ts: clear. - Files,
packages/core/src/List/__tests__/ListReorderNames.test.tsx: clear; it agrees with the engine and the handle on the shared snapshot type and its unread value.
User impact
A reorderable
Listnames each row's handle "Reorder" and the row's name, or its place, "Reorder item N", for a nameless row. A passive effect set it, running only when the handle rendered. A screen reader could hear a stale name:Problem and solution fit
The place and the label's content exist only in the DOM, so the effect missed changes made elsewhere.
The reorder session now registers the list's rows and its handles' label elements with Core's
observeMutations, across numbering toggles. It keeps each handle's label naming, and the place only for a handle named after it. The handle reads them throughuseSyncExternalStore, so only a change renders it. The nameless-row warning moves into the session, once per handle.Expected behavior and authority
spec:AST-103FR4 names the handle "Reorder" and the row's label. A row with no text takes its place, with a development warning.Smallest restoration
useCommittedRef. This followsarchitecture:react-component-runtimeINV17 and DEC-3, and supersedes refactor(List): write the reorder refs at commit, not in render #10804. No discriminating test is reachable: every list getter reads one ref, and the hint's effect runs after either write.positionOf. f24dc2b, 1205c61 and 2c1fdb4 keep an unchanged name's snapshot (INV9).Evidence
ListReorderNames.test.tsxfail on main 07e325e. They cover a row above that goes, a reorder, and a label that gains and loses text.aria-labelrenders once per mount, and once when it hydrates.Scope
Testing
Every run below is at 1f32922, on main 31aacff.
pnpm exec vitest run packages/core/src/List packages/core/src/reorderable packages/lab/src/ListInput packages/lab/src/TransferList packages/core/src/hooks/useCommittedRef.test.tsx packages/core/src/Layer: 46 files, 951 tests, including the six cases inListReorderNames.test.tsx.pnpm exec tsc --noEmit -p packages/core/tsconfig.json: 0 errors.pnpm lint:strict: 0 errors, with main's 237 warnings.ListReorderMode,ListReorderPointer,ListReorderTouchandListDividersinteraction specs pass 56 in Chromium, and 38 in WebKit with 18 skipped. The TransferList and ListInput reorder a11y specs pass 13 in Chromium.pnpm check:knowledge, the Changeset coverage and public text checks pass.Public and internal API delta
Public: none. No package entry exports anything new,
@astryxdesign/core/internal/reorderincluded.Internal, in Core's List folder:
listReorderEngine.tsxadds theListReorderHandleNametype and the session'sregisterHandleLabel,handleNameOf,subscribeHandleNamesandattachNames, and removespositionOf.ListReorderHandle.tsxexportsUNREAD_HANDLE_NAME.Size: +543/−92 lines in 5 files (31aacff..1f32922).
History
useCommittedRef. One hand edit: the names readthis.rows.read(list), as refactor(reorder): the controller reads a collection's rows through a reader #11199'spositionOfdid.useCommittedRef, and the session'suseMemolists the stable ref.handleNameOf, so an unchanged name keeps its snapshot. A new case counts the handle's renders.useLayer, the layer the mode hint shows. The merge needs no hand edit, and the change's own diff keeps its patch-id.ListItem, the row that renders the handle. The merge needs no hand edit, and the change's own diff keeps its patch-id.