feat(examples): task form layout recipe (#44)#47
Conversation
Addresses multi-angle review of PR #47: - toolbarItems: computed -> plain const (no reactive deps) - emit('save') now carries the { title, description, deadline } payload - type actionButtons with IconComponent - B24Input title and B24InputDate deadline use the existing no-border prop for a clean heading and seamless in-card embedding - replace hardcoded personal name with a neutral placeholder - sync docs example with the widget (min-h-48, tooltip text) - recipe: drop repo-internal playground sections, document the borderless and const-toolbar patterns and common mistakes https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
|
Review note (cross-PR consistency) — there's a problem with the 1. Guaranteed merge conflict with #46. Both this PR and #46 add an 2. The two PRs implement the group inconsistently. This is the part to settle:
So the same nav group would point into two different route trees depending on which item you click. The current repo practice is that every playground page lives under 3. Recipe not registered in Suggested resolution: agree on one convention with #46 (route tree + whether a top-level Generated by Claude Code |
Addresses multi-angle review of PR #47: - toolbarItems: computed -> plain const (no reactive deps) - emit('save') now carries the { title, description, deadline } payload - type actionButtons with IconComponent - B24Input title and B24InputDate deadline use the existing no-border prop for a clean heading and seamless in-card embedding - replace hardcoded personal name with a neutral placeholder - sync docs example with the widget (min-h-48, tooltip text) - recipe: drop repo-internal playground sections, document the borderless and const-toolbar patterns and common mistakes https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
55c0ad2 to
6c4ef71
Compare
Responsive Bitrix24-style task form assembled from standard b24ui components — B24Editor, B24Card, B24Avatar, B24InputDate, B24Button. No custom CSS beyond component props. - TaskFormWidget.vue mirrored to nuxt and demo playgrounds - Dedicated page at /examples/task-form in both playgrounds - New "Examples" group added to useNavigation in both playgrounds - EditorTaskFormExample.vue added to docs examples - ::component-example + ::prompt block added to editor.md - skills/b24-ui-nuxt/references/recipes/task-form.md new recipe covering layout patterns, common mistakes and key component usage Closes #44 https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
The example is a task *form* layout, so it belongs under the Form component docs rather than Editor. Renamed the docs example component to FormTaskFormExample and re-anchored the ::component-example and ::prompt blocks under form.md. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Addresses multi-angle review of PR #47: - toolbarItems: computed -> plain const (no reactive deps) - emit('save') now carries the { title, description, deadline } payload - type actionButtons with IconComponent - B24Input title and B24InputDate deadline use the existing no-border prop for a clean heading and seamless in-card embedding - replace hardcoded personal name with a neutral placeholder - sync docs example with the widget (min-h-48, tooltip text) - recipe: drop repo-internal playground sections, document the borderless and const-toolbar patterns and common mistakes https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Next to the prescriptive full-spec prompt, add a "guided" ::prompt that instructs the AI assistant to ask clarifying questions (editor choice, fields, data binding, breakpoints, actions) and build incrementally, mirroring the collaborative workflow rather than dumping a full spec. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Align with the project convention of English-only labels, placeholders, tooltips, comments and sample data. Uses the canonical English section names from issue #44 (Results, Files, Checklists, Co-executors, Observers, Flow, Tags, Reminders, CRM elements, Parent task, Subtasks, Linked tasks, Gantt, Timeline planning, Time tracking, Custom fields) and Creator / Assignee / Deadline / Watchers for the sidebar. Applied across both playground widgets, the docs example, the form.md prompts and the skill recipe. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
CI typecheck failed: B24InputDate binds an @internationalized/date value (DateValue), not a native Date, and exposes no text placeholder. Switch deadline to shallowRef<CalendarDate | undefined>, drop the invalid text placeholder, and update the save payload type. Mirrored across both playground widgets, the docs example, the form.md prompt and the skill recipe. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Attach file, Expand editor, and Add watcher buttons had no accessible name, failing WCAG 2.1 SC 4.1.2. Added aria-label to all three across the demo widget, nuxt widget, docs example, and skill recipe. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
- Add FormTaskFormExample to form.vue in both playgrounds (follows existing pages/components/* convention, resolves conflict with #46) - Remove pages/examples/ tree and TaskFormWidget standalone components - Remove examples nav group from useNavigation.ts in both playgrounds - Register task-form recipe in skills/index.json https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
The contributing/documentation.md guideline requires ::prompt to live directly under ::component-example in the same ### subsection — never under a standalone ## Prompt top-level section. Remove the ## Prompt, ### Guided prompt, and ### Full spec prompt headings; both prompt blocks now sit directly after ::component-example inside ### Task form layout. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
6c4ef71 to
69ff90e
Compare
- Single-column layout (removed lg:flex-row) - actionButtons: add active flag; active=air-secondary-accent-2, inactive=air-secondary-no-accent - Move actionButtons block above footer (below sidebar cards) - Replace Expand1Icon with GoToLIcon - Deadline: B24InputDate + B24Popover/B24Calendar in trailing slot (matches record-edit section pattern) - Playground form.vue: w-full on task form card for clean full-width display https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Remove the guided ::prompt, keep a single concise full-spec prompt. Update the spec to reflect the redesigned component: single-column layout, B24Popover+B24Calendar for deadline, active/inactive actionButtons pattern, GoToLIcon. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Replace w-full with grow + max-w-[64rem] (= 2 × max-w-lg, the record-edit section's form content width) so the task form card no longer spans the full playground row. https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
- aria-pressed on actionButtons toggle buttons for accessibility - Remove "two-column on desktop" from form.md description (single-column) - Resize task form card to 1.3× record-edit width (max-w-[41.6rem]) - Rewrite task-form.md recipe to match current implementation https://claude.ai/code/session_01EyoVAehvtYFhFwAtkBSafs
Summary
FormTaskFormExample.vue— Bitrix24-style task form built exclusively from standard b24ui components, shown in both nuxt and demo playgrounds under/components/form### Task form layoutsection todocs/content/docs/2.components/form.mdwith::component-example+::promptblockskills/b24-ui-nuxt/references/recipes/task-form.md— full reference recipe with component tree, key patterns, and common mistakesWhat the layout demonstrates
Single-column composition using only standard
b24uicomponents — no custom CSS beyond component props:B24Input size="xl" no-borderB24Editor(markdown) +B24EditorToolbar(mention, lists) + attach/expand buttonsB24Card b24ui.body='p-0'+divide-yrows +B24Avatar+B24InputDate+B24Popover+B24Calendarfor date pickerB24Cardwith#headerslot +B24AvatarB24Buttonwith active/inactive color states (air-secondary-accent-2/air-secondary-no-accent) +aria-pressedB24Button air-primary(Save) +B24Button air-tertiary(Cancel)Test plan
/components/formin demo playground — task form section renders correctly/components/formin nuxt playground — sameB24InputDatedeadline field opens calendar picker viaB24Popoveraria-pressedattributeform.mdin docs — task form section renders with example and prompt blockCloses #44