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

Don't use @wordpress/components on the frontend #8452

Open
kmanijak opened this issue Feb 16, 2023 · 1 comment
Open

Don't use @wordpress/components on the frontend #8452

kmanijak opened this issue Feb 16, 2023 · 1 comment
Assignees
Labels
team: Kirigami & Origami type: cooldown Things that are queued for a cooldown period (assists with planning). type: dependencies Pull requests that update a dependency file (used by renovate).

Comments

@kmanijak
Copy link
Contributor

kmanijak commented Feb 16, 2023

There are two versions of a library used in the repo:

@wordpress-components - dedicated to use in the editor
wordpress-components - dedicated to use in the frontend.

However, the library itself is not intended to be used in the frontend, hence the movement to remove such dependency.

The goal of this issue is to remove the frontend dependency on the library (so to get rid of wordpress-components) and allow to bump @wordpress-components.

Path Components PR Notes
assets/js/atomic/blocks/product-elements/add-to-cart/product-types/grouped.tsx Placeholder #8438 Remove usage - unreachable code
assets/js/atomic/blocks/product-elements/add-to-cart/product-types/variable/variation-attributes/attribute-select-control.tsx SelectControl
assets/js/base/components/button/index.tsx Button
assets/js/base/components/cart-checkout/totals/shipping/shipping-rate-selector.tsx Notice
assets/js/base/components/combobox/index.tsx ComboboxControl
assets/js/base/components/drawer/index.tsx Modal #9345
assets/js/base/components/form-token-field/index.tsx FormTokenField
assets/js/blocks/attribute-filter/block.tsx Notice #8457 Move to Editor
assets/js/blocks/cart/inner-blocks/cart-express-payment-block/edit.tsx Placeholder, Button #8432 Replaced with @wordpress/components
assets/js/blocks/cart-checkout-shared/payment-methods/no-payment-methods/index.js Placeholder, Button, Notice
assets/js/blocks/checkout/inner-blocks/checkout-express-payment-block/edit.tsx Placeholder, Button #8432 Replaced with @wordpress/components
assets/js/blocks/checkout/inner-blocks/checkout-shipping-method-block/block.tsx __experimentalRadio, __experimentalRadioGroup
assets/js/blocks/checkout/inner-blocks/checkout-shipping-methods-block/block.tsx Notice
assets/js/blocks/checkout/inner-blocks/checkout-shipping-methods-block/no-shipping-placeholder/index.js Placeholder, Button #8463 Move to Editor
assets/js/blocks/rating-filter/block.tsx Notice #8444 Move the dependency to Editor
packages/checkout/index.js SlotFillProvider
packages/checkout/components/store-notice/index.tsx Notice
packages/checkout/components/store-notices-container/snackbar-notices.tsx SnackbarList
packages/checkout/components/store-notices-container/store-notices.tsx Notice
packages/checkout/slot/index.js createSlotFill, __experimentalUseSlot, useSlot

The remaining rows should be addressed as a whole. Here's the unfinished work: #8421

@Aljullu
Copy link
Contributor

Aljullu commented Mar 24, 2023

Heads-up about #8659, which is removing the Notice dependency from several blocks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team: Kirigami & Origami type: cooldown Things that are queued for a cooldown period (assists with planning). type: dependencies Pull requests that update a dependency file (used by renovate).
Projects
None yet
Development

No branches or pull requests

3 participants