ux(button): show the label as a tooltip when QueryaButton truncates it
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
研究方向
從 querya_button.dart 中約第 375 行和第 513 行提到的標籤配置與 tooltip 邏輯開始。使用 LayoutBuilder 和 TextPainter 檢查單行文字是否超出標籤的可用寬度,同時保留明確指定的 tooltip,並略過純圖示按鈕。為遭截斷的標籤、能完整顯示的標籤,以及明確指定的 tooltip 新增或更新測試;只有遭截斷的標籤會以完整文字作為 tooltip 時,工作才算完成。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Dart
- 星號
- 23
- 分支
- 1
- 平均合併
- 31 分鐘
- 30 天內合併 PR
- 570
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
QueryaHub/Querya-Desktop 的其他 Issue
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflow未關閉bug frontend
難度 2/5 1-3 小時 新手友好度 82/100
QueryaHub/Querya-Desktop#1642 ·
維護者通常 1 天內回覆
-
bug error-handling settings
難度 1/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1637 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 88/100
QueryaHub/Querya-Desktop#1636 ·
維護者通常 1 天內回覆
-
enhancement marketplace
難度 2/5 1-3 小時 新手友好度 78/100
QueryaHub/Querya-Desktop#1635 ·
維護者通常 1 天內回覆
-
enhancement P3
難度 2/5 1-3 小時 新手友好度 79/100
QueryaHub/Querya-Desktop#1595 ·
維護者通常 1 天內回覆
查看 QueryaHub/Querya-Desktop 的全部 Issue
相似的 Issue
-
Standalone dash flashes as its own RSVP step (e.g. Russian dialogue)可能已有人在做 @bezig01 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
daniel-pimenta-cc/ledor#53 ·
-
enhancement firebase
難度 2/5 1-3 小時 新手友好度 65/100
brysonddelozier/scribbles#24 ·
-
bug good first issue P2-Medium
難度 2/5 1-3 小時 新手友好度 64/100
basictech01/uniun#305 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
daohoangson/flutter_widget_from_html#1657 ·
維護者通常 3 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
RevenueCat/purchases-flutter#1973 ·
維護者通常 1 天內回覆