GraphiteEditor / GraphiteEditor/Graphite

[Blocked on browser support] Refactor floating menus to use HTML <dialog> and CSS popover with anchor()

Đang mở
#2,142 2 bình luận 0 reaction 1 người được giao Được @Keavon nhận Xem trên GitHub
Web
Ngôn ngữ chính
Rust
Star
27.2k
Fork
1.3k
Merge trung bình
20 giờ 5 phút
Pull request đã merge (30 ngày)
57

Mô tả

Modal dialogs (such as Preferences, About Graphite, closing save confirmations, etc.) should be refactored to use a [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element.

Popover menus (such as menu lists and popovers) should be refactored to use the [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using) paired with [CSS anchor positioning](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning/Using) to replace the current CSS positioning hackery (which is fragile and isn't compatible with keeping up with scrolling its floating menu spawner within a pane with scrollbars). Care will need to be taken to ensure it works with [nested popovers](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#nested_popovers).

This is **blocked** on CSS anchor positioning reaching all modern browsers ([caniuse](https://caniuse.com/css-anchor-positioning)). As of January 2026, Firefox and Safari have only just rolled out support and we should probably wait a few months until users update.

![capture](https://github.com/user-attachments/assets/afdfb9e2-f6ac-4610-86d3-38f329d65e45)

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

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.