Skip to content
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

Merged
merged 3 commits into from
Mar 5, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 3, 2020

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:

  • Add support for legacy internal FB Primer (along with flag)

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 3, 2020
@trueadm trueadm force-pushed the modern-event-multiple-roots branch from 116d535 to 74c11ad Compare March 3, 2020 15:40
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 3, 2020

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:

Sandbox Source
practical-chandrasekhar-0fr3e Configuration

@sizebot
Copy link

sizebot commented Mar 3, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against fae3558

@sizebot
Copy link

sizebot commented Mar 3, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against fae3558

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 3, 2020

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:

Sandbox Source
unruffled-archimedes-dmtp9 Configuration

@trueadm trueadm force-pushed the modern-event-multiple-roots branch 5 times, most recently from 589f059 to 3f98724 Compare March 4, 2020 20:22
@trueadm trueadm force-pushed the modern-event-multiple-roots branch from 3f98724 to 5584a7f Compare March 4, 2020 23:45
@trueadm trueadm closed this Mar 5, 2020
@trueadm trueadm deleted the modern-event-multiple-roots branch March 5, 2020 00:31
@trueadm trueadm restored the modern-event-multiple-roots branch March 5, 2020 00:33
@trueadm trueadm reopened this Mar 5, 2020
@trueadm trueadm force-pushed the modern-event-multiple-roots branch from db121ba to 38be430 Compare March 5, 2020 00:45
@trueadm trueadm force-pushed the modern-event-multiple-roots branch from 38be430 to fae3558 Compare March 5, 2020 08:12
@trueadm trueadm merged commit 60b11f6 into facebook:master Mar 5, 2020
@trueadm trueadm deleted the modern-event-multiple-roots branch March 5, 2020 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants