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

Product gallery: Enable block in blockified template and add transform from legacy one #42719

Merged
merged 10 commits into from Dec 14, 2023

Conversation

roykho
Copy link
Member

@roykho roykho commented Dec 12, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

As apart of this effort #42043 to surface the new Product Gallery block to users.

This PR transforms the Classic Single Product template to the blocks version with the new Product Gallery block. In addition, it adds the transform function for the legacy Product Image Gallery to the new Product Gallery Block.

Both of these additions will help surface this new Product Gallery block to existing and new users.

How to test the changes in this Pull Request:

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

Test 1

  1. Go to Appearance > Editor > Templates > Single Product (clear customizations)
  2. Click on the editor and you should see "Transform into blocks" action button.
  3. Hover over this button and you should see a preview with the Product Gallery block.
  4. Click on the "Transform into blocks" action button and ensure you see the new Product Gallery block.

Test 2

  1. Go to Appearance > Editor > Templates > Single Product (clear customizations)
  2. Click on the editor and you should see "Transform into blocks" action button.
  3. Remove the new Product Gallery block.
  4. Add the legacy Product Image Gallery block.
  5. Click on the "transform to" button and ensure you see the Product Gallery block. file.png
  6. Click on it and ensure your legacy Product Image Gallery block is now transformed to the new Product Gallery block.

Test 3

  1. Run pnpm run --filter='@woocommerce/block-library' build:deploy and then pnpm run --filter='@woocommerce/plugin-woocommerce' build.
  2. Go to Appearance > Editor > Templates > Single Product (clear customizations)
  3. Click on the editor and you should see "Transform into blocks" action button.
  4. Ensure you only see the legacy Product Image Gallery and you can't transform to the new Product Gallery block.

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

Comment

@roykho roykho added team: Kirigami & Origami block: product image gallery Issues related to the Product Image Gallery block. block: product gallery Issues related to the Product Gallery block. labels Dec 12, 2023
@roykho roykho self-assigned this Dec 12, 2023
Copy link
Contributor

Hi @danieldudzic, @thealexandrelara,

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

1 similar comment
Copy link
Contributor

Hi @danieldudzic, @thealexandrelara,

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

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Dec 12, 2023
Copy link
Contributor

github-actions bot commented Dec 12, 2023

Test Results Summary

Commit SHA: 77e9e9f

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests258003026113m 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.

@github-actions github-actions bot removed the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Dec 12, 2023
@roykho roykho force-pushed the product-gallery/legacy/transform branch from b973aa7 to 639f460 Compare December 12, 2023 20:40
Copy link
Contributor

@danieldudzic danieldudzic left a comment

Choose a reason for hiding this comment

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

I was able to successfully test 1 & 2, but failed at the 3.

I tried multiple times, also utilizing (rm -rf **/.wireit) but the new Product Gallery block would still be available in the transform for the deploy package. (I do blame it on the setup/caching issues though).

I'd potentially consider adding a transform to the Product Gallery to allow people to transform back to the legacy block, in case they want to revert the transformation.

@@ -11,6 +13,8 @@ import edit from './edit';
import metadata from './block.json';
import './style.scss';

const galleryBlock = isExperimentalBuild() ? 'woocommerce/product-gallery' : '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit-picky: wouldn't productGalleryBlock make more sense here?

@roykho roykho merged commit 255f1ff into trunk Dec 14, 2023
16 checks passed
@roykho roykho deleted the product-gallery/legacy/transform branch December 14, 2023 13:47
@kmanijak kmanijak changed the title Product gallery/legacy/transform Product gallery: Enable block in blockified template and add transform from legacy one Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: product gallery Issues related to the Product Gallery block. block: product image gallery Issues related to the Product Image Gallery block. team: Kirigami & Origami
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants