Skip to content

refactor(ui): QueryaIconButton is a thin wrapper over QueryaButton - #1471

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
issue/1440-one-icon-button
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 3 commits into
devfrom
issue/1440-one-icon-button

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Fixes #1440.

QueryaIconButton (Material InkWell, its own hover and ripple) and QueryaButton.icon (the standard's states) sat next to each other and reacted differently. QueryaIconButton is now a StatelessWidget that renders a ghost, icon-only QueryaButton:

  • isActive -> isActive, isDestructive -> destructive tone, size and borderRadius pass through; the tooltip is also the spoken label;
  • icon is an Icon (all 27 call sites already were): its glyph is used, size and colour come from the control size and the button's state;
  • color / activeColor are removed. 14 call sites used color: mutedForeground for a quiet look (dropped) or a colour as a toggled state (results toolbar: now isActive);
  • the 2 px keyboard-only focus ring and selected semantics come from QueryaButton.

Tests: the size tests measure the widget, the focus-ring test is replaced by a mapping test (variant, tone, active, tooltip), the disabled test checks onPressed.

QueryaToolbarButton (labelled, still Material) is left for the remaining buttons clean-up (#1445).

One icon-button system: same states, ring and semantics as every other
button, no Material InkWell path. The color / activeColor parameters go;
the call sites that used a colour as a toggled look pass isActive.

Refs #1440
@github-actions github-actions Bot added enhancement New feature or request frontend Theme parser epic label: frontend ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 11, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 642f63a into dev Oct 11, 2026
15 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1440-one-icon-button branch October 11, 2026 15:03
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant