Skip to content

feat(dashboard): New preset form as a modal dialog (#1025)#1045

Merged
suleimansh merged 1 commit into
mainfrom
feat/preset-dialog
Jul 22, 2026
Merged

feat(dashboard): New preset form as a modal dialog (#1025)#1045
suleimansh merged 1 commit into
mainfrom
feat/preset-dialog

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Follow-up to #1044. The "New preset" create form was an inline panel that pushed the composer controls down when it opened. This renders it as a centered modal dialog instead.

What

  • New reusable ui/dialog.tsx — a shadcn-style dialog on Base UI's plain Dialog (same library as the existing confirm-dialog, but the non-alert variant, so a backdrop click / Esc / the ✕ dismisses it — right for a form, vs the focus-trapped no-light-dismiss AlertDialog used for destructive confirms). Themed with the same border-border / bg-card tokens.
  • PresetCreatePanel now renders its form (name, prompt, the "Save to: Just me / This project" scope, Cancel/Save) inside that dialog. Esc handling delegated to the Dialog; ⌘/Ctrl+Enter still saves.

Tests

  • Dashboard 325 pass / 0 fail (existing PresetCreatePanel/PresetsMenu/Composer tests cover the fields; they query through the portal unchanged). Typecheck clean, framework builds.

Notes

  • The wrapped form block keeps its original indentation to keep the diff minimal (inner elements read 2 spaces shallow). Happy to reindent if preferred.

The create form was an inline panel that pushed the composer controls
down when it opened. Render it in a centered modal instead, on a new
reusable shadcn-style Dialog (Base UI's plain Dialog, so a backdrop click
or Esc dismisses it, unlike the AlertDialog used for destructive confirms).
Same fields, including the Save to scope choice.
@suleimansh suleimansh self-assigned this Jul 22, 2026
@suleimansh
suleimansh marked this pull request as ready for review July 22, 2026 19:58
@suleimansh
suleimansh merged commit deb130e into main Jul 22, 2026
2 checks passed
@suleimansh
suleimansh deleted the feat/preset-dialog branch July 22, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant