Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

ux(button): show the label as a tooltip when QueryaButton truncates it

Offen Anfängerfreundlich
#1,689 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
dart, flutter

Rechercherichtung

Beginne in querya_button.dart bei der Beschriftungsanordnung und der Tooltip-Logik, die etwa in den Zeilen 375 und 513 erwähnt werden. Verwende LayoutBuilder und TextPainter, um zu prüfen, ob die einzelne Zeile die verfügbare Breite der Beschriftung überschreitet. Explizite Tooltips sollen dabei erhalten bleiben und Buttons, die nur aus einem Icon bestehen, übersprungen werden. Füge Tests für eine abgeschnittene Beschriftung, eine passende Beschriftung und explizite Tooltips hinzu oder aktualisiere sie. Fertig ist es, wenn nur die abgeschnittene Beschriftung ihren vollständigen Text als Tooltip erhält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement ui

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 check didExceedMaxLines, in a LayoutBuilder. An explicit tooltip still wins.
  • Check that a button which fits shows no tooltip, and that one which does not shows the full label.
Acceptance
  • Narrow QueryaButton with 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
  • AppToast keeps its overlay in statics (app_toast.dart: _entry, _overlay). The review wanted an AppToastScope for multi-window use; the app has one window (bitsdojo_window only restyles it), so there is no problem to solve today.
  • QueryaTabStrip announcing a tab change: each tab is a Semantics(button, selected) with its own Focus, and arrow keys move focus, so a screen reader reads the selected tab already. An extra SemanticsService.announce would read it twice.
Vorherrschende Sprache
Dart
Sterne
23
Forks
1
Ø Merge
31 Min.
Gemergte PRs (30 T.)
570

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QueryaHub/Querya-Desktop

Alle Issues in QueryaHub/Querya-Desktop

Ähnliche Issues

Weitere Issues zu Dart

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.