Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#1,689 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, flutter

Línea de trabajo

Empieza en querya_button.dart, en la disposición de la etiqueta y la lógica de los tooltips mencionadas alrededor de las líneas 375 y 513. Usa LayoutBuilder y TextPainter para comprobar si la línea única supera el ancho disponible de la etiqueta, conservando los tooltips explícitos y omitiendo los botones que solo tienen icono. Añade o actualiza pruebas para una etiqueta truncada, una etiqueta que cabe y los tooltips explícitos; el trabajo estará terminado cuando solo la etiqueta truncada reciba su texto completo como tooltip.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Dart
Estrellas
23
Forks
1
Merge medio
32 min
PR fusionados (30 d)
537

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QueryaHub/Querya-Desktop

Todos los issues de QueryaHub/Querya-Desktop

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.