ux(button): show the label as a tooltip when QueryaButton truncates it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- accessibility, frontend
Research direction
Start in querya_button.dart at the label layout and tooltip logic noted around lines 375 and 513. Use a LayoutBuilder and TextPainter to check whether the single line exceeds the label's available width, while preserving explicit tooltips and skipping icon-only buttons. Add or update tests for a truncated label, a fitting label, and explicit tooltips; done when only the truncated label gets its full text as a tooltip.
Written by the indexing model from the issue text.
Description
From a review of the component library, checked against dev.
Problem
QueryaButton draws its label with maxLines: 1 and TextOverflow.ellipsis (querya_button.dart, ~line 375). The tooltip is only shown when tooltip is set or the button is icon-only (~line 513). A label cut short by a narrow toolbar or a long translation therefore cannot be read by hovering.
Not this
Do not simply fall back to label as the tooltip: every button would then show "Save" over "Save" on hover.
Change
- Show the label as the tooltip only when it is actually truncated: lay the text out with a
TextPainter(maxLines: 1, the button's text style, the width the label gets) and checkdidExceedMaxLines, in aLayoutBuilder. An explicittooltipstill wins. - Check that a button which fits shows no tooltip, and that one which does not shows the full label.
Acceptance
- Narrow
QueryaButtonwith a long label shows the full label as a tooltip on hover. - A button that fits shows no tooltip of its own.
- The extra layout pass is not paid by buttons with an explicit tooltip, or by icon-only buttons.
Considered in the same review and left out
AppToastkeeps its overlay in statics (app_toast.dart:_entry,_overlay). The review wanted anAppToastScopefor multi-window use; the app has one window (bitsdojo_windowonly restyles it), so there is no problem to solve today.QueryaTabStripannouncing a tab change: each tab is aSemantics(button, selected)with its ownFocus, and arrow keys move focus, so a screen reader reads the selected tab already. An extraSemanticsService.announcewould read it twice.
- Dominant language
- Dart
- Stars
- 23
- Forks
- 1
- Avg merge
- 49m
- Merged PRs (30d)
- 496
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QueryaHub/Querya-Desktop
-
bug P3 ux
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
QueryaHub/Querya-Desktop#1837 ·
Maintainers usually reply within 1 day
-
enhancement P3
Difficulty 4/5 3-5 days Newbie friendliness 50/100
QueryaHub/Querya-Desktop#1838 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
QueryaHub/Querya-Desktop#1690 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 1-2 days Newbie friendliness 55/100
QueryaHub/Querya-Desktop#1683 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
QueryaHub/Querya-Desktop#1625 · 2 comments ·
Maintainers usually reply within 1 day
All issues in QueryaHub/Querya-Desktop
Similar issues
-
good first issue help wanted translation
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
blankframe-tech/ThrottleIQ#23 ·
Maintainers usually reply within 5 days
-
good first issue mobile P0 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
trufi-association/trufi-core#1024 ·
Maintainers usually reply within 14 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
@apps/catalog enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ymm-oss/flutter-mobile-project-template#699 ·
Maintainers usually reply within 15 days