Dialog with description + actions and no children: text touches the footer rule
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
- 77/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu với Dialog.svelte, có ví dụ tài liệu sử dụng cùng mẫu tiêu đề, mô tả và hành động, rồi kiểm tra cách định kiểu cho body và mô tả khi không có children. Thêm một kiểm thử hồi quy mount trường hợp này và kiểm tra khoảng cách trước các hành động; hoàn tất khi khoảng cách ít nhất là --ca-space-4 và kiểm thử chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: @codeatlasdev/ui 4.6.0 (seen in Atlas Desktop, WKWebView; headless WebKit shot)
What is wrong
A Dialog with title, description and actions but no children draws the description touching the footer rule: no space between the last line of the description and the border-top of .ca-dialog__actions (about 8px instead of the body's 16px + 16px padding). The empty .ca-dialog__body seems to collapse to 0 (flex: 0 1 auto; min-height: auto; overflow-y: auto in a height: fit-content panel).
Minimal repro
<Dialog bind:open title="Unpair Phone A3F9?" size="sm"
description="It is disconnected at once and can no longer reach this computer. To use it again, scan a new code.">
{#snippet actions()}
<Button variant="ghost">Cancel</Button>
<Button variant="destructive">Unpair</Button>
{/snippet}
</Dialog>
A confirm dialog is the most common use of exactly this shape (the usage example in Dialog.svelte's own doc comment is the same: title + description + actions).
Expected vs actual
Expected: the same breathing room above the footer as a dialog that has a body. Actual: text against the rule.
Workaround in Atlas
PhoneRow.svelte passes the sentence as a child (<p>) instead of description, so the body has content. Only one call site today; if more confirms appear, a ConfirmDialog wrapper goes under apps/desktop/src/lib/components/.
Proposed fix
Render .ca-dialog__body only when children exist, and give .ca-dialog__description a bottom padding (var(--ca-space-4)) when there is no body, so the footer rule is never closer than the body padding. A regression test: mount a Dialog with description and actions and no children, assert the distance between the description's bottom and the actions' top is at least --ca-space-4.
- Ngôn ngữ chính
- TypeScript
- Star
- 6
- Fork
- 3
- Merge trung bình
- 5 giờ 21 phút
- Pull request đã merge (30 ngày)
- 378
Chuẩn bị môi trường
- Không có Dockerfile hay 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 codeatlasdev/ui
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
codeatlasdev/ui#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:a11y area:components bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
codeatlasdev/ui#1336 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
codeatlasdev/ui#1292 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:components enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
codeatlasdev/ui#1198 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:components enhancement
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
codeatlasdev/ui#1105 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codeatlasdev/ui
Issue tương tự
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
sandbox-quantum/switch#2163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
automated issue report
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/dashboard kind/bug QA/dev-automation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug pydanty:is-working
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
pydantic/pydantic-ai#13939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self-host
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
funmusicplace/mirlo#2625 ·
Maintainer thường phản hồi trong vòng 1 ngày