Commit Graph

6841 Commits

Author SHA1 Message Date
Fernando Marichal 9ed5a7923b
Convert with-reviews to TS (#50890)
* Convert with-reviews to ts

* Add changelog

* Remove bind
2024-08-27 16:29:44 -03:00
Maikel Perez e5c6477a4e
Blocks E2E: Move register product collection tester e2e tests from product collection file to its own file (#50852)
* Move register product collection tester e2e tests from product collection file to its own file

* Add changelog file

* Remove the unstable allTextContents usage

* Remove page.waitForTimeout because it doesn't validate that the button is hidden after exactly 1 second

* Remove page.waitForTimeout from 'Should display properly in Product Catalog template' e2e test

* Let's use one parent describe per file for good practice

* Keeping the structure flat
2024-08-27 09:37:45 -04:00
Albert Juhé Lluveras 1e650d06a9
Add 'Show tab title' attribute to the Product Details block (#50884)
* Add 'Show tab title' attribute to the Product Details block

* Add tests

* Add changelog file

* Linting

* Use editor.selectBlocks() instead of block.click()
2024-08-27 15:10:49 +02:00
Karol Manijak 5a80d5e1da
Update Block Reference and make it public doc (#50906)
* Update Block References doc

* Move the Block References to public Docs

* Change the place Block Reference is generated to

* Add changelog

* Update docs manifest file

* Update manifest
2024-08-27 09:04:15 +02:00
Roy Ho cc07a5f902
[Experimental] Price filter: fix range slider update (#50935)
* Price filter: fix range slider update

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Fix linting error

* Remove unneeded state setter

* Update plugins/woocommerce-blocks/assets/js/blocks/product-filter/inner-blocks/price-filter/frontend.ts

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>

* Fix linting error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
2024-08-26 19:57:01 -07:00
Albert Juhé Lluveras 08f724b8d8
Improve the tabs focus style in the Product Details block with Minimal style variation (#50880)
* Improve the tabs focus style in the Product Details block with Minimal style variation

* Add changelog file

* Remove direct child selector
2024-08-26 13:18:28 +02:00
Mike Jolley 6c4a26770d
Order confirmation: Update mobile order summary styling so items appear side by side (#50722)
* Update order confirmation wording

* Style order details inline

* Changelog

* Update test due to change of text
2024-08-23 19:22:59 +01:00
Gabriel Manussakis d773bb483a
[Accessibility] Focus coupon input if it has an error (#48738)
* Focus cupon input if it has errors

* Add changelog file

* Add styles to coupon field with error on cart page

* Make coupon errors accessible on the cart page

* Add styles to coupon field with error on checkout page

* Rename coupon variables on cart

* Focus coupon field with error before updating live region on cart page

* Focus coupon field with error before updating live region on checkout page

* Remove incorrect early return

* Update coupon error notice test

* Improve coupon error message semantics

* Fix coupon errors for block based themes

* Update tests to not look for coupon errors on the notice block

* Rename coupon-error-message to coupon-error-notice

* Fix notice if coupon doesn't exist on tests

* FIx invalid coupon notice on classic theme test

* Update test for coupon inline notice

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Fix code formatting

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Don't clear coupon input if code doesn't exist

* Create coupon error notice mixin

* Update coupon error notice styles

* Coupon error notice T19 compatibility

* Coupon error notice T17 compatibility

* Coupon error notice TT1 compatibility

* Coupon error notice TT compatibility

* Coupon error notice TT2 compatibility

* Coupon error notice TT3 compatibility

* Add spaces around paramenters

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Add spaces around paramenters

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>

* Replace $red SCSS variable with a CSS one

* Keep input with the invalid coupon code after notice appears

* Fix typo in comment

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Fix typo in comment

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Break notice message into two lines

* Break if statement into two lines

---------

Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-08-23 19:22:28 +01:00
Caleb Mazalevskis b4fd419f74
Fix typos. (#50047) 2024-08-23 18:26:09 +01:00
Seghir Nadir e66ccf698c
Run Checkout block coupon filter on empty array (#50876)
* Run Checkout block coupon filter on empty array

* fix conditional

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* remove useless eslint skip

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-23 15:34:57 +00:00
Maikel Perez c09e45a391
Blocks E2E: Move collections e2e tests from product collection file to its own file (#50853)
* Move collections e2e tests from product collection file to its own file

* Add changelog file
2024-08-23 09:26:38 -04:00
Karol Manijak 2f68f9265b
Fix most of lint warnings (#50869)
* Fix number of lint warnings

* Add changelog

* Improve mocking value

* Fix exports

* Fix mock

* Bring back the empty array hook dependency
2024-08-23 14:30:14 +02:00
Mike Jolley 42cdc0e978
Block Checkout: Respect default saved payment method when using tokens (#50481)
* activeSavedToken state is unused

* Select is_default saved token by default

* changelog

* Unused objectHasProp
2024-08-23 12:03:11 +02:00
Maikel Perez a779788a93
Blocks E2E: Move the inspector controls e2e tests from product collection file to its own file (#50849)
* Move the inspector controls e2e tests from product collection file to its own file

* Add changelog file
2024-08-22 10:55:20 -04:00
Roy Ho 320c165cb8
Add additional size units to product image element (#50770)
* Add additional size units to product image element

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-22 06:32:03 -07:00
Sam Seay 35cdc6dc20
Use syncpack to lock pnpm version till we can fix issues (#50828) 2024-08-22 12:34:42 +12:00
Fernando Marichal 771fd00e5d
Featured Product: Fix variable product Selection dropdown (#50633)
* Add hook to SearchListItem

* Add changelog

* Invert is-expanded chevron

* Fix expanded setting

* Fix e2e test

* Add hasChildren and isSelected as dependency
2024-08-20 12:42:35 -03:00
Gabriel Manussakis c9aa65a22f
[Accessibility] Fix focus order on checkout block page (#49649)
* Render total blocks before fields on checkout

* Reverse checkout total blocks position on desktop

* Add changelog file

* Add conditional styles to reverse checkout blocks order

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-20 15:42:38 +02:00
Fernando Marichal ce98e51430
[Filter Products by Price]: Update view when changing the min/max value (#50651)
* Use handlePriceChange method

* Fix E2E test

* Add changelog

* Remove onBlur

* Add select when clicked

* Fix comment

* Add functionality to experimental block

* Fix E2E test
2024-08-20 10:20:09 -03:00
DAnn2012 8387b0a842
Fix typo (1140.md) (#50160)
* Update 1140.md

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update 1140.md

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-20 12:37:13 +01:00
piinthecloud 5098bb1169
create block theme folder (#50638)
* create block theme folder

* add changelog

* update titles
2024-08-20 13:19:47 +02:00
Seghir Nadir 2a406c7e8a
Update all blocks to V3 (#48720)
* Update all blocks to V3

* remove explicit version set in shared config blocks

* update styling for Cart/Checkout in iframe

* test: fix block e2e tests

* test: fix attribute filter e2e tests

* test: fix product collection e2e tests

* test: fix product on sale e2e test

* test: fix rating filter e2e tests

* test: fix review e2e tests

* test: fix stock e2e tests

* test: fix preview button test

* fix: product on sale wrapper

* test: fix insertBlockByShortcut in iframe

* test: fix core e2e tests

* chore: changelog

* test: typo

* test: update PC e2e tests

* add test to make sure iframe canvas is loaded

* fix syntax error

* Update plugins/woocommerce-blocks/tests/e2e/tests/basic.block_theme.spec.ts

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

---------

Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-20 10:14:11 +00:00
Jonathan Lane d5c901e3b7
Update Playwright to 1.46.1 (#50772) 2024-08-20 10:40:46 +03:00
Caleb Mazalevskis 50900d9d4e
Fix markdown typos. (#50282)
* Fix markdown typos.

* Re-fix typos.

* Add changelogs (#issuecomment-2296573205).
2024-08-19 14:59:10 -03:00
Alex Florisca cda0f8a3f8
Revert "Add new buttonAttributes API to style express checkout buttons coherently (#47899) (#50763)
* Revert "Add new buttonAttributes API to style express checkout buttons coherently (#47899)"

This reverts commit 006fbc6714.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Update changelog

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-19 18:54:58 +01:00
Matt Sherman 42e943dc0e
Decode HTML entities and strip HTML tags in product names for cart quantity change notifications (#50541)
* Decode cart item names
* Strip HTML tags from product name

---------

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2024-08-19 12:07:11 -04:00
Gabriel Manussakis d7783511ff
[WIP][Accessibility] Fix inline documentation typos in woocommerce-blocks (#50737)
* Fix inline documentation typos in woocommerce-blocks

* Add changelog file

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

* Remove original changelog

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
2024-08-19 13:57:38 +01:00
Adrian Duffell a4fe8a6417
Add visual changes to the blueprint slotfill (#50724) 2024-08-16 18:23:05 +00:00
Alexandre Lara 6185185589
[Experimental] Product Filters Redesign > Overlay Navigation: Add Block to the Product Filters Block (#50186)
* 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

* Prevent block from being hidden on Product Filters template part

* Fix inspector controls when block is hidden

* Remove unnecessary import

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-15 14:50:45 -03:00
Adrian Moldovan d7909ecb3c
[e2e tests] Add BuildKite reporter to Blocks e2e tests (#50642) 2024-08-15 13:48:44 +01:00
Mike Jolley a932ceb59f
Fix extensionCartUpdates not surfacing errors to cart and checkout (#49762)
* Add context to type

* Clean up notifyerrors helpers

* Notify and clear top level cart errors

* changelog

* Make extensionCartUpdate surface the errors

* No automatic clearing of notice

* Handle generic errors only, add docs

* Rename param

* Fix linting in readme

* Update toc

* test coverage

* Unused import

* We're only dealing with arrays of errors so simplify logic
2024-08-14 15:24:44 +01:00
Gabriel Manussakis f3a1281cd0
[Accessibility] Improve hover style on product tabs (#50605)
* Make hover status style like active

* Add changelog file

* Update changelog message

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>

---------

Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2024-08-14 15:56:19 +02:00
Albert Juhé Lluveras 9f69c63a9e
Product Price block: prevent price amounts from breaking into multiple lines (#50660)
* Product Price block: prevent price amounts from breaking into multiple lines

* Add changelog file
2024-08-14 15:17:03 +02:00
Alex Florisca 006fbc6714
Add new buttonAttributes API to style express checkout buttons coherently (#47899)
* Expose buttonAttributes to the express payment methods

* Add size and label attributes to the express checkout area

* Remove defaultHeight

* default button Label

* Remove the button label attribute

* Remove px from height

* Change large button height to 55px

* Load express checkout block with attributes

* Add toggle and borderRadius controls and remove getting border radius from the theme

* Remove extra border radius text

* Only pass buttonAttributes if toggled on

* Move express payment block attribute logic into a Provider

* Tidy up editor grid and parse attributes into context on frontend

* Add px to border-radius input

* Express payment methods not selectable

* Add a test

* lint fixes

* default button height is 48 not 4

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Update docs

* Add tests for express payment methods

* Center images within the express payment area in the editor

* Apply the buttonAttributes to the li container in the editor regardless of showButtonStyles

* Fix style issue

* fix linting

* fix lint again

* Update manifest

* Update docs manifest

* Resize images in editor

* lint fix

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 11:02:58 +01:00
Alba Rincón 381c87da80
Fix translations - Avoid registering blocks in the wrong context (#50615)
* Avoid registering block in the wrong context

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 10:43:32 +02:00
Alba Rincón d04666e35c
Fix `Single product` translations on edit mode (#50599)
* Format json

* Get title and description from the registered block

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Add empty array dep

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-14 10:43:15 +02:00
DAnn2012 3a363d232b
Fix typo (product-collection.block_theme.spec.ts) (#50154)
Co-authored-by: github-actions <github-actions@github.com>
2024-08-13 12:38:56 +01:00
Karol Manijak 8bdc78c777
Product Collection: Trigger `wc-blocks_product_list_rendered` JS event (#50166)
* Dispatch JS event about PC being rendered

* Revert format changes

* Write the callback

* Add functions descriptions

* Add changelog

* Remove empty line

* Add tests

* Rename test cases

* Replace waiting for page load with more reliable expect.poll

* Remove leftover step

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>

* Fix typo in function name

* Add collection name to default Product Collection block

* Expect collection name in the event

* Expose the collection name through IAPI context

* Send the collection name with the event

* Trigger event also on page change

* Remove unused CUSTOM collection type

* Provide documentation

* Update TOC

* Update tests that verify the event payload

* Improve E2E tests further

* Don't add a Product Catalog collection type to default collection

* Avoid repeating the same piece of code by extracting some function on tag processor

* Rename function to better depict its purpose

* Move the documentation to the right place

* Remove the unused variable

* Add example to dom-events doc

* Update documentation

* Update docs manifest

* Attach default collection name

* Add the default collection context in PHP so it covers all the cases

* Prevent exposing product catalog collection name in event

* Update docs

* Update test

---------

Co-authored-by: Bart Kalisz <bartlomiej.kalisz@gmail.com>
2024-08-13 12:29:04 +02:00
Bart Kalisz 418c8f029f
Product Collection: Remove automatic migration code (#50440)
Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-13 11:29:07 +02:00
Corey McKrill d569c419b2
wp-env: Update package dependency + add mysqlPort (#50568)
* wp-env: Update package dependency + add mysqlPort

Starting in v10.1.0, wp-env can take a `mysqlPort` property in both
`env.development` and `env.tests` objects, which allows you to specify
the database connection port. This port is otherwise randomly assigned
every time you start up the containers. This allows for having a more
consistent development environment.

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* Further update to pnpm lock file
2024-08-12 12:56:49 -07:00
Maikel Perez 640a6ca439
CheckboxList and CheckboxControl: Label htmlFor and Input id should be unique (#50566)
* Extract the checkbox list option logic into its own component
This allows to generate a dynamic id per option so it never repeats in the entire document.

* Add changelog file

* Move CheckboxListOptionControl to its own file

* Add value to the checkbox control to be aligned with the native input type=checkbox element. And also use it to get the correct checkbox by value in unit tests

* Because checkboxes not longer have fixed ids, now we use their value to lookup for them instead

* Updating snapshots since the checkboxes ids are now autogenerated
2024-08-12 12:33:17 -04:00
Mike Jolley 1160414b14
Checkout: Fix display of coupon removal notices (#50412)
* Replace receiveCartContents with thunk which handles errors

* Avoid notice dismissal when pushing changes

* Update coupon error messaging for store API requests

* Changelog

* Undo thunks import change

* Remove unused removeAllNotices
2024-08-09 16:28:18 +01:00
Brian Taylor 062b161525
Update docs links blocks documentation (#50239)
* Update "Learn More" docs link for incompatible extensions

* Update links to blocks documentation

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Remove Unnecessary changelog message

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

* Delete unneeded changelog file

* Add changefile(s) from automation for the following project(s): woocommerce-blocks

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-09 16:27:04 +01:00
Tung Du 70e54f90ca
[Experimental]Attribute Filter: Dynamic title and description. (#50234) 2024-08-09 19:57:40 +07:00
Tung Du aaf3046eb6
[Experimental] Product Filters Redesign: Attribute Filters: List style (#50340)
* update: new simplified markup and style

* add: editor preview

* add: show 15 items initially

* fix: render li class for checked items

* chore: naming

* chore: changelog

* update: set some preview items checked for styling purpose

* fix: only show show more button when the list is long

* chore: lint

* fix: e2e tests
2024-08-09 16:17:14 +07:00
Tung Du 528be023ae
Refactor: migrate the All Products block to functional component (#50203)
* refactor: migrate the All Products block to functional component

* chore: changelog

* chore: lint
2024-08-09 14:42:45 +07:00
Alba Rincón 0235907b14
Customer Account - Maintain the size of the icon in smaller screens (#50410)
* Customer Account - Maintain the size of the icon in smaller screens

* Hide overflow text

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-07 17:45:16 +02:00
Luigi Teschio 9ae7485039
Compatibility Layer: fix 'woocommerce_before_single_product_summary' hook position (#50392)
* Compatibility Layer: fix 'woocommerce_before_single_product_summary' hook position

* Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-07 14:53:11 +02:00
Albert Juhé Lluveras 06b9380ab4
Enable Classic Template tests in the frontend and the Product Attribute template (#49199)
* Enable Classic Template tests in the Product Attribute template

* Reenable and simplify frontend test

* Add changelog file
2024-08-07 12:32:54 +02:00
Albert Juhé Lluveras bd41bd34f6
Remove duplicate Add to Cart Form block from Webpack entries (#50394)
* Remove duplicate Add to Cart Form block from Webpack entries

* Typo

* Add changelog file
2024-08-06 15:57:41 +02:00