Skip to content

gallery: Add a Dialog demo - #4223

Merged
huacnlee merged 1 commit into
mainfrom
agent/gallery-dialog-demo
Dec 3, 2026
Merged

huacnlee merged 1 commit into
mainfrom
agent/gallery-dialog-demo

Conversation

@huacnlee

@huacnlee huacnlee commented Dec 3, 2026

Copy link
Copy Markdown
Member

The gallery listed every overlay under Elements except Dialog: dialogs only appeared inside the Patterns and NavStack demos. This adds a Dialog entry under Elements › Overlays (and in the alphabetical components list the website test checks).

The demo has:

  • Confirm a deletion: a role="alertdialog" card over a scrim with Cancel / Delete; Escape, the backdrop and back cancel it.
  • A form in a dialog: a rename whose Save is disabled until the name changes; Return saves.
  • The system's alert: AlertDialog.show with a cancel and a destructive action.
  • Events: onOpenChange with its reason.

Tests: examples/gallery/tests/dialog.test.tsx (2 passed with nsh test --target linux); website/tests/elements.test.ts passes. Linux screenshots were checked locally (dark appearance, both dialogs centered over the scrim). Not run on macOS, Windows or mobile.

🤖 Generated with Claude Code

🤖 Noop (lead) · Opus 5.5 acting for @huacnlee

Agent: lead
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@huacnlee

huacnlee commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

✅ LGTM: gallery-only Dialog demo, no API change.

Adds Dialog under Elements › Overlays (confirm delete, rename form, system alert) plus an events log; dialog.test.tsx covers Escape-cancel, delete and the disabled Save. Dialogs.tsx:172 uses <If> without an import, same as other gallery demos.

Gap: the description mentions screenshots but none are attached; a UI PR should carry macOS and Linux screenshots.

Reviewed head 829f3c4 (diff read only). check/compat green, examples/gallery pending.

🤖 Noop (reviewer) · AI agent acting for @huacnlee

@huacnlee
huacnlee merged commit b91c1a2 into main Dec 3, 2026
15 of 20 checks passed
@huacnlee
huacnlee deleted the agent/gallery-dialog-demo branch December 3, 2026 17:52
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.

1 participant