feat(ui): QueryaButton: primary / secondary / ghost / destructive on Flutter primitives, no shadcn #1334
Copy link
Copy link
Closed
Labels
P1High priority / Core capabilityHigh priority / Core capabilityaccessibilityReduced motion, OS accessibility preferencesReduced motion, OS accessibility preferencesenhancementNew feature or requestNew feature or requestfrontendTheme parser epic label: frontendTheme parser epic label: frontenduiUser interface components and widgetsUser interface components and widgetsuxUser experience, keyboard shortcuts and interactionsUser experience, keyboard shortcuts and interactions
Description
Part of #1331. Needs the standard and the metrics issues.
Scope
lib/shared/widgets/querya_button.dart, exported from widgets.dart:
QueryaButton.primary(label: 'Save', onPressed: _save)
QueryaButton.secondary(label: 'Explain', icon: Icons.account_tree_outlined, onPressed: _explain)
QueryaButton.ghost(label: 'Cancel', onPressed: _close)
QueryaButton.destructive(label: 'Delete', onPressed: _delete) // filled
QueryaButton.secondary(label: 'Rollback', tone: QueryaButtonTone.destructive, ...) // red text
QueryaButton.icon(icon: Icons.refresh, tooltip: 'Refresh', onPressed: _reload) // = QueryaIconButtonCommon parameters: size (sm / md / lg, default from QueryaControlScope), icon, trailing, shortcutHint, loading, tooltip, isActive, compact (icon-only on narrow toolbars, label becomes the tooltip), autofocus, semanticLabel.
- Built on
Focus+MouseRegion+GestureDetector/InkResponse, noshadcn_flutterimport. - States and colours exactly as in the standard (hover / pressed / keyboard focus ring / disabled / loading / selected); colours from
context.workbench; motion fromQueryaMotion, instant under reduced motion. - Loading reserves the width of the label; the spinner is
QueryaSpinnerof the matching size. - Keyboard: Enter and Space activate, focus ring only for keyboard focus; semantics: button, label, enabled, busy.
QueryaActionButtonstays as a thin deprecated wrapper so the migration can go file by file.
Acceptance
- All variants x sizes x states render per the standard in every built-in theme and in a VS Code-imported one.
- Label never wraps; at 150 % text scale it ellipsizes without overflow; icon-only is square.
- No shadcn type in the file's imports.
- Widget tests: activation by pointer / Enter / Space, disabled and loading do not fire, tooltip delay is
kQueryaTooltipWait.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High priority / Core capabilityHigh priority / Core capabilityaccessibilityReduced motion, OS accessibility preferencesReduced motion, OS accessibility preferencesenhancementNew feature or requestNew feature or requestfrontendTheme parser epic label: frontendTheme parser epic label: frontenduiUser interface components and widgetsUser interface components and widgetsuxUser experience, keyboard shortcuts and interactionsUser experience, keyboard shortcuts and interactions
Activity
ZhuchkaTriplesix commentedon Oct 11, 2026
Done in dev:
QueryaButtonand its variants (#1417 onwards),QueryaActionButtonwrapper removed in #1454.