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
[CYS] Fix the selected pattern in footer, header and homepage #45240
Conversation
807bd38
to
5bb00a8
Compare
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: dd607cf
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. |
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!
I successfully tested the testing instructions for the header
and footer
patterns.
I'm able to replicate the same issue with the homepage
pattern. Can you take a look?
212HqO.mp4
f177231
to
0a6dcf9
Compare
That's right, I just pushed a fix for the homepage as well. Could you check again @gigitux ? |
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! LGTM!
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! 🚀
* Check also the number of inner blocks before checking the attributes * Add classes to assembler footer patterns * Add classes to assembler header patterns * Add changefile(s) from automation for the following project(s): woocommerce * Mark the current homepage template as selected * Remove unused import --------- Co-authored-by: github-actions <github-actions@github.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
The problem was that the comparison to select a pattern was to compare their block attributes. We had 2 patterns with the same attributes so when selecting the last one it always matched the first.
In this PR I'm adding a specific class to each of the patterns to make their attributes different. Also, I've added an extra comparison to check if the number of inner blocks is the same.
Closes #45215
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
WooCommerce Beta Tester
plugin is installed and activated (available on this monorepo)./wp-admin/tools.php?page=woocommerce-admin-test-helper
and enablecustomize-store
feature flag.Tools
and run theReset Customize Your Store
and theDelete all products
commands.WooCommerce > Home
, and click onStart customizing
.Choose your footer
, select a pattern, and go back by clicking on the arrow.Choose your header
.Changelog entry
Significance
Type
Message
CYS - Fix the selected pattern in footer in the assembler.
Comment