-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Additional changes for the core profiler plugins page #38616
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
Additional changes for the core profiler plugins page #38616
Conversation
|
Hi @adrianduffell, @woocommerce/ghidorah Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
|
Hi @ilyasfoo, @rjchow, @woocommerce/ghidorah Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: f852515
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
9deb1b4 to
e1138d1
Compare
53d73f3 to
9deb1b4
Compare
ilyasfoo
left a comment
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'm not sure what I'm doing wrong, but I wasn't able to get to the plugins page in core profiler. After business_info step, I get redirected straight to loading screen 🤔
My apologies 🙏 We need to turn off I've updated the test instructions. |
1f8da1f to
26c26d6
Compare
ilyasfoo
left a comment
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, @moon0326! I wasn't able to review the code properly since I think there's some unrelated commits in the PR, perhaps I'll defer reviewing them after RJ's PR is merged.
I'll review the UI and functionality first:
- It seems the extension is displayed as
Installedeven though it's deactivated. Is this intended? - In smaller screens,
Learn moreshould be hidden (screenshot) - I think it's also good to arrange the extensions as displayed in Figma, cc @verofasulo if you intend the extensions arrangement should follow design, or could it be random?
- Probably not related to this PR in particular, I observed some plugins were installed but not activated. I selected multiple plugins (Jetpack, MailPoet, GLA, Pinterest, TikTok, Shipping) and only some plugins were activated (Pinterest, TikTok). The action scheduler job
woocommerce_plugins_install_callbackwas complete. There was some PHP warnings indebug.logrelated to Pinterest, no fatal errors.
plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php
Show resolved
Hide resolved
|
Thank you for the review!
I think so, but let's check with @verofasulo ✋
Updated in cb255e7
According to Y5pUYSJPsGEud1vknUZhi8-fi-1698-36088 I think the order is correct. Do you see different order by any chance?
|
@ilyasfoo Yes, please, let's follow the order in the designs 🙂 The marketing team has reviewed it and wants to showcase the extensions in that particular order. |
@moon0326 I'm not sure what we're referring to 🙂 Could you please clarify? Thanks! |
Hey, @verofasulo! Moon was referring to the extensions having
|
ilyasfoo
left a comment
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.
According to Y5pUYSJPsGEud1vknUZhi8-fi-1698-36088 I think the order is correct.
Do you see different order by any chance?
My bad, I may have referred to an outdated design. Sorry! Thanks for addressing the learn more change. Functionality wise this is looking good! I'll try to review them as soon as RJ's PR is merged and rebased
@ilyasfoo, good point! I didn't think about this specific scenario but it makes sense. Let's show the label only if the extension is active 🙂 Thank you 🙏 |
* Updated WC payment description * Updated logo images
* Change CTA font size from 13px to 14px * Change spacing between the chebox and logo to 24px * Change heading font-weight to 500
cb255e7 to
6bc1133
Compare
|
Thanks @verofasulo and @ilyasfoo ❤️ @ilyasfoo // I've rebased the latest main, which has RJ's changes. |
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'm getting the same issue with @rjchow here, where plugins list is inconsistent. I think I may have found the way to reproduce it:
- Go through the profiler until the plugins step.
- In another tab or CLI, delete the option
woocommerce_default_countryor replace with empty string. - Refresh the plugins list.
- Observe the plugin list is not complete.
I'm also getting this error when pressing Continue in the plugins page after the rebase:
Uncaught TypeError: Cannot read properties of undefined (reading 'find')
at installAndActivatePlugins.ts:198:43
at Array.sort (<anonymous>)
at pluginsInstallationQueue (installAndActivatePlugins.ts:197:41)
at utils.js:417:1
at Array.reduce (<anonymous>)
at updateContext (utils.js:399:1)
at handleAction (actions.js:584:41)
at processBlock (actions.js:625:1)
at Array.map (<anonymous>)
at resolveActions (actions.js:650:32)
Also from my previous review, the plugin is still labelled as Installed when deactivated.
Thank you for the link. I totally missed the ping from the PR. @rjchow Are you still able to reproduce the issue? I've tried calling the endpoint multiple times and it all came back the same for me.
As far as I know,
Fixed in e09db7e |
If that's the case I suspect what's going on is that the getFreeExtensions() dispatch is happening before the persistBusinessInfo I can look into it when I'm back from AFK tomorrow |
ilyasfoo
left a comment
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 fixing them, @moon0326! I confirmed that plugins are considered Installed only when it's activated.
Probably not related to this PR in particular, I observed some plugins were installed but not activated. I selected multiple plugins (Jetpack, MailPoet, GLA, Pinterest, TikTok, Shipping) and only some plugins were activated (Pinterest, TikTok). The action scheduler job woocommerce_plugins_install_callback was complete. There was some PHP warnings in debug.log related to Pinterest, no fatal errors.
I'm still having the above issue, it seems only 2 out of 5 plugins installed get activated. Not sure why, the scheduled action is completed. I don't mind to have this addressed in a follow-up if you feel like it though.
Not sure if this is expected, but it seems we're using the old APIs, /wp-json/wc-admin/plugins/install?_locale=user and /wp-json/wc-admin/plugins/activate?_locale=user? 🤔
Some minor comments:
| throw new Error(); | ||
| } | ||
| } | ||
|
|
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 think it'll be good to document the async behaviour, i.e.: how it works and how it's handled in the frontend. Not sure if this is the best place, but I digress. What do you think?
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 think we can document it in both frontend and backend. I'll add them 👍
| }, | ||
| PLUGINS_LEARN_MORE_LINK_CLICKED: { | ||
| actions: [ | ||
| 'recordTracksPluginsLearnMoreLinkClicked', |
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 recordTracksPluginsLearnMoreLinkClicked isn't defined anywhere? 🤔
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 think I missed it from the last rebase.
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.
Updated in 31f8600
| * | ||
| * @return array | ||
| */ | ||
| public static function with_core_profiler_fields( array $plugins ) { |
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.
Perhaps we should comment about how how install_priority is handled here such as the ordering since I think maintainers going to need to know what to assign when adding new extensions.
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.
Good idea. I'll copy the table from this PR to the comment.
plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php
Outdated
Show resolved
Hide resolved
| assignPluginsInstallationQueue: assign( { | ||
| pluginsInstallationQueue: ( ctx ) => { | ||
| return ctx.selectedPlugins; | ||
| return ctx.selectedPlugins.slice().sort( ( a, b ) => { |
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'd love it if there's a comment on the sorting that is done here, i.e: ascending or descending
Co-authored-by: Ilyas Foo <[email protected]>
…faultFreeExtensions.php Co-authored-by: Ilyas Foo <[email protected]>
You're correct. I did not change the endpoint after the last rebase 🤦 Updated in 5fb6863 |
|
@ilyasfoo I've addressed missing recordTracksPluginsLearnMoreLinkClicked and activation issues. Could we address the documentation changes in a follow-up PR? |
ilyasfoo
left a comment
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.
@ilyasfoo I've addressed missing recordTracksPluginsLearnMoreLinkClicked and activation issues.
Thanks! Tests well.
Could we address the documentation changes in a follow-up PR?
Sounds good! 🚢
| { action }: { action: unknown } | ||
| ) => { | ||
| const { step } = action as { step: string }; | ||
| recordEvent( `storeprofiler_${ step }_learn_more_link_clicked` ); |
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.
Do we need to track which extension "Learn more" was clicked on? cc @verofasulo if you have input 🙏
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 think we should. I'll add it 👍
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.
Updated in 175deec


Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #38436 .
This PR addresses changes listed in the issue, except for the Jetpack redirection and
InstallAndActivatePluginsrefactor. I'll handle Jetpack redirection in a separate issue, as it requires a bit of context switching. @rjchow is working on refactoringInstallAndActivatePluginsin #38577. For the reference, my previous attempt at refactoring is 94e548cHow to test the changes in this Pull Request:
For the label and description, please refer to Figma design Y5pUYSJPsGEud1vknUZhi8-fi-300-14366 or use the screenshot:

Make sure to turn off
Show Suggestionsfrom WooCommerce -> Settings -> Advanced -> WooCommerce.com to show the local version of the suggestions.ContinueFor now, I've set
install_priorityvalue by plugin size.