mui / mui/base-ui

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

Offen
#1,663 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
component: popover type: enhancement
Vorherrschende Sprache
TypeScript
Sterne
10.9k
Forks
543
Ø Merge
2 T. 1 Std.
Gemergte PRs (30 T.)
114

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die Teile Popover.Positioner und Popup nachzuverfolgen, insbesondere PopoverPositionerContext und FloatingFocusManager. Prüfe, wie das Weglassen von Positioner derzeit den Fehler wegen fehlendem Context auslöst, und verifiziere anschließend, dass CSS anchor positioning ohne Floating UI funktioniert, während Arrow den Context verwenden kann, wenn er vorhanden ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
css, react, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.