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

Fix cart block isLarge console error in the editor when running WordPress 5.6 beta #3408

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

mikejolley
Copy link
Member

isLarge is not longer a supported prop on @wordpress/components button (see WordPress/gutenberg#16541). This PR removes usage.

There was only a minor difference between isLarge and regular buttons, and it affected some placeholder states and the view switcher.

Fixes #3382

Screenshots

These were the affected buttons in the ViewSwitcher:

Edit Page ‹ one wordpress test — WordPress 2020-11-16 13-05-25

How to test the changes in this Pull Request:

  1. Open up the cart page in the editor.
  2. Check console errors.

No other steps were required to see the error previously.

Changelog

Fix cart block isLarge console error in the editor when running WordPress 5.6 beta

@mikejolley mikejolley requested a review from a team as a code owner November 16, 2020 13:07
@mikejolley mikejolley self-assigned this Nov 16, 2020
@mikejolley mikejolley requested review from budzanowski and removed request for a team November 16, 2020 13:07
@github-actions
Copy link
Contributor

Size Change: -24 B (0%)

Total Size: 1.11 MB

Filename Size Change
build/all-products.js 36.1 kB -10 B (0%)
build/attribute-filter.js 12.5 kB -5 B (0%)
build/cart.js 38.8 kB -4 B (0%)
build/price-filter.js 10.4 kB -5 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/active-filters-frontend.js 8.88 kB 0 B
build/active-filters.js 8.95 kB 0 B
build/all-products-frontend.js 31.2 kB 0 B
build/all-reviews.js 9.78 kB 0 B
build/atomic-block-components/add-to-cart--atomic-block-components/button.js 3.18 kB 0 B
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js 335 B 0 B
build/atomic-block-components/add-to-cart-frontend.js 8.94 kB 0 B
build/atomic-block-components/add-to-cart.js 7.52 kB 0 B
build/atomic-block-components/button-frontend.js 2.02 kB 0 B
build/atomic-block-components/button.js 838 B 0 B
build/atomic-block-components/category-list-frontend.js 469 B 0 B
build/atomic-block-components/category-list.js 478 B 0 B
build/atomic-block-components/image-frontend.js 1.7 kB 0 B
build/atomic-block-components/image.js 1.15 kB 0 B
build/atomic-block-components/price-frontend.js 2.29 kB 0 B
build/atomic-block-components/price.js 2.32 kB 0 B
build/atomic-block-components/rating-frontend.js 524 B 0 B
build/atomic-block-components/rating.js 527 B 0 B
build/atomic-block-components/sale-badge-frontend.js 857 B 0 B
build/atomic-block-components/sale-badge.js 864 B 0 B
build/atomic-block-components/sku-frontend.js 386 B 0 B
build/atomic-block-components/sku.js 394 B 0 B
build/atomic-block-components/stock-indicator-frontend.js 568 B 0 B
build/atomic-block-components/stock-indicator.js 573 B 0 B
build/atomic-block-components/summary-frontend.js 917 B 0 B
build/atomic-block-components/summary.js 926 B 0 B
build/atomic-block-components/tag-list-frontend.js 467 B 0 B
build/atomic-block-components/tag-list.js 473 B 0 B
build/atomic-block-components/title-frontend.js 1.23 kB 0 B
build/atomic-block-components/title.js 1.06 kB 0 B
build/attribute-filter-frontend.js 18.3 kB 0 B
build/blocks.js 3.54 kB 0 B
build/cart-frontend.js 70.1 kB 0 B
build/checkout-frontend.js 85.9 kB 0 B
build/checkout.js 42.1 kB 0 B
build/editor-rtl.css 13.8 kB 0 B
build/editor.css 13.9 kB 0 B
build/featured-category.js 7.73 kB 0 B
build/featured-product.js 9.97 kB 0 B
build/handpicked-products.js 7.36 kB 0 B
build/price-filter-frontend.js 14.9 kB 0 B
build/product-best-sellers.js 7.45 kB 0 B
build/product-categories.js 3.23 kB 0 B
build/product-category.js 8.39 kB 0 B
build/product-new.js 7.61 kB 0 B
build/product-on-sale.js 8 kB 0 B
build/product-search.js 3.57 kB 0 B
build/product-tag.js 6.53 kB 0 B
build/product-top-rated.js 7.58 kB 0 B
build/products-by-attribute.js 8.34 kB 0 B
build/reviews-by-category.js 11.8 kB 0 B
build/reviews-by-product.js 13.4 kB 0 B
build/reviews-frontend.js 9.37 kB 0 B
build/single-product-frontend.js 33.8 kB 0 B
build/single-product.js 10.1 kB 0 B
build/style-rtl.css 17.9 kB 0 B
build/style.css 17.9 kB 0 B
build/vendors--atomic-block-components/price-frontend.js 5.65 kB 0 B
build/vendors-style-rtl.css 1.03 kB 0 B
build/vendors-style.css 1.03 kB 0 B
build/vendors.js 407 kB 0 B
build/wc-blocks-data.js 7.1 kB 0 B
build/wc-blocks-middleware.js 931 B 0 B
build/wc-blocks-registry.js 2.32 kB 0 B
build/wc-payment-method-bacs.js 790 B 0 B
build/wc-payment-method-cheque.js 787 B 0 B
build/wc-payment-method-cod.js 879 B 0 B
build/wc-payment-method-paypal.js 831 B 0 B
build/wc-payment-method-stripe.js 12 kB 0 B
build/wc-settings.js 2.35 kB 0 B
build/wc-shared-context.js 1.53 kB 0 B
build/wc-shared-hocs.js 1.66 kB 0 B

compressed-size-action

Copy link
Contributor

@nerrad nerrad left a comment

Choose a reason for hiding this comment

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

Do we care that this also impacts how this was used/rendered in earlier WP versions?

@mikejolley
Copy link
Member Author

@nerrad it's such a minor detail it's likely better to standardise, rather than introduce custom styles for core components.

Copy link
Contributor

@budzanowski budzanowski left a comment

Choose a reason for hiding this comment

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

:shipit:

@mikejolley mikejolley merged commit 59f0a77 into trunk Nov 17, 2020
@mikejolley mikejolley deleted the fix/3382-is-large-prop branch November 17, 2020 11:07
@nerrad nerrad added the block: cart Issues related to the cart block. label Nov 23, 2020
@nerrad nerrad added this to the 3.9.0 milestone Nov 23, 2020
@nerrad nerrad added the type: bug The issue/PR concerns a confirmed bug. label Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WP 5.6 Compatibility: Fix isLarge prop warning for usages of @wordpress/component.
3 participants