Repository navigation
feat(cli): kanban-board page template — fills Tools - Kanban Board category - #3322
thedjpetersen wants to merge 2 commits into
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
…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.
|
Update (commit 011c01c): the board is now interactive — cards move between columns via HTML5 drag-and-drop (pointer devices; Note for maintainers: #3314 is an earlier, independent kanban template PR — happy to coordinate on which approach lands. |
|
@kentonquatman added a Kanban example recently. Let's build off of that one. |
Why
Part of the frame-first template series (#3315, #3316). The
Tools - Kanban Boardcategory has existed inTemplateCategorywith 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:Layout height="fill"with LayoutHeader (Heading + count, SegmentedControl All/Mine/High-priority, sprint Selector, New task Button)scroll-snap x mandatoryat ≤768px (swipe-per-column) viauseMediaQuery, responsive contract documented at the frame rootdocs layout): Token labels, StatusDot priority, Avatar assignee, DEL-nnn idsTesting
pnpm typecheck:template-docspass; sandbox sync +tsc --noEmit: 0 kanban errorsastryx template kanban-board --skeletonrenders