Skip to content

Modern Event System: Add support for internal FB Primer #18210

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

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 4, 2020

This PR exposes a new flag to be used with the modern event system: enableLegacyFBPrimerSupport. This flag should be enabled in non-experimental internal bundles only.

When this flag is enabled, we attempt to detect internal FB Primer event heuristics, so we know to defer the internal React dispatching till after Primer has run. We do this using as one-time document event listener.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 4, 2020
@codesandbox-ci
Copy link

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

Sandbox Source
crazy-fog-dg7np Configuration

@sizebot
Copy link

sizebot commented Mar 4, 2020

Details of bundled changes.

Comparing: 355970a...bba107d

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js +0.2% +0.2% 405.57 KB 406.23 KB 73.92 KB 74.08 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% -0.0% 134.59 KB 134.59 KB 34.59 KB 34.59 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.5% 1.15 KB 1.15 KB 655 B 652 B NODE_PROD
react-dom-server.browser.production.min.js 0.0% -0.0% 19.99 KB 19.99 KB 7.39 KB 7.39 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 55.86 KB 55.86 KB 14.46 KB 14.46 KB NODE_DEV
react-dom.development.js 0.0% 0.0% 883.42 KB 883.53 KB 194.62 KB 194.65 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 9.99 KB 9.99 KB 3.37 KB 3.36 KB NODE_PROD
react-dom.production.min.js -0.0% -0.0% 115.95 KB 115.95 KB 37.13 KB 37.13 KB UMD_PROD
react-dom.profiling.min.js -0.0% -0.0% 119.48 KB 119.48 KB 38.34 KB 38.34 KB UMD_PROFILING
react-dom.development.js 0.0% 0.0% 840.7 KB 840.81 KB 192.23 KB 192.27 KB NODE_DEV
react-dom-server.node.development.js 0.0% -0.0% 128.91 KB 128.91 KB 34.43 KB 34.43 KB NODE_DEV
react-dom.production.min.js 0.0% -0.0% 116.03 KB 116.03 KB 36.49 KB 36.49 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% -0.0% 20.31 KB 20.31 KB 7.51 KB 7.51 KB NODE_PROD
react-dom.profiling.min.js 0.0% -0.0% 119.71 KB 119.71 KB 37.58 KB 37.58 KB NODE_PROFILING
ReactDOM-dev.js +0.1% +0.2% 937.99 KB 939.17 KB 208.92 KB 209.32 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.2% 394.24 KB 394.89 KB 71.74 KB 71.9 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.2% 3.68 KB 3.68 KB 1.33 KB 1.33 KB NODE_DEV
ReactDOMTesting-dev.js +0.1% +0.2% 897.62 KB 898.79 KB 200.44 KB 200.84 KB FB_WWW_DEV
ReactDOMTesting-prod.js 🔺+0.2% 🔺+0.2% 381.49 KB 382.14 KB 69.48 KB 69.63 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% -0.0% 127.69 KB 127.69 KB 34.17 KB 34.17 KB NODE_DEV
react-dom-test-utils.development.js 0.0% -0.0% 53.77 KB 53.77 KB 14 KB 14 KB UMD_DEV
ReactDOMTesting-profiling.js +0.2% +0.2% 381.49 KB 382.14 KB 69.48 KB 69.63 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% -0.0% 19.9 KB 19.9 KB 7.36 KB 7.36 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 3.34 KB 3.34 KB 1.26 KB 1.26 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.94 KB 10.94 KB 4.16 KB 4.16 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.17 KB 1.17 KB 691 B 690 B UMD_PROD
ReactDOMServer-dev.js 0.0% -0.0% 137.53 KB 137.53 KB 35.04 KB 35.04 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 49.55 KB 49.55 KB 13.51 KB 13.51 KB NODE_DEV
ReactDOMServer-prod.js 0.0% -0.0% 47.39 KB 47.39 KB 11.03 KB 11.03 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.2% 2.94 KB 2.94 KB 1.17 KB 1.17 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.79 KB 10.79 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 58.9 KB 58.9 KB 14.7 KB 14.7 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1013 B 1013 B 603 B 601 B NODE_PROD
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.26 KB 10.26 KB 3.49 KB 3.49 KB UMD_PROD

ReactDOM: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against bba107d

@sizebot
Copy link

sizebot commented Mar 4, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against bba107d

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.

I have some questions!

@trueadm trueadm force-pushed the modern-event-primer branch from 842e2e4 to 9610878 Compare March 4, 2020 14:33
@trueadm trueadm force-pushed the modern-event-primer branch 2 times, most recently from b634b90 to 1445095 Compare March 4, 2020 19:56
@trueadm trueadm requested a review from bvaughn March 4, 2020 22:58
@trueadm trueadm force-pushed the modern-event-primer branch from 1445095 to 653c938 Compare March 4, 2020 23:19
Address feedback

Ensure click onl

Fix

Address feedback

Fix
@trueadm trueadm force-pushed the modern-event-primer branch from 653c938 to bba107d Compare March 4, 2020 23:23
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Approving to unblock

@trueadm trueadm merged commit 503fd82 into facebook:master Mar 4, 2020
@trueadm trueadm deleted the modern-event-primer branch March 4, 2020 23:42
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.

5 participants