mui / mui/base-ui

[popover] Allow `Positioner` parts to be omitted for native CSS anchoring

Đang mở
#1,663 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: popover type: enhancement
Ngôn ngữ chính
TypeScript
Star
10.9k
Fork
543
Merge trung bình
2 ngày 1 giờ
Pull request đã merge (30 ngày)
114

Mô tả

When trying to use native CSS anchor positioning by simply omitting the `Positioner` part to position `Popup` with CSS `anchor`, an error is thrown:

> Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within .

Native CSS Anchoring doesn't support `Arrow` yet, but it can optionally consume the context instead of throwing for future use. `Popup` doesn't need to consume the positioner context at all (`FloatingFocusManager` can work with `FloatingRootContext` from the root instead).

This way, the Floating UI logic doesn't need to be included in the bundle once CSS anchoring is widespread if they just omit the `Positioner` part in their JSX.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách lần theo các phần Popover.Positioner và Popup, đặc biệt là PopoverPositionerContext và FloatingFocusManager. Kiểm tra cách việc bỏ qua Positioner hiện kích hoạt lỗi thiếu context, sau đó xác minh rằng CSS anchor positioning hoạt động mà không cần Floating UI, trong khi Arrow có thể sử dụng context khi context hiện diện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
css, react, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.