Skip to content

feat(dialog): support form workflows - #23

Merged
maxigimenez merged 1 commit into
mainfrom
codex/issue-21-dialog-form
Sep 4, 2026
Merged

maxigimenez merged 1 commit into
mainfrom
codex/issue-21-dialog-form

Conversation

@maxigimenez

Copy link
Copy Markdown
Owner

Closes #21.

Summary

  • add a block children body to Dialog while keeping description as prose-only accessible description
  • add sm/md dialog sizes and a scroll-contained responsive panel
  • add confirmDisabled, confirmLoading, and confirmLoadingLabel, passed through to the existing Button
  • include native selects, textareas, editable content, and explicit tab stops in the focus trap
  • let an open 16 Bits Select consume the first Escape before its containing dialog closes
  • document the API and add interactive form/loading Storybook coverage

Review notes

The change is additive: the default sm width remains 372px and existing confirmation-only call sites do not need changes. Form controls render in .bits-dialog__content, outside the description <p>, and aria-describedby continues to reference only description.

At 480px and below, the panel uses token-based 16px gutters and stacks actions without changing their DOM/keyboard order. The body scrolls independently when content exceeds the viewport, while the action footer remains available.

Verification

  • npm run check under Node 24.13.1
    • ESLint: passed
    • TypeScript: passed
    • Vitest: 29/29 passed
    • ESM/CJS/declaration build: passed
    • package verification: 22 public exports verified
    • static Storybook build: passed
  • browser interaction checks at 1024×768
    • medium panel rendered at 560px with no horizontal overflow
    • first Escape closed the open Select listbox and kept the dialog open
    • choosing an agent and entering a prompt enabled the confirm action
    • Ocean loading action was disabled and exposed aria-busy="true"
  • responsive browser check at 320×700
    • panel rendered 288px wide with 16px gutters
    • no horizontal overflow
    • footer actions stacked with matching DOM and visual order

Visual evidence

Ember · initial invalid form

Ember form dialog with disabled start action

Ember · completed form

Ember form dialog with selected agent, prompt, and enabled start action

Ocean · loading confirmation

Ocean dialog with loading confirmation action

Ember · 320px viewport

Responsive Ember form dialog at a 320px viewport

@maxigimenez
maxigimenez merged commit 0d28dbb into main Sep 4, 2026
1 check passed
@maxigimenez
maxigimenez deleted the codex/issue-21-dialog-form branch September 4, 2026 08:31
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.

Dialog cannot host a form

1 participant