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

Move StoreNoticesContainer to @woocommerce/blocks-checkout package and add tests #7558

Merged
merged 13 commits into from Nov 17, 2022

Conversation

opr
Copy link
Contributor

@opr opr commented Nov 1, 2022

This PR moves StoreNoticesContainer to @woocommerce/blocks-checkout package. This is possible now since we moved notices to use only @wordpress/notices's core/notices data store. Previously we had some hooks and contexts which meant this component could not be exported from blocks, since the Context instances would be different.

Testing

Automated Tests

  • Changes in this PR are covered by Automated Tests.
    • Unit tests
    • E2E tests

User Facing Testing

  1. Add some items and go to the Cart block.
  2. In a new tab, open edit one of the items in your cart. Set it to out of stock.
  3. Without reloading, go back to the Cart tab, and try to increase the quantity of an item. Ensure you see an error above the Cart block.
  4. Set the item back to in stock, and proceed to the Checkout block.
  5. Enter an invalid ZIP code, ensure a notice appears above the Checkout block.
  6. Using Stripe, enter this card number, it will be declined: 4000 0000 0000 9995 ensure the error appears in the payment methods area.

  • Do not include in the Testing Notes

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Performance Impact

Changelog

Add StoreNoticesContainer to the @woocommerce/blocks-checkout package.

@opr opr added status: needs review type: enhancement The issue is a request for an enhancement. focus: blocks Specific work involving or impacting how blocks behave. block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. block: all products Issues related to the all products block. labels Nov 1, 2022
@opr opr self-assigned this Nov 1, 2022
@rubikuserbot rubikuserbot requested review from a team and alexflorisca and removed request for a team November 1, 2022 17:11
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

The release ZIP for this PR is accessible via:

https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-7558.zip

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

Script Dependencies Report

The compare-assets action has detected some changed script dependencies between this branch and trunk. Please review and confirm the following are correct before merging.

Script Handle Added Removed
wc-blocks.js wp-blocks, wp-compose, wp-element, wp-hooks, wp-i18n, wp-polyfill, wp-primitives ⚠️
handpicked-products.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-best-sellers.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-category.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-categories.js wp-block-editor, wp-blocks, wp-components, wp-element, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render ⚠️
product-new.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-on-sale.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
product-top-rated.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
products-by-attribute.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
featured-product.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
all-reviews.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives ⚠️
reviews-by-product.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
reviews-by-category.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
product-search.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
product-tag.js lodash, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-element, wp-html-entities, wp-i18n, wp-polyfill, wp-primitives, wp-server-side-render, wp-url ⚠️
featured-category.js lodash, react, wc-settings, wp-api-fetch, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-escape-html, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
all-products.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-blocks-shared-context, wc-blocks-shared-hocs, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-escape-html, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
price-filter.js lodash, react, wc-blocks-data-store, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
attribute-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning ⚠️
stock-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
active-filters.js lodash, react, wc-blocks-data-store, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-element, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
rating-filter.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-settings, wp-a11y, wp-block-editor, wp-blocks, wp-components, wp-data, wp-element, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url ⚠️
cart.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-blocks-shared-context, wc-blocks-shared-hocs, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-core-data, wp-data, wp-deprecated, wp-dom, wp-editor, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-plugins, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
checkout.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-price-format, wc-settings, wp-a11y, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-core-data, wp-data, wp-deprecated, wp-dom, wp-editor, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-plugins, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
mini-cart.js react, wc-price-format, wc-settings, wp-block-editor, wp-blocks, wp-components, wp-dom, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
mini-cart-contents.js lodash, react, wc-blocks-checkout, wc-blocks-data-store, wc-blocks-registry, wc-price-format, wc-settings, wp-a11y, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-keycodes, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
single-product.js lodash, react, wc-blocks-data-store, wc-blocks-registry, wc-blocks-shared-context, wc-blocks-shared-hocs, wc-price-format, wc-settings, wp-api-fetch, wp-autop, wp-block-editor, wp-blocks, wp-components, wp-compose, wp-data, wp-deprecated, wp-dom, wp-element, wp-escape-html, wp-hooks, wp-html-entities, wp-i18n, wp-is-shallow-equal, wp-polyfill, wp-primitives, wp-url, wp-warning, wp-wordcount ⚠️
legacy-template.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-data, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
product-query.js wc-settings, wp-block-editor, wp-blocks, wp-components, wp-data, wp-element, wp-hooks, wp-i18n, wp-polyfill, wp-primitives ⚠️
filter-wrapper.js wc-settings, wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️

This comment was automatically generated by the ./github/compare-assets action.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

Size Change: -20.8 kB (-2%)

Total Size: 970 kB

Filename Size Change
build/active-filters-frontend.js 7.75 kB +2 B (0%)
build/active-filters-wrapper-frontend.js 6.01 kB -4 B (0%)
build/active-filters.js 7.33 kB +3 B (0%)
build/all-products-frontend.js 11.3 kB -15.1 kB (-57%) 🏆
build/all-products.js 33.1 kB -415 B (-1%)
build/all-reviews.js 7.78 kB -4 B (0%)
build/attribute-filter-frontend.js 22.6 kB +15 B (0%)
build/attribute-filter-wrapper-frontend.js 7.12 kB -1 B (0%)
build/attribute-filter.js 12.2 kB +1 B (0%)
build/blocks-checkout.js 27.1 kB +8.57 kB (+46%) 🚨
build/cart-blocks/cart-accepted-payment-methods-frontend.js 1.38 kB +3 B (0%)
build/cart-blocks/cart-cross-sells-products--product-add-to-cart-frontend.js 5.48 kB +7 B (0%)
build/cart-blocks/cart-cross-sells-products-frontend.js 4.68 kB +13 B (0%)
build/cart-blocks/cart-express-payment--checkout-blocks/express-payment-frontend.js 5.02 kB +12 B (0%)
build/cart-blocks/cart-express-payment-frontend.js 778 B +14 B (+2%)
build/cart-blocks/cart-items-frontend.js 299 B +1 B (0%)
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 5.29 kB +3 B (0%)
build/cart-blocks/cart-order-summary-frontend.js 1.11 kB +1 B (0%)
build/cart-blocks/cart-totals-frontend.js 319 B -1 B (0%)
build/cart-blocks/order-summary-coupon-form-frontend.js 1.72 kB -1 B (0%)
build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js 0 B -5.66 kB (removed) 🏆
build/cart-blocks/order-summary-shipping-frontend.js 5.99 kB +5.56 kB (+1299%) 🆘
build/cart-blocks/order-summary-subtotal-frontend.js 274 B +1 B (0%)
build/cart-blocks/order-summary-taxes-frontend.js 435 B +2 B (0%)
build/cart-blocks/proceed-to-checkout-frontend.js 1.19 kB +2 B (0%)
build/cart-frontend.js 46.2 kB -8.23 kB (-15%) 👏
build/cart.js 46 kB -286 B (-1%)
build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 3.9 kB -1 B (0%)
build/checkout-blocks/billing-address-frontend.js 955 B +3 B (0%)
build/checkout-blocks/contact-information-frontend.js 1.77 kB -2 B (0%)
build/checkout-blocks/express-payment-frontend.js 1.13 kB +14 B (+1%)
build/checkout-blocks/order-note-frontend.js 1.14 kB -1 B (0%)
build/checkout-blocks/order-summary-cart-items-frontend.js 3.67 kB -3 B (0%)
build/checkout-blocks/order-summary-coupon-form-frontend.js 1.88 kB -6 B (0%)
build/checkout-blocks/order-summary-discount-frontend.js 2.27 kB -4 B (0%)
build/checkout-blocks/order-summary-fee-frontend.js 276 B +1 B (0%)
build/checkout-blocks/order-summary-frontend.js 1.11 kB +1 B (0%)
build/checkout-blocks/order-summary-shipping-frontend.js 6.04 kB +5.43 kB (+901%) 🆘
build/checkout-blocks/order-summary-taxes-frontend.js 435 B +2 B (0%)
build/checkout-blocks/payment-frontend.js 8.29 kB +524 B (+7%) 🔍
build/checkout-blocks/shipping-address-frontend.js 1.07 kB +3 B (0%)
build/checkout-blocks/shipping-methods-frontend.js 5.03 kB +138 B (+3%)
build/checkout-blocks/terms-frontend.js 1.63 kB +3 B (0%)
build/checkout-blocks/totals-frontend.js 325 B +2 B (+1%)
build/checkout-frontend.js 48.3 kB -8.29 kB (-15%) 👏
build/checkout.js 40.1 kB -226 B (-1%)
build/featured-category.js 13.2 kB -2 B (0%)
build/filter-wrapper-frontend.js 13.8 kB +17 B (0%)
build/legacy-template.js 2.86 kB +2 B (0%)
build/mini-cart-component-frontend.js 20 kB +24 B (0%)
build/mini-cart-contents-block/footer-frontend.js 2.97 kB +4 B (0%)
build/mini-cart.js 4.28 kB -1 B (0%)
build/price-filter-frontend.js 13.6 kB +4 B (0%)
build/price-filter-wrapper-frontend.js 7.01 kB -1 B (0%)
build/price-filter.js 8.38 kB +3 B (0%)
build/product-add-to-cart-frontend.js 1.46 kB +207 B (+16%) ⚠️
build/product-add-to-cart.js 8.37 kB +7 B (0%)
build/product-best-sellers.js 7.62 kB -1 B (0%)
build/product-button-frontend.js 2.13 kB +244 B (+13%) ⚠️
build/product-button.js 3.82 kB -4 B (0%)
build/product-categories.js 2.36 kB -1 B (0%)
build/product-category-list-frontend.js 1.13 kB +248 B (+28%) 🚨
build/product-image-frontend.js 2.15 kB +244 B (+13%) ⚠️
build/product-image.js 3.92 kB -1 B (0%)
build/product-new.js 7.62 kB -3 B (0%)
build/product-on-sale.js 7.95 kB -2 B (0%)
build/product-price-frontend.js 2.15 kB +234 B (+12%) ⚠️
build/product-price.js 1.53 kB -3 B (0%)
build/product-rating-frontend.js 1.45 kB +248 B (+21%) 🚨
build/product-sale-badge-frontend.js 1.38 kB +234 B (+20%) 🚨
build/product-sale-badge.js 816 B +4 B (0%)
build/product-sku-frontend.js 630 B +253 B (+67%) 🆘
build/product-sku.js 377 B +1 B (0%)
build/product-stock-indicator-frontend.js 1.26 kB +246 B (+24%) 🚨
build/product-summary-frontend.js 1.52 kB +229 B (+18%) ⚠️
build/product-summary.js 919 B -2 B (0%)
build/product-tag-list-frontend.js 1.12 kB +246 B (+28%) 🚨
build/product-tag-list.js 497 B -1 B (0%)
build/product-tag.js 8 kB -2 B (0%)
build/product-title-frontend.js 1.58 kB +242 B (+18%) ⚠️
build/product-title.js 3.3 kB +2 B (0%)
build/products-by-attribute.js 8.54 kB +4 B (0%)
build/rating-filter-frontend.js 7.16 kB -1 B (0%)
build/rating-filter-wrapper-frontend.js 5.41 kB -3 B (0%)
build/rating-filter.js 5.79 kB +1 B (0%)
build/reviews-by-category.js 11.2 kB -4 B (0%)
build/reviews-frontend.js 7.01 kB +2 B (0%)
build/single-product-frontend.js 17.5 kB -14.7 kB (-46%) 🎉
build/single-product.js 10 kB +1 B (0%)
build/stock-filter-frontend.js 7.79 kB +10 B (0%)
build/stock-filter-wrapper-frontend.js 6.03 kB -1 B (0%)
build/stock-filter.js 6.71 kB +3 B (0%)
build/vendors--attribute-filter-wrapper--mini-cart-contents-block/footer-frontend.js 0 B -6.86 kB (removed) 🏆
build/vendors--attribute-filter-wrapper-frontend.js 8.2 kB -12 B (0%)
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/order-summary-shipping--checkout-blocks--18f9376a-frontend.js 19.1 kB -2 B (0%)
build/vendors--cart-blocks/cart-cross-sells-products--product-add-to-cart-frontend.js 7.54 kB +5 B (0%)
build/vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542-frontend.js 3.14 kB -1 B (0%)
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b-frontend.js 4.86 kB +4 B (0%)
build/wc-blocks-middleware.js 934 B +3 B (0%)
build/wc-blocks-registry.js 2.92 kB +2 B (0%)
build/wc-blocks-shared-context.js 1.52 kB +2 B (0%)
build/wc-blocks-shared-hocs.js 1.73 kB +2 B (0%)
build/wc-blocks-style-rtl.css 24.2 kB +10 B (0%)
build/wc-blocks-style.css 24.2 kB +14 B (0%)
build/wc-blocks-vendors.js 62.4 kB -18 B (0%)
build/wc-blocks.js 2.63 kB +1 B (0%)
build/vendors--attribute-filter-wrapper--mini-cart-contents-block/footer--product-add-to-cart-frontend.js 6.87 kB +6.87 kB (new file) 🆕
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping--checkout-block--dda5866c-frontend.js 8.85 kB +8.85 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
build/cart-blocks/cart-cross-sells-frontend.js 253 B
build/cart-blocks/cart-line-items-frontend.js 1.07 kB
build/cart-blocks/empty-cart-frontend.js 346 B
build/cart-blocks/filled-cart-frontend.js 783 B
build/cart-blocks/order-summary-discount-frontend.js 2.16 kB
build/cart-blocks/order-summary-fee-frontend.js 273 B
build/cart-blocks/order-summary-heading-frontend.js 455 B
build/checkout-blocks/actions-frontend.js 1.77 kB
build/checkout-blocks/fields-frontend.js 343 B
build/checkout-blocks/order-summary-subtotal-frontend.js 273 B
build/featured-product.js 13.4 kB
build/filter-wrapper.js 2.41 kB
build/general-style-rtl.css 1.29 kB
build/general-style.css 1.29 kB
build/handpicked-products.js 7.29 kB
build/mini-cart-contents-block/empty-cart-frontend.js 366 B
build/mini-cart-contents-block/filled-cart-frontend.js 230 B
build/mini-cart-contents-block/items-frontend.js 237 B
build/mini-cart-contents-block/products-table-frontend.js 591 B
build/mini-cart-contents-block/shopping-button-frontend.js 288 B
build/mini-cart-contents-block/title-frontend.js 368 B
build/mini-cart-contents.js 17.1 kB
build/mini-cart-frontend.js 1.77 kB
build/price-format.js 1.19 kB
build/product-add-to-cart--product-button--product-category-list--product-image--product-price--product-r--a0326d00.js 226 B
build/product-add-to-cart--product-button--product-image--product-rating--product-title.js 151 B
build/product-button--product-category-list--product-image--product-price--product-rating--product-sale-b--e17c7c01.js 431 B
build/product-button--product-image--product-rating--product-sale-badge--product-title.js 302 B
build/product-category-list.js 502 B
build/product-category.js 8.62 kB
build/product-query.js 2.89 kB
build/product-rating.js 787 B
build/product-search.js 2.62 kB
build/product-stock-indicator.js 646 B
build/product-top-rated.js 7.86 kB
build/reviews-by-product.js 12.3 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/cart-line-items--cart-blocks/cart-order--671ca56f-frontend.js 5.26 kB
build/wc-blocks-data.js 18.5 kB
build/wc-blocks-editor-style-rtl.css 5.24 kB
build/wc-blocks-editor-style.css 5.24 kB
build/wc-blocks-google-analytics.js 1.56 kB
build/wc-blocks-vendors-style-rtl.css 1.95 kB
build/wc-blocks-vendors-style.css 1.95 kB
build/wc-payment-method-bacs.js 816 B
build/wc-payment-method-cheque.js 811 B
build/wc-payment-method-cod.js 909 B
build/wc-payment-method-paypal.js 837 B
build/wc-settings.js 2.6 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

This PR has been marked as stale because it has not seen any activity within the past 7 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Nov 9, 2022
Copy link
Member

@alexflorisca alexflorisca left a comment

Choose a reason for hiding this comment

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

Nice on, everything looks good, just a non-blocking comment - see below 👍

StoreNoticesContainer,
SnackbarNoticesContainer,
} from '@woocommerce/base-context';
import { SnackbarNoticesContainer } from '@woocommerce/base-context';
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to move the SnackbarNoticesContainer too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll do it in another PR next cooldown. #7638 open to track. Thanks for pointing it out Alex.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexflorisca no we don't want to do it now because as Mike said, the SnackbarNoticesContainer isn't location dependent, so third parties can just add a notice with type snackbar and add it to either the cart or checkout contexts depending where the notice occurs.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

TypeScript Errors Report

Files with errors: 431
Total errors: 2075

⚠️ ⚠️ This PR introduces new TS errors on 3 files:

assets/js/blocks/cart-checkout-shared/payment-methods/payment-method-error-boundary.js

packages/checkout/components/store-notices-container/index.tsx

packages/checkout/components/store-notices-container/test/index.tsx

@github-actions github-actions bot removed the status: stale Stale issues and PRs have had no updates for 60 days. label Nov 10, 2022
@ralucaStan
Copy link
Contributor

Really nice work @opr! I think this doc should be updated as well. https://github.com/woocommerce/woocommerce-blocks/blob/4d1c295a2bace9a4f6397cfd5469db31083d477a/docs/internal-developers/block-client-apis/notices.md#storenoticescontainer?

Can you think of other docs we might need to update in the extensibility section?

@opr
Copy link
Contributor Author

opr commented Nov 11, 2022

Hey @ralucaStan thanks for the feedback, what other things do you think should change on that document? (besides the typo in actiona and the wrong component name I also fixed)?

@opr opr force-pushed the try/move-store-notices-container branch from 622d110 to 58979dc Compare November 11, 2022 14:20
@ralucaStan
Copy link
Contributor

Hey @ralucaStan thanks for the feedback, what other things do you think should change on that document? (besides the typo in actiona and the wrong component name I also fixed)?

I missed this ping Thomas. I was thinking about the path used in the import. Should that be changed?

import { StoreNoticesContainer } from '@woocommerce/base-components/store-notices-container';

@opr opr force-pushed the try/move-store-notices-container branch from dcb41f6 to 5a1e6b9 Compare November 17, 2022 11:32
@opr opr merged commit 1690e79 into trunk Nov 17, 2022
@opr opr deleted the try/move-store-notices-container branch November 17, 2022 13:33
@danieldudzic danieldudzic added this to the 9.0.0 milestone Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: all products Issues related to the all products block. block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. focus: blocks Specific work involving or impacting how blocks behave. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants