woocommerce/plugins/woocommerce-blocks/assets/js/base/context/providers
Thomas Roberts 4861ec250e
Ensure local state is not overwritten by server when using `extensionCartUpdate` (#49311)
* Update ExtensionCartUpdateArgs to allow overwriting dirty data

* Set isCustomerDataDirty when updating billing/shipping addresses

* Update docs

* Add e2e test to ensure overwriting dirty state isn't possible

* Organise tests better and add check pushed data isn't overwritten

* Check if data is changing when updating shipping/billing addresses

* Check input values in test

* Add test to ensure data can still be overwritten by extensions

* Add changelog

* Fix lint errors

* Remove rogue console log

* Remove unused import

* Update plugins/woocommerce-blocks/assets/js/data/cart/reducers.ts

* Fix lint error

* Remove unneeded mdlint ignore

* Update test to select a value instead of fill

* Add methods to get/set dirty customer data in local storage

* Push all customer data, not just dirty fields

* Update e2e test

* Update push changes unit test

* Update keys in mock expected arg

* Align localstorage key name with Gutenberg uppercase style

* Fix lost code after merge conflict

* Remove unnecessary metadata set in reducer

* Reimplement TS changes

* Debounce writing to localStorage

* Only update localStorage if billing/shipping changed

* Remove localStorage key when checkout is complete

* Remove unused import
2024-11-07 18:18:57 +01:00
..
add-to-cart-form Fixed Blocks Linting Errors (#42727) 2023-12-12 15:05:20 -08:00
cart-checkout Ensure local state is not overwritten by server when using `extensionCartUpdate` (#49311) 2024-11-07 18:18:57 +01:00
container-width-context.tsx [Performance]: Replace `classnames` usage with `clsx` (#47760) 2024-05-31 05:49:36 +02:00
editor-context.tsx Show Cart and Checkout blocks in Style Book (https://github.com/woocommerce/woocommerce-blocks/pull/8888) 2023-03-30 15:15:00 +01:00
index.js New contexts for `StoreNoticesContainer` and notice grouping (https://github.com/woocommerce/woocommerce-blocks/pull/7711) 2022-12-19 15:30:13 +00:00
query-state-context.js Fix Circular Dependencies During Builds (https://github.com/woocommerce/woocommerce-blocks/pull/4025) 2021-04-08 13:31:12 +01:00