Skip to content

Add animation system exploration doc - #3

Merged
cixzhang merged 1 commit into
mainfrom
exploration/animation-system
Jan 10, 2026
Merged

cixzhang merged 1 commit into
mainfrom
exploration/animation-system

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

TL;DR: We can probably just use stylex and CSS since AI can generate the animations and it doesn't really make a difference either way besides a few trade offs. I'd recommend that we have animations 'just work' and read from the config so no one has to think about it besides tweaking some speed and type presets.

Documents how animation fits into XDS's constraint-based architecture:
- Animation is styling's sibling (same zero-styling rules apply)
- Theme-controlled via motion tokens (duration, easing, per-component config)
- CSS/StyleX implementation using @starting-style for enter animations
- Component animation patterns for overlays, collapse, popups, toasts, tabs

Includes decision rationale for CSS over Motion library and next steps
for prototyping to validate the approach.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

Nice thanks for looking into this. I wonder if framer could still be good in certain situations like layout plugins.

@cixzhang
cixzhang merged commit 701f190 into main Jan 10, 2026
1 check passed
@cixzhang
cixzhang deleted the exploration/animation-system branch January 13, 2026 16:41
cixzhang added a commit that referenced this pull request Apr 26, 2026
…-system

Add animation system exploration doc
josephfarina pushed a commit that referenced this pull request May 29, 2026
`xds init` with no flags launches an interactive @clack/prompts wizard.
In a non-interactive context (CI, piped stdin, no TTY) it blocked forever
on the first p.confirm prompt — a hang, not a failure.

Fix: detect a missing TTY at the top of the interactive branch and fail
fast (exit 1) with guidance to use `--all` / `--features`, writing no
files. The explicit non-interactive paths (--features/--all/--remove-agents)
are unaffected — they short-circuit before the guard.

The --json contract for init is owned centrally by the index.mjs preAction
allowlist (init is intentionally not on JSON_SUPPORTED), so this change
deliberately does NOT re-check --json — it only closes the non-TTY hang
(checklist #3: non-interactive safety).

Adds init-noninteractive.test.mjs: spawns the real CLI with stdin 'ignore'
(no TTY) and proves it exits 1 (not a SIGTERM timeout), prints actionable
guidance, writes no files, and that --features still works without a TTY.
josephfarina added a commit that referenced this pull request Jun 1, 2026
`xds init` with no flags launches an interactive @clack/prompts wizard.
In a non-interactive context (CI, piped stdin, no TTY) it blocked forever
on the first p.confirm prompt — a hang, not a failure.

Fix: detect a missing TTY at the top of the interactive branch and fail
fast (exit 1) with guidance to use `--all` / `--features`, writing no
files. The explicit non-interactive paths (--features/--all/--remove-agents)
are unaffected — they short-circuit before the guard.

The --json contract for init is owned centrally by the index.mjs preAction
allowlist (init is intentionally not on JSON_SUPPORTED), so this change
deliberately does NOT re-check --json — it only closes the non-TTY hang
(checklist #3: non-interactive safety).

Adds init-noninteractive.test.mjs: spawns the real CLI with stdin 'ignore'
(no TTY) and proves it exits 1 (not a SIGTERM timeout), prints actionable
guidance, writes no files, and that --features still works without a TTY.
humbertovirtudes added a commit to humbertovirtudes/astryx that referenced this pull request Jul 12, 2026
Address review feedback (cixzhang, ernestt) and self-review findings:

- Rename result field getRowKey -> idKey for parallelism with the Table prop
  (cixzhang): <Table idKey={grouped.idKey} />. Config input stays `getRowKey`.
- Fix O(n^2) row keying (self-review): the positional fallback used
  flattened.indexOf(item) per row. Prebuild an item->index Map once per
  flattened array so key lookup is O(1) — O(n^2) -> O(n) for the whole table.
- Chevron alignment (ernestt meta#1): the chevron is a standalone, chrome-less
  button flush with the table's leading edge (no heavy button background),
  still keyboard-operable; the whole header row remains a click convenience.
- Divider (ernestt meta#2): add a bottom border beneath each group header row.
- Typography (ernestt meta#3): the group label uses emphasized body (semibold at
  body size), not a larger text size; count is regular weight.
- Tests (10, all green): add renderGroupHeader coverage, empty-data,
  collapse-persistence-across-data-change (count updates, stays collapsed),
  toggle-and-back, aria-expanded on the header row, and a named keyboard-
  operable toggle button.

Tags: ai-generated

This diff was generated with AI assistance (Navi). The implementation and
tests were produced by an AI agent; the human author reviewed and approved
the changes.
humbertovirtudes added a commit that referenced this pull request Jul 14, 2026
* feat(core): add useTableGroupedRows plugin

Groups a flat data array into collapsible section rows. Each distinct
groupBy value becomes a full-width section-header row with a chevron
toggle, group label, and member count; collapsing hides that group's rows
while keeping the header visible.

- Mirrors useTableRowExpansionState: consumer owns the collapsedGroups set;
  the hook returns {data, plugin, getRowKey} — pass to Table data/plugins/idKey.
- Supports renderGroupHeader (custom header content) and groupOrder.
- Synthetic header rows are Proxy-wrapped so user cell renderers can't throw
  on them before transformBodyRow replaces the row with a full-width cell.
- Storybook stories (default, initially-collapsed, custom order/header),
  docsite hook doc + example block, unit tests, and a Table Lab toggle.

* feat(core): idKey output, O(n) keying, UI polish for useTableGroupedRows

Address review feedback (cixzhang, ernestt) and self-review findings:

- Rename result field getRowKey -> idKey for parallelism with the Table prop
  (cixzhang): <Table idKey={grouped.idKey} />. Config input stays `getRowKey`.
- Fix O(n^2) row keying (self-review): the positional fallback used
  flattened.indexOf(item) per row. Prebuild an item->index Map once per
  flattened array so key lookup is O(1) — O(n^2) -> O(n) for the whole table.
- Chevron alignment (ernestt #1): the chevron is a standalone, chrome-less
  button flush with the table's leading edge (no heavy button background),
  still keyboard-operable; the whole header row remains a click convenience.
- Divider (ernestt #2): add a bottom border beneath each group header row.
- Typography (ernestt #3): the group label uses emphasized body (semibold at
  body size), not a larger text size; count is regular weight.
- Tests (10, all green): add renderGroupHeader coverage, empty-data,
  collapse-persistence-across-data-change (count updates, stays collapsed),
  toggle-and-back, aria-expanded on the header row, and a named keyboard-
  operable toggle button.

Tags: ai-generated

This diff was generated with AI assistance (Navi). The implementation and
tests were produced by an AI agent; the human author reviewed and approved
the changes.
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.

2 participants