Nested buttons from TooltipTrigger without asChild
Maintainer thường phản hồi trong vòng 2 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
- 73/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ệ
- react, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu với packages/client/src/components/ui/tooltip.tsx và kiểm tra các vị trí sử dụng TooltipTrigger được liệt kê trong merge-charges/index.tsx, download-csv-button.tsx, close-document-button.tsx, preview-document-modal.tsx và template-manager.tsx. Kiểm tra các bài kiểm thử hoặc story hiện có của component, sau đó xác minh trang All Charges và các tab Charges và Balance không có cảnh báo lồng nhau, đồng thời tooltip hoạt động như mong đợi trên các nút bị vô hiệu hóa. Hoàn tất khi các cảnh báo đó không còn và có bài kiểm thử hoặc story bao quát trường hợp tooltip trên nút bị vô hiệu hóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
Some uses of the shadcn TooltipTrigger (packages/client/src/components/ui/tooltip.tsx) omit asChild. The Radix trigger renders its own <button>, so when it wraps a <Button> the page contains a button inside a button. React logs a validateDOMNesting warning, and the markup is invalid HTML (focus and click handling can misbehave).
Confirmed in a browser:
packages/client/src/components/common/merge-charges/index.tsx(MergeChargesButton):DialogTrigger→TooltipTrigger→Button, three buttons deep. It shows on every charges table with merge selection (All Charges, business and tax category Charges tabs, …).packages/client/src/components/common/buttons/download-csv-button.tsx(DownloadCSVButton):TooltipTrigger→Button. It shows on business-ledger balance views (the business and tax category Balance tabs and the full-screen ledger).
Other <TooltipTrigger> uses without asChild to check:
packages/client/src/components/common/buttons/close-document-button.tsx(two)packages/client/src/components/common/modals/preview-document-modal.tsxpackages/client/src/components/reports/dynamic-report/dialogs/template-manager.tsx
Fix
Use <TooltipTrigger asChild> around the button. A disabled <button> fires no pointer events, so where the tooltip has to show while the button is disabled (the merge button explains why merging is unavailable; the CSV button says "Preparing download…"), wrap the button in a <span> and make the span the asChild trigger. Nested triggers (DialogTrigger inside TooltipTrigger) each need asChild.
Done when
No validateDOMNesting warning on the All Charges page or the Charges and Balance tabs. The tooltips still show, including on disabled buttons, and there is a test or story for the disabled-tooltip case.
- Ngôn ngữ chính
- TypeScript
- Star
- 30
- Fork
- 10
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 276
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 Urigo/accounter-fullstack
-
1214 annual-audit-workflow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Urigo/accounter-fullstack#5257 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
1214 annual-audit-workflow
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Urigo/accounter-fullstack#5256 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
annual-audit-workflow
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Urigo/accounter-fullstack#5252 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Urigo/accounter-fullstack#4919 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Business-trip attendee mutations throw TypeError instead of a clear error when no row is affectedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Urigo/accounter-fullstack#4917 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Urigo/accounter-fullstack
Issue tương tự
-
area: integrations documentation priority: P2 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eddiejaoude/StackDash#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bot:ai-assisted component:midnight-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-js#1790 ·
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:vscode bug has repro platform:macos platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày