-
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
Customize Woo Express and free trial themes screen #78570
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~2036 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 (~1911 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. |
const wooExpressPlans = [ | ||
PLAN_WOOEXPRESS_MEDIUM, | ||
PLAN_WOOEXPRESS_SMALL, | ||
PLAN_WOOEXPRESS_MEDIUM_MONTHLY, | ||
PLAN_WOOEXPRESS_SMALL_MONTHLY, | ||
]; | ||
|
||
if ( ! currentPlan ) { | ||
const productSlug = currentPlan?.productSlug || site?.plan?.product_slug; |
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.
It seems site
data also has the current plan slug. This is necessary for better UX since site
data is already available when the themes screen is loaded. Otherwise, we'll have the upsell component flicker in-and-out and the themes list not loading properly since hidden filter is added after its first load.
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.
Thanks for working on this! Looks good and tested well. 👍
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.
I did a functional review. There was only one thing that didn't work as expected:
[x] Observe that only WooCommerce themes appear
[] Observe that the categories filter is not shown - For me, the categories still appeared but I was not shown any results when I clicked on them. This made things feel a little bit broken:
[x] Observe that the banner copy is Upgrade to a plan to upload your own themes!
[x] Click on the banner CTA, it should navigate you to the plans page
[x] Go back to Appearance > Themes and activate a theme different to your current theme
[x] Observe that you're redirected to the Congratulations screen
Environment:
D114232
Patch on sandbox- Checked out
add/1181-wooexpress-custom-theme
- Sandboxed WordPress.com, public-api.wordpress.com, and Calypso
- new WooExpress trial site from woocommerce.com/start
- Browser: Chrome Version 114.0.5735.133
- macOS: 13.4 Ventura
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.
Nice work on this!
LGTM and tested well for me 👍 🚀
Hi, @JessBoctor! Thanks for the review!
Sorry this wasn't clear in the instructions. The categories in this context are these: |
… for Woo Express and free trial sites
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
…small to choose from
4314366
to
f0f2ac1
Compare
* Tweak Woo Express and free trial selector to use site for faster performance * Force theme upsell banner for free trial sites, hide theme categories for Woo Express and free trial sites * Add hidden theme filters to force woo-on-plans filter * Redirect woo-on-plan themes to congrats page on theme activation * Customize upsell nudge arrangement for Woo Express and free trial * Add back current plan to selectors as a backup * Update client/my-sites/themes/theme-showcase.jsx Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> * Fix hiddenFilters inserting empty array into join breaking other filters * Hardcode store filter instead since 5 WooCommerce only themes is too small to choose from --------- Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
) * Customize Woo Express and free trial themes screen (#78570) * Tweak Woo Express and free trial selector to use site for faster performance * Force theme upsell banner for free trial sites, hide theme categories for Woo Express and free trial sites * Add hidden theme filters to force woo-on-plans filter * Redirect woo-on-plan themes to congrats page on theme activation * Customize upsell nudge arrangement for Woo Express and free trial * Add back current plan to selectors as a backup * Update client/my-sites/themes/theme-showcase.jsx Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> * Fix hiddenFilters inserting empty array into join breaking other filters * Hardcode store filter instead since 5 WooCommerce only themes is too small to choose from --------- Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com> * Remove premium tier for Woo Express or free trial sites --------- Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Related to Automattic/wc-calypso-bridge#1181
Proposed Changes
Implement theme page customizations for Woo Express free trial sites.
woo-on-plans
hidden filter forWooCommerce
themesWooCommerce
themes to show the congratulations page after activatingsite
state data while plan data is loadedTesting Instructions
public-api.wordpress.com
to your sandboxUpgrade to a plan to upload your own themes!
Pre-merge Checklist