Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Refactor Product Categories block to use block.json #6875

Merged

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Aug 10, 2022

I refactor the block to use block.json schema. The block schema internally extends the main block.json schema, and it fixes an issue that occurs on WPCOM.

Fixes Automattic/wp-calypso#62337

Testing

User Facing Testing

WooCommerce Blocks
  1. Add Product Categories List block as a widget (Appearance → Widgets)
  2. Open block settings
  3. Test block controls, save, and review if it still renders correctly in the frontend
WPCOM
  1. Add Product Categories List block as a widget (Appearance → Widgets)
  2. Open block settings
  3. Open Advanced and click on "Add new rule" under Visibility

Users should be able to add new visibility rules, with a real-time preview of the block

  • Do not include in the Testing Notes

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Changelog

Refactor Product Categories block to use block.json

I refactor block to use block.json schema. The block schema
internally extends the main block.json schema and it fixes an issue
that occurs on WPCOM.
@Aljullu Aljullu requested review from a team and Aljullu and removed request for a team August 12, 2022 14:27
@Aljullu Aljullu added status: needs review block: product categories list Issues related to the Product Categories List block. labels Aug 12, 2022
Copy link
Contributor

@Aljullu Aljullu 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 this improvement, @wojtekn! Code changes look good to me and I did a round of smoke testing and everything was working well. For reference: I only tested in a dev site, I didn't test in a .com site.

@Aljullu Aljullu added this to the 8.3.0 milestone Aug 12, 2022
@Aljullu Aljullu merged commit 2eb3b63 into woocommerce:trunk Aug 12, 2022
@wojtekn wojtekn deleted the add/product-categories-block-json branch August 12, 2022 18:45
@tarunvijwani tarunvijwani added the type: bug The issue/PR concerns a confirmed bug. label Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: product categories list Issues related to the Product Categories List block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product Categories List block encounters error when added as a widget with visibility rule
3 participants