* fix line height
* Support controlling address card from data store
* expand billing address on unsync
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* disable linter rule
* remove empty section
* remove used vars
---------
Co-authored-by: github-actions <github-actions@github.com>
* Initial implementation of the missing product state
- Changed `getProductCollectionUIStateInEditor` to a hook `useProductCollectionUIState`.
- As we added logic to check if selected product reference is deleted which require making an API call. Therefore, I decided to use a hook.
- While making an API call to check if product reference is deleted, I decided to show spinner in the block.
- Introduced new UI state `DELETED_PRODUCT_REFERENCE` to handle the missing product state.
- Updated existing `ProductPicker` component to handle the new UI state.
- It's better to use existing component for the missing product state, as it already has all the required UI.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use getEntityRecord to check if product exists and other improvements
* Remove console log
* Add E2E tests for deleted product reference in Product Collection block
This commit introduces new E2E tests to verify the behavior of the Product
Collection block when dealing with deleted product references. The changes
include:
1. New test suite in register-product-collection-tester.block_theme.spec.ts
2. Modification to product-collection.page.ts to support custom product selection
3. Minor update to utils.tsx to handle trashed products
These tests ensure that the Product Collection block correctly handles
scenarios where referenced products are deleted, trashed, or restored,
improving the overall reliability of the feature.
* Simplify product creation in Product Collection block test
* Refactor E2E test for delete product reference picker
1. Removing the unnecessary `test.describe` block for "Deleted product reference"
2. Eliminating the `beforeEach` hook that was creating a test product
3. Integrating the test product creation directly into the main test
This change simplifies the test structure and improves readability while
maintaining the same test coverage for the Product Collection block's
behavior when dealing with deleted or unavailable products.
* Simplify logic for product collection UI state
This commit simplifies the handling of the `usesReference` prop in the
Product Collection block:
1. In `edit/index.tsx`, directly pass `usesReference` to
`useProductCollectionUIState` hook without conditional spreading.
2. In `utils.tsx`, update the type definition of `usesReference` in the
`useProductCollectionUIState` hook to explicitly include `undefined`.
* Refactor Product Collection block to improve prop passing
- Introduce ProductCollectionContentProps type for better prop management
- Refactor Edit component to use a renderComponent function
- Update component prop types to use more specific props
- Remove unnecessary props from ProductCollectionEditComponentProps
- Simplify component rendering logic in Edit component
- Adjust ProductPicker to receive only required props
- Update imports and prop types in various files to use new types
This refactoring improves code organization and reduces prop drilling by
only passing necessary props to each component. It enhances maintainability
and readability of the Product Collection block and related components.
* Refactor Product Collection block editor UI state handling
This commit simplifies the rendering logic in the Product Collection block's
Edit component. It removes a redundant case for the VALID state, as both
VALID and VALID_WITH_PREVIEW states now render the same ProductCollectionContent
component. This change improves code maintainability and reduces duplication.
* Fix: isDeletedProductReference is not set correctly
* Use "page.reload" instead of "admin.page.reload"
* Separate PRODUCT_REFERENCE_PICKER and DELETED_PRODUCT_REFERENCE cases
This improves readability and maintainability of the switch statement.
---------
Co-authored-by: github-actions <github-actions@github.com>
* reset styles for panel button
* reset styles for address card edit and address line 2
* Update shipping selector buttons
* fix line height
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* remove extra styles no longer needed
* update styles to balance chevron and change to span
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alex Florisca <alex.florisca@automattic.com>
* update Mongolia postcode to be 5 digits instead of 6
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update validation package and expand mongolia checks
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* update lock
* fix lock again
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add focus styles for select
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add block to templates
* Register block type with php
* Create block type class
* Update webpack
* Move password strength meter component
* Add button styles when disabled
* Move password strength component
* Block WIP
* CSRF token handling
* Put new block behind feature flag
* Add experimental flag docs
* Update icon + description
* Changelog
* Lint errors
* Style controls
* Adjust icon markup
* subsctring match
* More specific import
* Fix test fail caused by layout shift
* Wording changes from Figma
* Check if logged in, not just if the current email is registered
* Use opacity for disabled button text
* Sync order data with customer after account creation
* Add id/fragment to form
* Remove overlay icon settings from parent block
* Change overlay block icon to generic button icon
* Add logic to remove overlay nav when overlay mode is set to never
* Add logic to add overlay nav when overlay mode is not never
* Add default attributes for overlay nav button
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use unique icons for each overlay navigation close and open
* Add icon picker for open overlay navigation
* Add trigger type for overlay close navigation
* Add missing settings label
* Fix e2e tests
* Skip a test for overlay-navigation block
* Add e2e tests for overlay button behavior
* Fix linting error
* Skip overlay nav tests
* Fix icon size value not saving
* Revise logic to target explicitly the innerblock of product-filters
* Ensure overlay navigation is of type open-overlay
* Prevent possible race conditions
---------
Co-authored-by: github-actions <github-actions@github.com>
* Add variation to Product Filters Overlay Navigation
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Move Product Filters Overlay Navigation to correct position
* Hide block when it is outside the Product Filters template part
* Display Navigation block in the frontend
* Show the Product Filters Overlay Navigation on the frontend
* Add logic to hide Product Filters Overlay Navigation block on the frontend
* Hide block on the Overlay template part
* Fix eslint errors
* Update the block variation title
* Remove the `isActive` property from the block variations
* Use Product Filters block context
* Replace enum with const
* Remove unnecessary `StyleAttributesUtils`
* Rename context key
* Move BlockOverlayAttribute to the constants.ts file
* fix BlockOverlayAttribute import
* Fix import error
* Improve code for the shouldHideBlock method
* Remove unnecessary attributes property
* Fix error in ProductFiltersOverlay block
* Add dialog to the Product Filters block
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
* Fix interactivity api error
* Prevent block from being hidden on Product Filters template part
* Fix inspector controls when block is hidden
* Add clickable action to the Product Filters Overlay Navigation block
* Fix interactivity directives that were not working for the Overlay
* Fix issue with dialog styles not being correctly applied
* Add the `closeDialog` functionality
* Parse and render blocks for the Product Filters overlay
* Fix padding
* Fix style for Product Filters Overlay navigation block
* Add e2e test
* Add e2e test to Product Filters Overlay template part
* Fix e2e test
* Fix issue causing the trigger button to show even though the overlay mode is set to 'Never"
* Fix issue causing close button to not be displayed in the dialog
* Add e2e tests
* Fix issue that was preventing users from scrolling down the dialog content
* Remove text duplication in e2e tests
* Remove unnecessary imports
* Fix php cs errors
* Fix php cs error
* Revert changes on Product Gallery modal styles
* Fix lint errors
* fix php cs lint errors
* fix php cs error
---------
Co-authored-by: github-actions <github-actions@github.com>
* Revert "[React 18] Use `createRoot().render()` instead of `render()` (#48843)"
This reverts commit 752273e6ce.
* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
* Update README.md
* Update 722.md
* Update 741.md
* Update docs-manifest.json
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
* Update isAddressComplete to allow only specific fields to be checked
* Update tests for isAddressComplete
* Update wording on "enter address" prompt in Cart sidebar
* Update Shipping to Delivery in cart & checkout shipping total
* Only check the city, state, country, & postcode fields in shipping calc
* Update wording in the "Ships to" section of cart/checkout sidebar
* Update shipping calculator button to say delivery
* Update tests to use new strings
* Remove test that was falsely passing anyway
This test checked for presence of a string that wasn't in the codebase. It also doesn't seem like a valid test. Why would we want to remove the button just because default rates are available?
* Add changelog
* Left align text in shipping calculator button
It floats weirdly in the middle with the new text changes
* Update text in tests
* Update wording in unit tests
* Update shipping calculator text in test
* Update shipping text in test
* Update use of shipping in tests
* Skip test with no translation available
* Lint fixes
---------
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Fix no products component prematurely being rendered
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Use useMemo to memoirize component element on re-renders
---------
Co-authored-by: github-actions <github-actions@github.com>
* Define the event
* Add action sending an event in PC store
* Add directives and context to Product Template li element
* Use on--click directive in ProductImage
* Use on--click directive in Product Title
* Use on--click directive in Product Button
* Add changelog
* Add E2E tests
* Update docs
* Update blocks reference and docs manifest
* Update m,anifest
* Fix mistake in docs
* Regenerate docs manifest
* Fix lint
* Extractb new tests to a separate file
* Product filters ensure we can add multiple instances
* Add changefile(s) from automation for the following project(s): woocommerce-blocks
* Add e2e tests to ensure multiple filters can be added
---------
Co-authored-by: github-actions <github-actions@github.com>