Skip to content

ux(button): a cut-short QueryaButton label shows in full as a tooltip (#1689) - #1700

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
ux/button-truncated-label-tooltip
Oct 17, 2026
Merged

ZhuchkaTriplesix merged 3 commits into
devfrom
ux/button-truncated-label-tooltip

Conversation

@ZhuchkaTriplesix

@ZhuchkaTriplesix ZhuchkaTriplesix commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Closes #1689.

QueryaButton draws its label on one line with an ellipsis, and showed a tooltip only when tooltip was set or the button was icon-only. A label cut short by a narrow toolbar could not be read at all.

  • The label sits in a small render proxy that, after each layout, compares the text's full one-line width with the width it got and reports a change after the frame. Only a cut label gets a tooltip with its full text; a button that fits shows none, so "Save" does not pop up over "Save". Widening the space removes the tooltip again.
  • No LayoutBuilder: buttons are laid out inside IntrinsicWidth / IntrinsicHeight (tab strip, stats views, shadcn popovers), where a LayoutBuilder throws. The proxy passes intrinsic sizes through.
  • An explicit tooltip still wins, and those buttons skip the check. Icon-only buttons are unchanged.
  • The tooltip covers the label (most of the button), uses kQueryaTooltipWait and is excluded from semantics: the button's semantic label is already the full text.

Tests: a 90 px button with a long label gets a tooltip with the full text; a button that fits gets none; widening removes it; an explicit tooltip is kept and the label one is not added; a button inside IntrinsicWidth lays out without an error.

@github-actions github-actions Bot added enhancement New feature or request ui User interface components and widgets labels Oct 17, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit d4abb82 into dev Oct 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant