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

Product Gallery: Address the edge case when Product Image is not set but Product gallery images are #11940

Closed
Tracked by #42335
danieldudzic opened this issue Nov 24, 2023 · 2 comments · Fixed by #11978
Assignees
Labels
block: product gallery Issues related to the Product Gallery block. team: Kirigami & Origami type: bug The issue/PR concerns a confirmed bug.

Comments

@danieldudzic
Copy link
Contributor

Describe the bug

Currently in the following situation:
Edit_product_“Beanie_with_Logo”_‹_newproductgallery_—_WordPress

The Product Gallery block will:

  • Hide the Thumbnails
  • Still output the Next/Previous Buttons and the Pager
  • The first Large Image image will be blank

RMMeTuyymN

To reproduce

Steps to reproduce the behavior:

  1. With a block theme, open Appearance > Editor.
  2. Open Templates > Single Product.
  3. Select Convert to Blocks if you are using the Classic Templates.
  4. Add the Product Gallery block.
  5. Edit a product and make sure the Product Image is not set but some Product gallery images are.
  6. Notice the broken behavior on the front end.
@danieldudzic danieldudzic added type: bug The issue/PR concerns a confirmed bug. block: product gallery Issues related to the Product Gallery block. labels Nov 24, 2023
@danieldudzic danieldudzic changed the title Product Gallery: Address the edge case when Product Image is not set (but Product gallery images are) Product Gallery: Address the edge case when Product Image is not set but Product gallery images are Nov 24, 2023
@danieldudzic
Copy link
Contributor Author

@jarekmorawski @roykho In the event that the Product Image is not set but some Product Gallery images are present, which of the following behaviors should be preferred?:

  • Display an empty Large Image.
  • Display an image Placeholder as the Large Image.
  • Hide the Thumbnails (and Pager and Next/Prev buttons) altogether.
  • Set the Large Image to the first of the Product gallery images and display Thumbnails, Pager and Next/Prev buttons normally.

FYI: The legacy WooCommerce Single Product Gallery hides the thumbnails and pagination and just displays the placeholder:

Moto_Guzzi_v7_–_newproductgallery

@danieldudzic danieldudzic self-assigned this Nov 27, 2023
@jarekmorawski
Copy link

Great question. Thanks for keeping an eye out for such details. I'd display the image placeholder as well as the Thumbnails and the Prev/Next buttons. It's a temporary solution because, in the new product editing UX, the large image is set automatically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: product gallery Issues related to the Product Gallery block. team: Kirigami & Origami type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants