Skip to content
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

Merged
merged 9 commits into from Mar 5, 2024

Conversation

albarin
Copy link
Contributor

@albarin albarin commented Mar 1, 2024

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:

  1. Ensure the WooCommerce Beta Tester plugin is installed and activated (available on this monorepo).
  2. Head over to /wp-admin/tools.php?page=woocommerce-admin-test-helper and enable customize-store feature flag.
  3. Click on Tools and run the Reset Customize Your Store and the Delete all products commands.
  4. Go to WooCommerce > Home, and click on Start customizing.
  5. In the assembler, click on the Choose your footer, select a pattern, and go back by clicking on the arrow.
  6. Repeat 5 for the other 2 footer patterns.
  7. Repeat 5-6 steps also for the Choose your header.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

CYS - Fix the selected pattern in footer in the assembler.

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 1, 2024
@albarin albarin changed the title [CYS] Fix the select pattern in footer [CYS] Fix the selected pattern in footer Mar 1, 2024
@albarin albarin marked this pull request as ready for review March 1, 2024 11:26
@woocommercebot woocommercebot requested review from a team and ObliviousHarmony and removed request for a team March 1, 2024 11:26
@albarin albarin requested review from gigitux and nefeline and removed request for ObliviousHarmony March 1, 2024 11:27
Copy link
Contributor

github-actions bot commented Mar 1, 2024

Hi @gigitux, @nefeline,

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:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

github-actions bot commented Mar 1, 2024

Test Results Summary

Commit SHA: dd607cf

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests760027503516m 52s

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.

Copy link
Contributor

@gigitux gigitux left a 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

@albarin albarin changed the title [CYS] Fix the selected pattern in footer [CYS] Fix the selected pattern in footer, header and homepage Mar 4, 2024
@albarin
Copy link
Contributor Author

albarin commented Mar 4, 2024

I'm able to replicate the same issue with the homepage pattern. Can you take a look?

That's right, I just pushed a fix for the homepage as well. Could you check again @gigitux ?

@albarin albarin requested a review from gigitux March 4, 2024 15:05
Copy link
Contributor

@gigitux gigitux left a 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!

Copy link
Member

@nefeline nefeline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@albarin albarin merged commit 1c68e2d into trunk Mar 5, 2024
47 of 49 checks passed
@albarin albarin deleted the 45215-fix-selected-footer branch March 5, 2024 17:21
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 5, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 5, 2024
@rodelgc rodelgc added status: analysis complete Indicates if a PR has been analysed by Solaris needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 6, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CYS - the select pattern is not the right one
4 participants