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

Ensure Shop Page Uses Block Renderer When Applicable (#44453) #44455

Closed
wants to merge 1 commit into from

Conversation

Lee-WonJun
Copy link

@Lee-WonJun Lee-WonJun commented Feb 8, 2024

Changes proposed in this Pull Request:

Implemented an update to prioritize block rendering for the Shop page with filter queries, adjusting the template selection to favor 'archive-product' block templates. Note: The impact on other taxonomies has not been fully explored; caution is advised.

Closes #44453 .

How to test the changes in this Pull Request:

  • Navigate to a WordPress environment with WooCommerce installed and activated.
  • Ensure that a block template for 'archive-product' is available and activated.
  • Visit the Shop page without applying the patch, noting the rendering inconsistency when the product lookup table is not used.
  • Apply the patch and refresh the Shop page. The Block UI should now render correctly, demonstrating that the Shop page is utilizing the block renderer.
  • Disable the block template for 'archive-product' and verify that the fallback behavior remains intact, with the appropriate template being loaded for product attributes, categories, and tags.

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

Fix Shop page rendering to use block renderer when a block template for 'archive-product' is available, improving consistency and user experience.

Comment

@woocommercebot woocommercebot requested review from a team and Konamiman and removed request for a team February 8, 2024 13:12
Copy link
Contributor

github-actions bot commented Feb 8, 2024

Hi ,

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

@Konamiman
Copy link
Contributor

Hi, I need some guidance for testing this:

Ensure that a block template for 'archive-product' is available and activated.

How can I achieve this? Is it enough to install a block theme like e.g. Blockbase?

@Lee-WonJun
Copy link
Author

Hi, I need some guidance for testing this:

Ensure that a block template for 'archive-product' is available and activated.

How can I achieve this? Is it enough to install a block theme like e.g. Blockbase?

Yes, any block theme has archive-product.html
for you, tested themes are Blockskit Shop / deco (not free) / Gadgethub

@Aljullu
Copy link
Contributor

Aljullu commented Mar 15, 2024

@Lee-WonJun as I mentioned in the issue, thank you a lot for filling this bug and investigating it. It turns out, the bug was fixed in #44537 as we refactored some code and the fix will ship in WooCommerce 8.8.

In #44850, I also implemented some changes that should make it harder for this kind of issues to appear in the future.

Based on that, I will go ahead closing your PR. Hope that makes sense! And once again, thanks for your time helping us solve this bug.

@Aljullu Aljullu closed this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shop Page Filter Query Causes Inconsistent Block UI Rendering Without Product Attribute Lookup Table
3 participants