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
DEV warning for "strict effects mode" (Facebook only) #20694
DEV warning for "strict effects mode" (Facebook only) #20694
Conversation
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 97ca787:
|
a18097f
to
cc293cf
Compare
Details of bundled changes.Comparing: bb1b795...97ca787 react-art
react-dom
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (experimental) |
Details of bundled changes.Comparing: bb1b795...97ca787 react-art
react-dom
Size changes (stable) |
cc293cf
to
edf51d1
Compare
Oops I need to tweak this to use two flags: one to enable it for FB only and one to allow developers to opt-out. The reason here is that I can't set a GK to 100% of employees. Will update momentarily. |
CI test |
This commit adds a temporary DEV mode warning that explains strict effects mode. It's intended for Facebook builds only, because the warning includes Facebook specific instructions for how to disable it (using a GK blocklist). If we decide to add a similar warning for OSS we'll need to revisit both the wording and the opt-out mechansim. This new behavior is controlled by two separate flags. This lets us (a) can enable it for 100% of Facebook engineers¹² and (b) provide a simple opt-out mechanism for engineers who know about the mode and no longer want to see the warning. ¹ This warning will not be logged for legacy applications that aren't in strict effects mode. ² GKs within Facebook can't be enabled for 100% of a population.
741626e
to
97ca787
Compare
Opened an internal Diff with an alternate way of adding this warning (via a wrapper around the create-root entry points). |
Closing in favor of the Facebook wrapper approach mentioned above. |
This commit adds a temporary DEV mode warning that explains strict effects mode. It's intended for Facebook builds only, because the warning includes Facebook specific instructions for how to disable it (using a GK blocklist). If we decide to add a similar warning for OSS we'll need to revisit both the wording and the opt-out mechansim.
Note that this new warning is controlled by two new feature flags so that (1) we can enable it for 100% of Facebook engineers¹² only (no OSS) and (2) provide a simple opt-out mechanism for engineers who know about the mode and no longer want to see the warning.
¹ This warning will not be logged for legacy applications that aren't in strict effects mode.
² GKs within Facebook can't be enabled for 100% of a population.
enableStrictEffectsModeDevWarningForFacebookOnly
is enabled statically at build time and is used to enable the warning within Facebook builds only.bypassStrictEffectsModeDevWarningForFacebookOnly
is a dynamic flag and provides an opt-out mechanism (allowlisting yourself to a GK).Both flags are gated behind an extra
__DEV__
check so they should not impact production build size.