-
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
Refactor Woo state selectors #98796
Refactor Woo state selectors #98796
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~1085 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~1312 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 (~95 bytes removed 📉 [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. |
d1da9c5
to
4df592a
Compare
f0ced21
to
d950f5b
Compare
4df592a
to
25c12d9
Compare
d950f5b
to
5aaaf1d
Compare
25c12d9
to
c825fc8
Compare
4403452
to
bf9d7a7
Compare
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.
Thank you for working on this refactoring 🙇♂️. It looks good to me (LGTM) and has been tested well.
bf9d7a7
to
1b859ae
Compare
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17220599 Some locales (Hebrew, Indonesian, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Thank you @chihsuan for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
* Refactor isWoo and isWooPasswordless check * Rename is-woo-passwordless-jpc-flow * Remove isPartnerSignup * Fix tests
Proposed Changes
Currently, we have the following selectors:
getIsWooPasswordless
: Check if it's Woo passwordless should be enabled or not.isWooPasswordlessJPCFlow
: Check if it's Woo Jetpack Connection FlowisWooOAuth2Client
: Check if it's Woo (but not WOO JPC Flow)isPartnerSignupQuery
: Check if it's partner signup via https://woocommerce.com/partner-signupSince we've removed the passwordless feature flags in base branch, we can simplify the selectors to the following:
getIsWoo
: Return if it's Woo (either via WCCOM or WOO JPC Flow)getIsWCCOM
: Return if it's from WooCommerce.comisWooJPCFlow
: Return if it's Woo Jetpack Connection FlowAlso, the partner signup has been removed (https://woocommerce.com/partner-signup) (p1709724073968639/1709671857.265099-slack-C07418EA0), so we can remove
isPartnerSignupQuery
selector and related codeWhy are these changes being made?
Testing Instructions
Pre-merge Checklist