-
Notifications
You must be signed in to change notification settings - Fork 45.7k
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
Modern Event System: Support nested portal/root boundaries #18201
Conversation
116d535
to
74c11ad
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 116d535:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit fae3558:
|
589f059
to
3f98724
Compare
3f98724
to
5584a7f
Compare
Disable flag Fix Fxi Fix
8691885
to
f4d8e96
Compare
f4d8e96
to
db121ba
Compare
fix Fxi
db121ba
to
38be430
Compare
38be430
to
fae3558
Compare
This PR adds support for multiple nested portal/root boundaries to the modern event system fork. Specifically, where you embed another React root or portal into an existing React sub-tree. Event propagation and the filtering and finding of ancestors is an important role here, and similar to the legacy event system, requires special logic to find the right ancestors to play through the plugin event system.
I've added a bunch of tests and extensive comments around the parts that get added in this PR. Note: this PR should not affect any of the existing legacy event system. I've tested this internally and all tests relating to this behavior seems to work as expected, but given it's all behind a flag that is disabled, the risk should be minimal. Also, if you turn on the flag, all our internal Jest tests pass with this code.
Left to do: