Skip to content

Clean up modern plugins to remove dead code#18639

Merged
trueadm merged 1 commit intofacebook:masterfrom
trueadm:cleanup-modern-event-plugins
Apr 16, 2020
Merged

Clean up modern plugins to remove dead code#18639
trueadm merged 1 commit intofacebook:masterfrom
trueadm:cleanup-modern-event-plugins

Conversation

@trueadm
Copy link
Copy Markdown
Contributor

@trueadm trueadm commented Apr 16, 2020

This PR is a cut out of #18615, so we break down the amount of changes in that PR, but have the same end goal. Furthermore, this PR requires #18638 to land before the CI will pass as this PR removes some files that are dead once that PR is merged.

This PR removes the non-modern event system paths (dead code) from the modern event plugin modules. It also inlines the following modules into DOMModernPluginEventSystem, to show they belong with that specific event system only:

  • accumulateTwoPhaseListeners
  • accumulateEventTargetListeners.js
  • accumulateEnterLeaveListeners.js

This also means we don't need to export internals of the DOMModernPluginEventSystem used for useEvent and EventTarget instances. Lastly, I made sure all the modern event test files set the modern event system flag to be enabled as per outlined in #18615.

@trueadm trueadm requested review from bvaughn and gaearon April 16, 2020 15:31
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 16, 2020
@trueadm trueadm requested a review from necolas April 16, 2020 15:38
@trueadm trueadm force-pushed the cleanup-modern-event-plugins branch from 95cf6d2 to 81618f3 Compare April 16, 2020 17:48
@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Apr 16, 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 3c39940:

Sandbox Source
affectionate-pine-xx2nl Configuration

@sizebot
Copy link
Copy Markdown

sizebot commented Apr 16, 2020

Details of bundled changes.

Comparing: b1a0831...3c39940

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.production.min.js 0.0% 0.0% 119.68 KB 119.68 KB 37.5 KB 37.51 KB NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.25 KB 75.25 KB 20.14 KB 20.15 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 22.89 KB 22.89 KB 8.52 KB 8.52 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.55 KB 123.55 KB 38.66 KB 38.66 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 13.23 KB 13.23 KB 4.89 KB 4.9 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.19 KB 1.19 KB 697 B 698 B UMD_PROD
react-dom-server.node.development.js 0.0% 0.0% 147.37 KB 147.37 KB 39.01 KB 39.01 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 23.3 KB 23.3 KB 8.68 KB 8.68 KB NODE_PROD
ReactDOMForked-dev.js -0.1% -0.2% 1.04 MB 1.04 MB 236.84 KB 236.38 KB FB_WWW_DEV
ReactDOMForked-prod.js -0.0% -0.9% 448.5 KB 448.36 KB 78.97 KB 78.24 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.28 KB 5.28 KB 1.73 KB 1.73 KB NODE_DEV
react-dom.development.js 0.0% 0.0% 906.25 KB 906.25 KB 199.43 KB 199.43 KB UMD_DEV
ReactDOMForked-profiling.js -0.0% -0.9% 459.47 KB 459.32 KB 80.88 KB 80.15 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 155.33 KB 155.33 KB 39.53 KB 39.53 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.3% 1.16 KB 1.16 KB 658 B 660 B NODE_PROD
react-dom.production.min.js 0.0% 0.0% 119.55 KB 119.55 KB 38.26 KB 38.26 KB UMD_PROD
react-dom-server.browser.production.min.js 0.0% 0.0% 22.99 KB 22.99 KB 8.54 KB 8.54 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.3 KB 123.3 KB 39.52 KB 39.52 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 955.58 KB 955.58 KB 213.16 KB 213.17 KB FB_WWW_DEV
react-dom.development.js 0.0% 0.0% 862.65 KB 862.65 KB 196.91 KB 196.91 KB NODE_DEV
react-dom-server.browser.development.js 0.0% 0.0% 146.15 KB 146.15 KB 38.76 KB 38.76 KB NODE_DEV
ReactDOM-dev.js -0.1% -0.2% 1.04 MB 1.04 MB 236.68 KB 236.22 KB FB_WWW_DEV
ReactDOMServer-dev.js 0.0% 0.0% 165.25 KB 165.25 KB 41.99 KB 41.99 KB FB_WWW_DEV
ReactDOM-prod.js -0.0% -0.9% 447.92 KB 447.77 KB 78.89 KB 78.16 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 70.09 KB 70.09 KB 19.64 KB 19.64 KB NODE_DEV
ReactDOMServer-prod.js 0.0% 0.0% 53.47 KB 53.47 KB 12.91 KB 12.91 KB FB_WWW_PROD
ReactDOM-profiling.js -0.0% -0.9% 458.88 KB 458.73 KB 80.81 KB 80.07 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 13.1 KB 13.1 KB 4.8 KB 4.8 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 56.1 KB 56.1 KB 13.84 KB 13.84 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1 KB 1 KB 609 B 610 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 9.98 KB 9.98 KB 3.36 KB 3.36 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 53.2 KB 53.2 KB 13.64 KB 13.65 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 9.73 KB 9.73 KB 3.25 KB 3.25 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 3c39940

@trueadm trueadm force-pushed the cleanup-modern-event-plugins branch from 81618f3 to 3c39940 Compare April 16, 2020 17:53
@sizebot
Copy link
Copy Markdown

sizebot commented Apr 16, 2020

Details of bundled changes.

Comparing: b1a0831...3c39940

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-server.browser.development.js 0.0% 0.0% 162.44 KB 162.44 KB 41.29 KB 41.29 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 23.46 KB 23.46 KB 8.62 KB 8.62 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 128.5 KB 128.5 KB 40.16 KB 40.16 KB NODE_PROFILING
ReactDOM-dev.js -0.1% -0.1% 1.01 MB 1.01 MB 231.61 KB 231.32 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.1% 1.2 KB 1.2 KB 705 B 706 B UMD_PROD
ReactDOM-prod.js -0.0% -0.9% 436.5 KB 436.35 KB 77.25 KB 76.55 KB FB_WWW_PROD
ReactDOM-profiling.js -0.0% -0.9% 447.4 KB 447.25 KB 79.12 KB 78.43 KB FB_WWW_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 4.55 KB 4.55 KB 1.58 KB 1.58 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.2% 1.02 KB 1.02 KB 617 B 618 B NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.27 KB 75.27 KB 20.15 KB 20.15 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.24 KB 13.24 KB 4.9 KB 4.9 KB UMD_PROD
ReactDOMTesting-dev.js 0.0% 0.0% 929.04 KB 929.04 KB 207.62 KB 207.62 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 70.1 KB 70.1 KB 19.65 KB 19.65 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 154.12 KB 154.12 KB 40.77 KB 40.77 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.12 KB 13.12 KB 4.81 KB 4.81 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% 0.0% 23.75 KB 23.75 KB 8.76 KB 8.76 KB NODE_PROD
react-dom-server.browser.development.js 0.0% 0.0% 152.91 KB 152.91 KB 40.52 KB 40.52 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 23.35 KB 23.35 KB 8.61 KB 8.61 KB NODE_PROD
react-dom.development.js 0.0% 0.0% 939.93 KB 939.93 KB 205.87 KB 205.88 KB UMD_DEV
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 56.11 KB 56.11 KB 13.85 KB 13.85 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 124.31 KB 124.31 KB 39.73 KB 39.73 KB UMD_PROD
ReactDOMForked-dev.js -0.1% -0.1% 1.01 MB 1.01 MB 231.76 KB 231.48 KB FB_WWW_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 0.0% 10 KB 10 KB 3.36 KB 3.36 KB UMD_PROD
ReactDOMServer-dev.js 0.0% 0.0% 161.75 KB 161.75 KB 41.08 KB 41.08 KB FB_WWW_DEV
react-dom.profiling.min.js 0.0% 0.0% 128.17 KB 128.17 KB 40.93 KB 40.93 KB UMD_PROFILING
ReactDOMForked-prod.js -0.0% -0.9% 437.07 KB 436.92 KB 77.33 KB 76.63 KB FB_WWW_PROD
ReactDOMServer-prod.js 0.0% 0.0% 52.74 KB 52.74 KB 12.74 KB 12.74 KB FB_WWW_PROD
react-dom.development.js 0.0% 0.0% 894.9 KB 894.9 KB 203.32 KB 203.33 KB NODE_DEV
ReactDOMForked-profiling.js -0.0% -0.9% 447.97 KB 447.82 KB 79.22 KB 78.53 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 53.21 KB 53.21 KB 13.65 KB 13.65 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.29 KB 5.29 KB 1.73 KB 1.74 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 124.5 KB 124.5 KB 38.92 KB 38.92 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.5% 1.17 KB 1.17 KB 666 B 669 B NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 3c39940

@trueadm trueadm merged commit 32bb44c into facebook:master Apr 16, 2020
@trueadm trueadm deleted the cleanup-modern-event-plugins branch April 16, 2020 19:10
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