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

[Experimental] Filter blocks: Add block preview #45258

Merged

Conversation

thealexandrelara
Copy link
Contributor

Changes proposed in this Pull Request:

This PR adds the block preview to each Product Filter block.

Closes #44748.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Navigate to Single Product template (Appearance > Editor > Templates > Product Catalog template - or any archive template).
  2. Click on "Edit" to open the WordPress editor.
  3. In the editor, you should see a block inserter icon or an option to "Add Block". Click on it.
  4. In the block inserter, search for "Product Filter" or browse the available blocks until you find them.
  5. For each Product Filter [...] (Beta) that appears, hover over it and make sure the block preview is displayed.

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

Add block preview to filter blocks

Comment

@thealexandrelara thealexandrelara added team: Kirigami & Origami block-type: filter blocks Issues related to all of the filter blocks. labels Mar 1, 2024
@thealexandrelara thealexandrelara self-assigned this Mar 1, 2024
@woocommercebot woocommercebot requested review from a team and roykho and removed request for a team March 1, 2024 19:53
Copy link
Contributor

github-actions bot commented Mar 1, 2024

Hi @roykho,

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: b1197f7

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

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
Member

@roykho roykho left a comment

Choose a reason for hiding this comment

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

The previews shows up nicely good work however I wanted to point out for the Attributes Filter, since it needs to first pick an attribute before showing the real preview, it is not ideal. I understand this has existed prior but perhaps we should figure out a way to make it work.

One thought is to use placeholder screenshots and in the edit.js, if isPreview load the screenshot.

But it is not a blocker so approving.

@github-actions github-actions bot added focus: documentation Issues and PRs related to improving documentation focus: e2e tests Issues related to e2e tests plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Mar 4, 2024
@thealexandrelara thealexandrelara force-pushed the feat/44748-add-block-previews-to-filter-blocks branch from d0bf331 to 9f9d2ab Compare March 4, 2024 21:26
@github-actions github-actions bot removed focus: documentation Issues and PRs related to improving documentation focus: e2e tests Issues related to e2e tests labels Mar 4, 2024
@thealexandrelara
Copy link
Contributor Author

The previews shows up nicely good work however I wanted to point out for the Attributes Filter, since it needs to first pick an attribute before showing the real preview, it is not ideal. I understand this has existed prior but perhaps we should figure out a way to make it work.

One thought is to use placeholder screenshots and in the edit.js, if isPreview load the screenshot.

But it is not a blocker so approving.

Nice catch! I'm going to open a new issue to work specifically for the Attributes Filter! Thank you for pointing this out and sharing a solution.

@thealexandrelara thealexandrelara merged commit be9b3ab into trunk Mar 6, 2024
56 checks passed
@thealexandrelara thealexandrelara deleted the feat/44748-add-block-previews-to-filter-blocks branch March 6, 2024 19:55
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 6, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 6, 2024
@Stojdza Stojdza added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 6, 2024
@dinhtungdu dinhtungdu changed the title Filter blocks: Add block preview [Experimental] Filter blocks: Add block preview Mar 7, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* Add block preview to filter blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

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
block-type: filter blocks Issues related to all of the filter blocks. 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 team: Kirigami & Origami
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is no preview for filter blocks in the style book or block pickers.
3 participants