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
Member

@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
Copy link

@codesandbox codesandbox 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 sizebot commented Mar 2, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 4cd1e11

@sizebot
Copy link

@sizebot 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

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);

This comment has been minimized.

@threepointone

threepointone Mar 3, 2020
Contributor

dope

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

Fix

Fix
@trueadm trueadm force-pushed the trueadm:modern-event-tests branch from 54be398 to 4cd1e11 Mar 3, 2020
@trueadm trueadm merged commit 8e6a08e into facebook:master Mar 3, 2020
23 checks passed
23 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_and_process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: build_experimental Your tests passed on CircleCI!
Details
ci/circleci: flow Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint_build Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build Your tests passed on CircleCI!
Details
ci/circleci: test_build_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_devtools Your tests passed on CircleCI!
Details
ci/circleci: test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: test_source Your tests passed on CircleCI!
Details
ci/circleci: test_source_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_source_persistent Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod_experimental Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
@trueadm trueadm deleted the trueadm:modern-event-tests branch Mar 3, 2020
sthagen added a commit to sthagen/react that referenced this pull request Mar 3, 2020
Modern Event System: add plugin handling and forked paths (facebook#18195)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.