-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Odyssey: Add opt-out notice for odyssey #72937
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~31 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1756 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~197 bytes added 📈 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
@@ -27,7 +27,8 @@ export async function jetpack_site_xhr_wrapper( params, callback ) { | |||
'X-WP-Nonce': config( 'nonce' ), | |||
}, | |||
isRestAPI: false, | |||
apiNamespace: 'jetpack/v4/stats-app', | |||
apiNamespace: | |||
params.apiNamespace === 'jetpack/v4' ? params.apiNamespace : 'jetpack/v4/stats-app', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the API is jetpack/v4
then we don't need to prefix it with stats-app
, which are only for compensated APIs. This allows Odyssey to access existing jetpack/v4
APIs, but will probably need nonce etc to function in some cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as described! I am still determining the annotation suggestion; please feel free to ship without updating it if unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7798671 Thank you @kangzj for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Proposed Changes
packages/components/src/notice-banner
which is forked from Notice adjusted to use Calypso standardjetpack/v4
API directlyTesting Instructions
PejTkB-3E-p2
<- enable New Stats if not yet enabled/wp-admin/admin.php?page=stats
manage your settings
/wp-admin/admin.php?page=stats
x
Pre-merge Checklist
Related to #72736