Skip to content

feat(examples): task form layout recipe (#44)#47

Merged
IgorShevchik merged 13 commits into
mainfrom
claude/create-responsive-layout-602hb
May 22, 2026
Merged

feat(examples): task form layout recipe (#44)#47
IgorShevchik merged 13 commits into
mainfrom
claude/create-responsive-layout-602hb

Conversation

@IgorShevchik
Copy link
Copy Markdown
Collaborator

@IgorShevchik IgorShevchik commented May 21, 2026

Summary

  • Added FormTaskFormExample.vue — Bitrix24-style task form built exclusively from standard b24ui components, shown in both nuxt and demo playgrounds under /components/form
  • Added ### Task form layout section to docs/content/docs/2.components/form.md with ::component-example + ::prompt block
  • Added skills/b24-ui-nuxt/references/recipes/task-form.md — full reference recipe with component tree, key patterns, and common mistakes

What the layout demonstrates

Single-column composition using only standard b24ui components — no custom CSS beyond component props:

Block Components
Task title B24Input size="xl" no-border
Description area B24Editor (markdown) + B24EditorToolbar (mention, lists) + attach/expand buttons
Responsible persons B24Card b24ui.body='p-0' + divide-y rows + B24Avatar + B24InputDate + B24Popover+B24Calendar for date picker
Watchers B24Card with #header slot + B24Avatar
Action sections 17 × B24Button with active/inactive color states (air-secondary-accent-2 / air-secondary-no-accent) + aria-pressed
Form actions B24Button air-primary (Save) + B24Button air-tertiary (Cancel)

Test plan

  • Open /components/form in demo playground — task form section renders correctly
  • Open /components/form in nuxt playground — same
  • Verify B24InputDate deadline field opens calendar picker via B24Popover
  • Verify active action buttons are visually distinct from inactive ones
  • Verify action buttons have correct aria-pressed attribute
  • Check form.md in docs — task form section renders with example and prompt block

Closes #44

IgorShevchik pushed a commit that referenced this pull request May 21, 2026
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
@IgorShevchik
Copy link
Copy Markdown
Collaborator Author

Review note (cross-PR consistency) — there's a problem with the examples navigation that needs to be resolved before this can merge. Flagging it on both this PR and #46, since they collide.

1. Guaranteed merge conflict with #46. Both this PR and #46 add an examples const and a { id: 'examples', label: 'Examples' } group to the same lines of playgrounds/nuxt/app/composables/useNavigation.ts and playgrounds/demo/app/composables/useNavigation.ts (plus an icon import at the same spot). Whichever lands second will hit a git conflict in four files.

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 pages/components/* and routes to /components/* (there is no pages/examples/ tree today). A composed "example" is still surfaced through the relevant component docs page via ::component-example (your form.md change does this correctly).

3. Recipe not registered in skills/index.json. This PR adds skills/b24-ui-nuxt/references/recipes/task-form.md but does not add it to skills/index.json. That file enumerates skill files explicitly, so the recipe won't be picked up. Compare with #46, which correctly registers references/recipes/detail-panel.md in skills/index.json — that's the pattern to follow.

Suggested resolution: agree on one convention with #46 (route tree + whether a top-level examples group is even introduced now), land one of them first, then rebase the other on top. Also add the recipe to skills/index.json.


Generated by Claude Code

IgorShevchik pushed a commit that referenced this pull request May 22, 2026
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
@IgorShevchik IgorShevchik force-pushed the claude/create-responsive-layout-602hb branch from 55c0ad2 to 6c4ef71 Compare May 22, 2026 07:55
claude added 9 commits May 22, 2026 12:21
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
@IgorShevchik IgorShevchik force-pushed the claude/create-responsive-layout-602hb branch from 6c4ef71 to 69ff90e Compare May 22, 2026 12:22
claude added 4 commits May 22, 2026 12:41
- 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
@IgorShevchik IgorShevchik merged commit 33980e0 into main May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example: Task Form Layout Using Standard Components

2 participants