Skip to content

refactor(ui): QueryaModalDialog and QueryaConfirmDialog on QueryaButton, off shadcn - #1418

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
issue/1338-confirm-dialog-querya-button
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 3 commits into
devfrom
issue/1338-confirm-dialog-querya-button

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Part of #1338 and #1365 (closes neither)

First dialog migration of epic #1331, using QueryaButton (#1408, in dev). The shared dialog shell is the one place that puts a footer in front of many dialogs, so it goes first.

Change (lib/shared/widgets/querya_modal_dialog.dart)

  • QueryaConfirmDialog: Cancel is now QueryaButton.ghost, the main action QueryaButton.primary or .destructive, all lg, per the standard in docs/ui-kit.md (was OutlineButton + PrimaryButton / DestructiveButton).
  • QueryaModalDialog: the close icon is a QueryaButton.icon (sm, tooltip Close) instead of a raw Material IconButton; the actions row sits in a QueryaControlScope(lg), so QueryaButtons passed by callers without a size are lg too.
  • No shadcn_flutter import: Gap -> SizedBox, Text -> material.Text, the scheme from context.colors. The file leaves the shadcn allow-list of test(guards): lib/shared must not import shadcn_flutter (ratchet allow-list) #1409.

Visible difference (intended)

Cancel in confirm dialogs loses its outline and is a ghost button, as the standard says; the close icon has a tooltip.

Tests

Two assertions looked for shadcn's DestructiveButton (querya_modal_dialog_test.dart, querya_ui_kit_behavior_test.dart); they now look for a QueryaButton with the destructive variant. The rest (texts, taps, results) are unchanged.

Not in this PR

Callers that pass shadcn buttons in actions keep working (they are plain widgets); migrating each dialog to QueryaDialogActions (#1417) is the rest of #1338.

Not run locally; CI is the check.

…on, off shadcn

The confirm dialog footer is a ghost Cancel and a primary / destructive main
action at lg, the close icon is a QueryaButton.icon, gaps are SizedBoxes and
the colour scheme comes from context.colors. The module leaves the shadcn
allow-list; the two tests that looked for DestructiveButton look for a
destructive QueryaButton. Part of #1338 and #1365.
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend ui User interface components and widgets ux User experience, keyboard shortcuts and interactions P2 Medium priority / Parity & Refactoring labels Oct 11, 2026
…no scope

QueryaButton asserted on a missing QueryaThemeScope, which dialogs built under
a bare app (and their tests) do not have. workbenchOrDefault falls back to the
defaults for the ambient brightness; the scheme comes from context.colors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets ux User experience, keyboard shortcuts and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant