A whitespace-only tile description beats the query description (the #476 sibling)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với src/dashboard/application/dashboard-viewer-session.ts:562-563 và so sánh cách xử lý tiêu đề hiện tại với src/application/dashboard-tree-model.ts:279. Xem lại phần render trong src/ui/dashboard.ts:1881-1883, sau đó thêm một regression test cho mô tả tile chỉ chứa khoảng trắng; hoàn tất khi nó fallback về mô tả truy vấn mà không render một phần tử mô tả rỗng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Spotted while shipping #429 phase 1 (#476's title trim). Deferred deliberately:
#476's scope, and its acceptance criterion, are about the title — a blank
description corrupts no accessible name, so it did not belong in that PR.
The gap
src/dashboard/application/dashboard-viewer-session.ts:562-563 — one line below
the title that #429 phase 1 just fixed:
const description = (typeof tile.description === 'string' && tile.description)
|| (typeof query?.spec?.description === 'string' ? query.spec.description : '');
A whitespace-only tile.description is truthy, so it beats the query's own
description exactly the way a whitespace-only tile.title used to beat the query
name. dashboardTileV1.description carries no minLength, so such a document is
schema-legal.
What the user sees
src/ui/dashboard.ts:1881-1883 renders the description conditionally:
ts.description ? h('span', { class: 'dash-tile-desc', title: ts.description }, ts.description) : null
so " " renders an empty .dash-tile-desc span with a whitespace title
tooltip, taking vertical space under the heading, instead of falling back to the
query description that is sitting right there.
The inconsistency it leaves
src/application/dashboard-tree-model.ts:279 already trims tile description for
its search haystack. After #429 phase 1 the tree and the viewer agree on title and
disagree on description — the tree treats blank as absent, the canvas does not.
Suggested fix
The same one-line shape phase 1 applied to the title:
const authoredDescription = typeof tile.description === 'string' ? tile.description.trim() : '';
const description = authoredDescription
|| (typeof query?.spec?.description === 'string' ? query.spec.description : '');
Needs its own test, for the same reason the title trim did: it is a behaviour
change for existing documents carrying such a description. No shipped UI writes
tile.description today, so only hand-authored and imported documents are
affected.
Related, same class, but NOT for this issue
src/ui/file-menu.ts reads dashboard.title untrimmed (:630, :648, :1010,
:1044 — the last one produces a whitespace export filename), while
src/application/dashboard-tree-model.ts:382 trims it. That one belongs to
#429 phase 3, which owns the Dashboard rename pencil and is already required
to "apply the same rule to any title this issue's dialogs write" — it is recorded
in the #429 ship log rather than filed here.
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 2
- Merge trung bình
- 1 giờ 17 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Altinity/altinity-sql-browser
-
inbox
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Altinity/altinity-sql-browser#605 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
inbox
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Altinity/altinity-sql-browser#509 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
flamegraphĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Altinity/altinity-sql-browser#684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Altinity/altinity-sql-browser#680 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
inbox
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Altinity/altinity-sql-browser#673 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Altinity/altinity-sql-browser
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
betagouv/mon-entreprise#4699 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jaegertracing/jaeger-ui#4547 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
linagora/twake-calendar-frontend#1467 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
need4deed-org/sdk#267 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
auth0/universal-login#414 ·
Maintainer thường phản hồi trong vòng 1 ngày