Skip to content

feat(lab): add TransferListSelector and Storybook examples - #4870

Merged
ernestt merged 3 commits into
mainfrom
codex/transfer-list-independent
Aug 10, 2026
Merged

ernestt merged 3 commits into
mainfrom
codex/transfer-list-independent

Conversation

@ernestt

@ernestt ernestt commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the complete TransferList Lab package and its Storybook documentation directly on top of main:

  • TransferList as the lower-level controlled content primitive
  • TransferListSelector as the default selector-popover experience
  • immediate and staged commit behaviors
  • grouping, locked transfer/reorder actions, bulk actions, search, narrow layout, large pools, and table-column settings examples

This replaces the earlier stacked #4773 / #4869 arrangement. It intentionally changes only packages/lab/** and apps/storybook/**; it does not depend on #4769 and contains no Core changes.

API arbitration

We evaluated three shapes:

  1. TransferList only, composed manually in ComplexSelector — maximally flexible, but every consumer must rebuild the field, popup sizing, draft state, Apply/Cancel behavior, dismissal cleanup, accessibility, and busy-state wiring.
  2. Examples only inside ComplexSelector — avoids another public Lab component, but makes the common case copy/paste documentation and allows implementations to drift.
  3. A standalone TransferListSelector built from ComplexSelector, plus TransferList for advanced composition — selected. The common selector workflow gets one consistent API while saved views, presets, custom headers, and custom footers can still compose the lower-level primitive.

TransferListSelector defaults to immediate commits and owns the selector popover. commitBehavior="staged" adds draft state and Apply/Cancel. The component uses only the ComplexSelector API currently on main; future Core trigger variants or controlled-open APIs are not prerequisites.

Validation

  • 37 focused TransferList tests pass
  • Lab production build passes
  • Storybook typecheck passes
  • Storybook production build passes and includes Docs plus all seven examples
  • ESLint, Prettier, sync, package-boundary, changeset, demo-media, executable-bit, and CLI-structure checks pass

Screenshot

TransferListSelector

* feat(lab): prototype TransferList

* feat(lab): document advanced TransferList compositions

* fix(storybook): remove TransferList section padding

* feat(lab): align TransferList drag behavior

* feat(lab): add TransferListSelector shell

* refactor(lab): keep TransferListSelector self-contained
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
astryx Ignored Ignored Aug 10, 2026 7:26pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 10, 2026
@ernestt
ernestt enabled auto-merge (squash) August 10, 2026 19:33
@ernestt
ernestt merged commit dccdabe into main Aug 10, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

New Components

TransferList (@astryxdesign/lab) · View in Storybook
Metric Value
Bundle Size (ESM) N/A
Bundle Size (CJS) 484B
Lines of Code 1493
Source Files 4
Complexity Very High (194)
Exports TransferList, type, type, TransferListSelector, type, type, transferListVars
Props Count N/A
Has Tests Yes
Has Stories Yes

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/lab N/A 3.9KB 1.7KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 10, 2026
@github-actions
github-actions Bot deleted the codex/transfer-list-independent branch August 11, 2026 06:22
cixzhang added a commit that referenced this pull request Aug 12, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 12, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 14, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
cixzhang added a commit that referenced this pull request Aug 25, 2026
…ets guard

MoreMenu hand-assembled its `astryx-more-menu` theme target with
`stableClassName()` and string concatenation. Route it through
`themeProps()`/`mergeProps()` instead, so the target sits on the same
reflection surface as every other one. The rendered DOM is unchanged.

themingTargets.test.ts grows the second direction of the guard —
documented targets must actually be rendered — and scans both
`@astryxdesign/core` and `@astryxdesign/lab` package-wide for the
`docs` block. `docsZh` stays a per-directory check.

Rebased onto main, which moved 69 commits under it:

- `themeProps()` gained a third `options.legacyNames` argument
  (#4712, #4890) for targets renamed behind a deprecation window. The
  extractor only read the first two arguments, so `astryx-checkbox`,
  `astryx-radio` and `astryx-radio-dot` — emitted through
  `legacyNames` and deliberately documented with `deprecatedFor` —
  looked unrendered. Teach it to read `legacyNames` string literals as
  rendered sites of their own, with the same prop keys (they land on the
  same element), and cover it with two extractor tests.
- ListInput (#4740) and TransferList (#4870) landed after this branch
  was cut and render five undocumented targets between them. Document
  them, the same way the other lab components here are documented.
- Stepper's targets were extended on main with the same
  `indicatorPosition` entry this branch added, plus
  `astryx-step-indicator` and the matching `docsZh` block; kept
  main's superset. Both sides' new MoreMenu tests are kept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant