-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[popups] Require Portal
part
#1222
Conversation
Netlify deploy preview |
53db81e
to
a326ad8
Compare
Remove keepMounted on portal child parts Remove unused imports Remove keepMounted prop in tests
a326ad8
to
7a73a79
Compare
What makes the context non-shareable between different components' portals? |
We need to determine if the Another thing is I plan to make a new |
It feels like a step backward in terms of bundle size. #1248 tries to save a couple of bytes by removing a few strings but here we're adding a couple of components that are pretty much the same. How about we ensure that each PortalContext is consumed instead? In dev mode only, the Portal can set a flag in the nearest context marking it as read. If a context isn't read after the effect phase, a Portal must be missing. |
The PortalContext and then the effect suggestion is basically going to match split components - especially with the new Lite one for
Throwing an error in render ensures the whole app doesn't render and lets them know the tree is invalid in a very obvious way, which won't occur with the effect technique (will only appear as an error in the console, but otherwise the app runs fine) |
I found the main cause of why omitting nested popup/portal combinations doesn't properly work in Floating UI. I can also explore fixing that as an alternative to this PR, but the |
Yeah, having |
I think it's a good idea to still require the There are unresolved bugs like floating-ui/floating-ui#3060. In this case, a parent While |
Closes #1215
Portal
component, rather than a shared one now, as the context cannot be shared.keepMounted
prop onPositioner
andPopup
since it's specified byPortal
in all scenarios.