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: add plugin handling and forked paths #18195

Merged
merged 2 commits into from
Mar 3, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 2, 2020

This PR adds more of the modern event system logic, enough that based single root/non-portal logic now works and removing the flag should result in most tests passing. Note: this PR does not affect the existing legacy event system, and the only real changes are to the new modern event system (which is behind a flag anyway). This PR consists of:

  • DOMModernPluginEventSystem.js adds event plugin handling, which is basically the exact same code from the legacy event system (except refactored to use basic for loops)
  • DOMModernPluginEventSystem-test.internal.js that showes basic capture/bubble events working correctly with the new system (on a single root/non-portal example)
  • ReactBrowserEventEmitter-test.internal.js uses the correct existing depending on the modern event system flag
  • ReactDOMEventListener-test.js disables or alters the expected outcome when using the new system
  • ReactTreeTraversal-test.js disables or alters the expected outcome when using the new system
  • EnterLeaveEventPlugin.js alters the logic to account for the new event system having roots rather than a single document listener, plus disables the first ancestor logic for the modern event system.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 2, 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 4cd1e11:

Sandbox Source
determined-snowflake-i690y Configuration

@sizebot
Copy link

sizebot commented Mar 2, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 4cd1e11

@sizebot
Copy link

sizebot commented Mar 2, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 4cd1e11

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only nits, feel free to disregard if annoying

// which also nicely allows us to support more without needing
// to add more individual code paths to support various
// events that do not bubble.
expect(handleImgLoadStart).toHaveBeenCalledTimes(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dope

@trueadm trueadm force-pushed the modern-event-tests branch 2 times, most recently from d63d2f6 to 54be398 Compare March 3, 2020 13:54
Fix

Fix

Fix
This was referenced Mar 15, 2021
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.

4 participants