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

Ensure product grids display as intended in the editor #4424

Merged
merged 1 commit into from Jul 5, 2021

Conversation

frontdevde
Copy link
Contributor

Fixes #4416

This PR fixes an issue where the product grid in all blocks it is used in displays the wrong number of columns.

The issue is caused by the generic Gutenberg reset overriding the box-sizing property value that is needed for the product grid values to be calculated correctly.

Before After
Screenshot 2021-07-01 at 13 18 04 Screenshot 2021-07-01 at 13 29 19

How to test the changes in this Pull Request:

Test in the editor:

  1. Ensure the Gutenberg feature plugin is enabled and up to date.
  2. Create a new page
  3. Insert blocks that use the product grid e.g. Top Rated Products.
  4. Save the page as a draft
  5. Navigate to the list of existing pages and then Edit the draft
  6. Confirm that the number of columns displayed equals the number set in the block settings (Default: 3).

Test in the widget editor:

  1. Ensure the Gutenberg feature plugin is enabled and up to date.
  2. Go to the Widgets editor in Appearance > Widgets.
  3. Go to Sidebar widgets and insert blocks that use the product grid e.g. Top Rated Products.
  4. Confirm that the number of columns displayed equals the number set in the block settings (Default: 3).

Changelog

Ensure product grids display as intended in the editor.

@frontdevde frontdevde added the type: bug The issue/PR concerns a confirmed bug. label Jul 5, 2021
@frontdevde frontdevde added this to the 5.5.0 milestone Jul 5, 2021
@frontdevde frontdevde requested a review from Aljullu July 5, 2021 09:35
@frontdevde frontdevde self-assigned this Jul 5, 2021
@frontdevde frontdevde requested a review from a team as a code owner July 5, 2021 09:35
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2021

Size Change: -26 B (0%)

Total Size: 979 kB

Filename Size Change
build/wc-blocks-style-rtl.css 19.2 kB -13 B (0%)
build/wc-blocks-style.css 19.2 kB -13 B (0%)
ℹ️ View Unchanged
Filename Size
build/active-filters-frontend.js 8.28 kB
build/active-filters.js 7.84 kB
build/all-products-frontend.js 23.1 kB
build/all-products.js 37.3 kB
build/all-reviews.js 9.56 kB
build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js 2.57 kB
build/atomic-block-components/add-to-cart--atomic-block-components/button.js 1.82 kB
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js 333 B
build/atomic-block-components/add-to-cart-frontend.js 8.64 kB
build/atomic-block-components/add-to-cart.js 7.72 kB
build/atomic-block-components/button-frontend.js 1.74 kB
build/atomic-block-components/button.js 873 B
build/atomic-block-components/category-list-frontend.js 469 B
build/atomic-block-components/category-list.js 477 B
build/atomic-block-components/image-frontend.js 1.87 kB
build/atomic-block-components/image.js 1.35 kB
build/atomic-block-components/price-frontend.js 2.08 kB
build/atomic-block-components/price.js 2.1 kB
build/atomic-block-components/rating-frontend.js 559 B
build/atomic-block-components/rating.js 566 B
build/atomic-block-components/sale-badge-frontend.js 854 B
build/atomic-block-components/sale-badge.js 866 B
build/atomic-block-components/sku-frontend.js 389 B
build/atomic-block-components/sku.js 393 B
build/atomic-block-components/stock-indicator-frontend.js 609 B
build/atomic-block-components/stock-indicator.js 610 B
build/atomic-block-components/summary-frontend.js 905 B
build/atomic-block-components/summary.js 911 B
build/atomic-block-components/tag-list-frontend.js 465 B
build/atomic-block-components/tag-list.js 471 B
build/atomic-block-components/title-frontend.js 1.44 kB
build/atomic-block-components/title.js 1.28 kB
build/attribute-filter-frontend.js 17.9 kB
build/attribute-filter.js 11.7 kB
build/blocks-checkout-editor.js 10.8 kB
build/blocks-checkout.js 20.2 kB
build/cart-frontend.js 79.2 kB
build/cart.js 45.9 kB
build/checkout-frontend.js 83.4 kB
build/checkout.js 48.2 kB
build/featured-category.js 7.39 kB
build/featured-product.js 9.55 kB
build/handpicked-products.js 6.55 kB
build/price-filter-frontend.js 14.4 kB
build/price-filter.js 9.57 kB
build/price-format.js 1.38 kB
build/product-best-sellers.js 6.73 kB
build/product-categories.js 3.38 kB
build/product-category.js 7.59 kB
build/product-new.js 6.89 kB
build/product-on-sale.js 7.23 kB
build/product-search.js 2.68 kB
build/product-tag.js 6.7 kB
build/product-top-rated.js 6.85 kB
build/products-by-attribute.js 7.82 kB
build/reviews-by-category.js 11.5 kB
build/reviews-by-product.js 13.1 kB
build/reviews-frontend.js 9.18 kB
build/single-product-frontend.js 25.8 kB
build/single-product.js 9.87 kB
build/vendors--atomic-block-components/price-frontend.js 6.51 kB
build/wc-blocks-data.js 10.9 kB
build/wc-blocks-editor-style-rtl.css 14.9 kB
build/wc-blocks-editor-style.css 14.9 kB
build/wc-blocks-google-analytics.js 1.99 kB
build/wc-blocks-middleware.js 1.48 kB
build/wc-blocks-registry.js 2.75 kB
build/wc-blocks-shared-context.js 1.54 kB
build/wc-blocks-shared-hocs.js 1.75 kB
build/wc-blocks-vendors-style-rtl.css 1.05 kB
build/wc-blocks-vendors-style.css 1.05 kB
build/wc-blocks-vendors.js 240 kB
build/wc-blocks.js 3.51 kB
build/wc-payment-method-bacs.js 812 B
build/wc-payment-method-cheque.js 807 B
build/wc-payment-method-cod.js 903 B
build/wc-payment-method-paypal.js 844 B
build/wc-payment-method-stripe.js 12.3 kB
build/wc-settings.js 2.93 kB

compressed-size-action

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.

🚢

@frontdevde frontdevde merged commit 72772a1 into trunk Jul 5, 2021
@frontdevde frontdevde deleted the fix/ensure-product-grids-display-as-intended branch July 5, 2021 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
2 participants