-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Fix progress header title #32786
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
Fix progress header title #32786
Conversation
louwie17
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.
@octaedro I tried to follow the testing instructions, but I always get Let's get you started 🚀 for the first several steps and I don't see Welcome to <store name> anymore, only at the end once I completed all the tasks.
I left a comment inline as well.
| completedCount === tasksCount | ||
| completedCount === 0 || | ||
| completedCount === tasksCount || | ||
| ( hasFinishedStoreDetails && completedCount === 1 ) |
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.
This logic doesn't seem to work for me. It always shows Let's get you started now at the beginning. Because either the finishedStoreDetails is false and completedCount === 1 or finishedStoreDetails is true and completedCount === 2. Neither of these work for the above condition.
As a simpler fix, could we just filter out the store_details task from the previous hasVisitedTasks logic?
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.
Yes, this is pretty confusing. Sorry for not having been more explicit in my instructions.
The title Welcome to <store name> won't be visible if any task (other than the Store Details) has been finished.
If completedCount is 1 but the Store Details task is incomplete, the title shouldn't be visible and we will see Let's get you started 🚀 instead. Same if there is more than one task completed.
On the other hand, although the functionality is almost the same, the change you mentioned makes the code easier to read so I added it.
| siteTitle | ||
| ) | ||
| : __( 'Welcome', 'woocommerce' ); | ||
| : __( 'Welcome to your store', 'woocommerce' ); |
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!
0a1916e to
b8a8e9d
Compare
|
Thank you @louwie17 for the review. I addressed the change you suggested. Could you take another look at this PR? |
louwie17
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.
@octaedro thanks for the changes, this test great now for the task list experiment 1, but not for task experiment 2, which I will take the blame for, as it looks like a bug that I caused. It doesn't update the visitedTasks logic in the sectioned task list.
Would you potentially be able to add that logic as part of this PR, we did need to add most of these lines (with the update in the trackClick function) https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-admin/client/tasks/task-list-item.tsx#L108-L130
To this component: https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce-admin/client/two-column-tasks/task-list-item.tsx#L41
louwie17
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 sticking with my suggested changes @octaedro, this tested great and changes look good! Thanks for fixing this 🚀
|
Hi @octaedro, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
All Submissions:
Changes proposed in this Pull Request:
This PR fixes the progress header title behavior.
The progress header title
Welcome to <store_name>will be visible only when any of these conditions is true:(more details here)
If we don't know the store's name, it will say
Welcome to your store(more details here).Closes #32720.
How to test the changes in this Pull Request:
woocommerce_tasklist_setup_experiment_2_2022_*to treatment.Welcome to <site name>above the task list.Let's get you started :rocket:.Welcome to <site name>.Other information:
pnpm nx affected --target=changelog?FOR PR REVIEWER ONLY: