💡 Full floating attach corners (element + parent)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c, typescript
Hướng nghiên cứu
Bắt đầu tại ops.ts:168 và bài kiểm thử bị lỗi trong nm/repro/floating-attach/test/floating-attach.test.ts. So sánh packing ở đó với việc giải mã trường được mô tả tại src/clayterm.c:546, bao gồm dạng attach-point số và giá trị mặc định của parent. Được xem là hoàn tất khi cả hai trường hợp dot.x được báo cáo đều neo vào góc parent được yêu cầu, zIndex được giữ nguyên và hành vi hiện có của dạng số vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem?
A floating element can choose where it attaches, but not where it attaches on its parent. The floating.attachTo: PARENT path always anchors to the parent's top-left corner, so a width:5 parent's float that asks to sit at the parent's right edge should land at dot.x = parent.x(0) + parent.width(5) = 5 but lands at 0. Underneath, we pack zIndex directly over the parent-corner slot and never write the z-index bits, so floating.zIndex: 5 actually sets the parent corner and the requested z-index is dropped.
Describe the solution you'd like
Make the parent corner first-class via a structured attachPoints.{element, parent} (exact names TBD), each one of Clay's 9 attach points; the element corner anchors onto the chosen parent corner:
open("dot", {
floating: {
attachTo: ATTACH_TO_PARENT,
attachPoints: {
element: 0,
parent: 6,
}, // element LEFT_TOP onto parent RIGHT_TOP
},
});
The 9 attach points form a 3×3 grid around the parent, mirroring CSS anchor positioning's position-area. C already decodes both corners and z-index, so the fix is JS-side: pack element into bits 8-15, parent into 16-23, and move zIndex to 24-31. The number form keeps working as the element corner with parent defaulting to LEFT_TOP.
Describe alternatives you've considered
Compute the offset yourself—read the parent's info bounds from a prior render and set floating.x to parent.width. That needs a two-pass render, breaks on resize, can't express vertical anchors, and leaves zIndex unusable.
Additional context
Failing test case on nm/repro/floating-attach (test · diff); both cases report dot.x = 0 today. The change likely lives in ops.ts:168 (pack mis-slots attachPoints/zIndex); src/clayterm.c:546 already reads parent from bits 16-23 and zIndex from 24-31.
- Ngôn ngữ chính
- TypeScript
- Star
- 42
- Fork
- 2
- Merge trung bình
- 2 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 12
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 bombshell-dev/tty
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bombshell-dev/tty#61 · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
bombshell-dev/tty#129 ·
-
question
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
bombshell-dev/tty#112 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
bombshell-dev/tty#82 ·
-
bug
bombshell-dev/tty#81 · 1 người được giao ·
Tất cả issue của bombshell-dev/tty
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Đang mởbug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Client support matrix inclusion Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
calcite-components needs triage refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Esri/calcite-design-system#15203 ·