Skip to content

Arunc/dialog cleanup#448

Open
arunc wants to merge 3 commits intocloudflare:mainfrom
arunc:arunc/dialog-cleanup
Open

Arunc/dialog cleanup#448
arunc wants to merge 3 commits intocloudflare:mainfrom
arunc:arunc/dialog-cleanup

Conversation

@arunc
Copy link
Copy Markdown

@arunc arunc commented Apr 24, 2026

fix(dialog): clarify alertdialog usage and fix demo inconsistencies
Improves the Dialog component documentation and demo examples to better
communicate the distinction between dialog and alertdialog roles.

Changes:

  • dialog.tsx: Added JSDoc note to Dialog.Root role prop clarifying
    that alertdialog should not include a header close button — users must
    respond via explicit action buttons in the footer
  • DialogDemo.tsx: Updated DialogWithActionsDemo to use a non-destructive
    "Save changes" flow (previously used "Delete"), reserving destructive
    actions for alertdialog demos only
  • DialogDemo.tsx: Added role="alertdialog" to DialogConfirmationDemo
    for correct accessibility semantics
  • DialogDemo.tsx: Wrapped "Create" primary buttons in Dialog.Close in
    DialogWithSelectDemo and DialogWithComboboxDemo so they close the dialog
  • dialog.mdx: Added missing description to "With Actions" example section

  • Reviews
    • bonk has reviewed the change
    • [x ] automated review not possible because: documentation and demo-only changes
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: no functional code changes

arun-chin and others added 3 commits April 24, 2026 14:57
- Change close buttons from secondary to ghost variant for consistency
- Update "With Actions" demo to show save workflow instead of delete
- Add alertdialog role to confirmation demo and update description to explain disablePointerDismissal behavior
- Wrap primary action buttons in Dialog.Close for proper dismissal
- Add JSDoc note about excluding header close button from alertdialog role
- Add descriptive text to "With Actions" example section
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.

2 participants