Skip to content

feat(cli): kanban-board page template — fills Tools - Kanban Board category - #3322

Closed
thedjpetersen wants to merge 2 commits into
mainfrom
kanban-board-template
Closed

thedjpetersen wants to merge 2 commits into
mainfrom
kanban-board-template

Conversation

@thedjpetersen

Copy link
Copy Markdown
Contributor

Why

Part of the frame-first template series (#3315, #3316). The Tools - Kanban Board category has existed in TemplateCategory with no template behind it, and boards are a common request where generated code tends to improvise. This fills the category with a reference implementation.

What

packages/cli/templates/pages/kanban-board/ — a product delivery board:

  • Frame-first chrome: Layout height="fill" with LayoutHeader (Heading + count, SegmentedControl All/Mine/High-priority, sprint Selector, New task Button)
  • Horizontal scroller of 4 columns — 300px wide-screen, 85vw + scroll-snap x mandatory at ≤768px (swipe-per-column) via useMediaQuery, responsive contract documented at the frame root
  • ClickableCard task tiles (cards are the correct container for board tiles per docs layout): Token labels, StatusDot priority, Avatar assignee, DEL-nnn ids
  • Working useState+useMemo filters; EmptyState when a filter empties a column
  • Deterministic fixtures (no clocks/randomness); no drag-and-drop (out of scope by design)

Testing

  • pnpm typecheck:template-docs pass; sandbox sync + tsc --noEmit: 0 kanban errors
  • astryx template kanban-board --skeleton renders
  • vitest template command/api + xle suites: 52/52 pass

…tegory

Adds packages/cli/templates/pages/kanban-board (page.tsx + template.doc.mjs),
a product delivery board demonstrating the frame-first layout recipe:

- Layout height="fill" chrome: LayoutHeader with title + visible count,
  SegmentedControl filter (All / Mine / High priority), sprint Selector,
  and a New task action; LayoutContent padding=0 owns the board scroller.
- Horizontal scroller of four fixed-width columns (Backlog, In progress,
  In review, Done); 300px columns on wide screens, 85vw with
  scroll-snap x mandatory at <=768px via useMediaQuery.
- Cards are the container: ClickableCard tiles with title/summary Text,
  Token labels, and a footer of StatusDot priority, Avatar assignee,
  and short task id.
- Filters actually filter (useState + useMemo); deterministic fixtures;
  emptied columns render a compact EmptyState.
- CSS custom properties only (var(--spacing/color/radius-*)); no StyleX,
  no raw hex, no drag-and-drop.
@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 1, 2026 10:20pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026 •

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.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

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 Jul 1, 2026
…drop + menu)

Task-to-column assignment now lives in useState (seeded from the
deterministic fixtures), so cards can move between columns and the
segmented filter / sprint selector keep operating on the moved state.

Two move paths:
- Pointer: native HTML5 drag-and-drop, dependency-free. Cards are
  draggable (opacity feedback while dragging); columns are drop
  targets with an accent outline + accent-muted background while a
  drag hovers them. Gated to '(hover: hover) and (pointer: fine)' so
  draggable never interferes with touch scrolling.
- Menu (keyboard + touch): each card carries a MoreMenu with
  "Move to <column>" items for the other three columns. The card
  stays a ClickableCard — its accessible trigger is a hidden sibling,
  so the nested menu button is a valid independent interactive
  element.

Every move is announced via a visually-hidden aria-live="polite"
region ("Moved <task> to <column>"). Template doc description
updated to mention the interactive move paths.
@thedjpetersen

Copy link
Copy Markdown
Contributor Author

Update (commit 011c01c): the board is now interactive — cards move between columns via HTML5 drag-and-drop (pointer devices; (hover: hover) and (pointer: fine) guarded so touch scrolling is unaffected) and via an accessible per-card "Move to …" MoreMenu, with a visually-hidden aria-live region announcing moves. Filters operate on the moved state. All template checks re-run and passing (typecheck:template-docs, sandbox tsc, skeleton, 10/10 vitest).

Note for maintainers: #3314 is an earlier, independent kanban template PR — happy to coordinate on which approach lands.

@cixzhang

cixzhang commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@kentonquatman added a Kanban example recently. Let's build off of that one.

@cixzhang cixzhang closed this Jul 8, 2026
@cixzhang cixzhang added area:cli needs:code-review High-risk change (new package/component/API) — needs human code review before merge labels Jul 8, 2026
@github-actions
github-actions Bot deleted the kanban-board-template branch July 12, 2026 06:58

This branch was successfully deployed

1 active deployment
Preview — 011c01cf Deployed Jul 1, 2026 by vercel[bot]
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. needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants