Commit Graph

63923 Commits

Author SHA1 Message Date
Damián Suárez f51b93359f
CRUD: populates `items` and `itemsCount` when a new item is created (#47632)
* minor change in reducer

* use organizeItemsById to compute new items

* add reducer test with pick optimisticUrlParameters

* rename constant name

* add optimisticUrlParameters to CRUD actions types

* use organizeItemsById to generate store IDs

* add more reducer tests

* compute nextItemsData based on ids

* tessstssssss

* add a order_by: name test

* fix sorting data when url parameters

* add tests

* introduce filterDataByKeys helper fn

* fix process to sort items optimistically

* rollback wrong change in actions

* changelog

* set action `options` as optional

* set default value for options
2024-05-27 16:34:12 +01:00
Bart Kalisz 460d73eee0
Blocks E2E: Streamline E2E utils implementation (#47660) 2024-05-27 14:54:06 +00:00
Ilyas Foo 012f0d3418
Fix redundant confetti on LYS task congrats page (#47838)
* Add useRef to ensure confetti is only trigerred once

* Changelog
2024-05-27 21:01:40 +08:00
Luigi Teschio 977f8289af
Remove checkstyle.xml file (#47844)
* Remove checkstyle.xml file

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-27 12:16:52 +00:00
Barry Hughes 86c3f28c12
Defensive check to reduce error/warning noise when regenerating images. (#47785)
* Defensive check to reduce error/warning noise when regenerating images.

* Coding standards, remove trailing whitespace.
2024-05-27 10:35:08 +00:00
Atanas Penchev 02a0bba3f4
Slide animations always use CSS3 transitions instead of .animate() (#46564)
* Slide animations always use CSS3 transitions instead of .animate()

* Update plugins/woocommerce/client/legacy/js/flexslider/jquery.flexslider.js

Fix typo

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

* Changelog

* Newline

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

* Delete manual changelog

---------

Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-05-27 11:25:23 +02:00
Albert Juhé Lluveras ee656e1f0f
Fix two products being added to cart when Geolocate (with page caching support) was enabled and AJAX add to cart buttons disabled (#47761)
* Fix an issue that caused two products to be added to cart when Geolocate (with page caching support) was enabled and AJAX add to cart buttons disabled

* Add e2e test

* Add changelog file

* Move test to its own file

* Fix wrong default value in test reset
2024-05-27 09:54:22 +02:00
Karol Manijak 92fec889f7
Specify Product Price ancestor and simplify Product Elements ancestors (#47802)
* Extend product elements sharedConfig ancestor with Product Collection and Products (Beta)

* Utilise sharedConfig ancestor in Image block

* Utilise sharedConfig ancestor in Price block

* Utilise sharedConfig ancestor in Rating block

* Utilise sharedConfig ancestor in Sale Badge block

* Utilise sharedConfig ancestor in SKU block

* Utilise sharedConfig ancestor in Stock Indicator block

* Add changelog

* Bring back original ancestors for Summary and Title blocks

* Remove Product Price from a test as it's no longer available in global context
2024-05-27 09:15:32 +02:00
Chi-Hsuan Huang c70a09a57e
Fix core profiler extension installation track to use plugin track key for extension name (#47786)
* Update plugin installation error logger to use plugin track key for extension name

* Add changelog
2024-05-27 11:51:45 +08:00
Adrian Moldovan 97e7f86a15
Add the slack-test-report util (#47805)
* Add the slack-test-report util

* Error if the required GitHub context variables are not set

* Error if the required SLACK_CHANNEL env var is not set

* Use a more generic message to be able to report on jobs that are not tests, like build

* Add the alert-on-failure job in ci

* Run for pull_request to test the job

* Setup monorepo first

* Force a linting error

* Better logging

* Use inputs.trigger as report name if set

* Force an e2e test failure

* Set the commit message in the notification

* Use INPUT_TRIGGER for all notifications

* Revert test changes
2024-05-24 13:18:54 -07:00
Maikel Perez 55aafb9fc6
Remove the new old experience (#47814)
* Remove ProductTitle component

* Remove ProductSettings component

* Remove ProductMoreMenu component

* Remove ProductFormHeader component

* Remove ProductVariationFormHeader component

* Remove ProductFormFooter component

* Remove ProductFormLayout component

* Remove ProductForm component

* Remove ProductTourContainer component

* Remove AddProductPage component

* Remove ProductVariationForm component

* Remove EditProductPage component

* Remove ProductFormTab component

* Remove SingleImageField component

* Remove ProductVariationDetailsSection component

* Remove ProductVariationsSection component

* Remove DetailsSectionFills component

* Remove ImagesSectionFills component

* Remove ShippingSectionFills component

* Remove AttributesSectionFills component

* Remove PricingSectionFills component

* Remove InventorySectionFills component

* Remove product-form-fills file

* Remove product-form-variation-fills file

* Remove product-form-api-fills file

* Remove ClassicEditorIcon component

* Remove HiddenIcon component

* Remove VisibleIcon component

* Remove drag-and-drop.svg file

* Remove ProductSectionLayout component

* Remove products/constants.tsx file

* Remove new-product-management-experience feature flag

* Fix linter errors

* Add changelog files
2024-05-24 18:00:22 +00:00
Matt Sherman 660c550071
Product Editor: Set description properly if description consists only of a single non-paragraph block (#47763)
* Explicitly check whether the only block is a paragraph

* Update comment

* Move handling of empty block array into clearDescriptionIfEmpty

* Add areBlocksEmpty util function

* Check for empty block inside iframe editor

* Remove check for empty block from description block

* Add unit tests for areBlocksEmpty

* Changelog

* Update comment to clarify
2024-05-24 13:32:06 -04:00
Maikel Perez 4ddfd43864
Enhancement editor loading speed (#47425)
* Lazy load the PluginArea and the ModalEditor

* Remove repeated product request when editing a specific product

* Fix linter errors

* Add changelog files

* Fix linter errors

* Refactor the block editor to remove some extra rerenders

* Defer the publish button processing

* Defer the tab content render 500ms to reduce the total blocking time

* Fix linter errors

* Fix unit test and tabs unexpected rerender

* Fix linter errors

* Reduce the defered time to 300ms

* Fix get product url when the product has been duplicated since the new copy does not have permalink

* Fix the invalid unregistration of wc-admin-more-menu in the product page

* Fix compilation errors
2024-05-24 08:39:53 -04:00
Sam Seay 756bb8ccfa
Allow experimental blocks to be enabled WC Admin Features as part of removing WC_BLOCKS_PHASE (#47701) 2024-05-25 00:13:24 +12:00
79mplus Admin 4d44a6e891
Fixed shipping flat price change to free shipping when shipping cost represented using decimal separators and thousands separators (#46857)
* Fixed shipping flat price change to free shipping when shipping cost represented using decimal separators and thousands separators

* added the changelog file

---------

Co-authored-by: Saiful Islam <anandacsebd@gmail.com>
2024-05-24 13:59:56 +02:00
Paulo Arromba 86bc377977
Deprecated WC_Cart->is_coupon_emails_allowed in favour of static DiscountsUtil::is_coupon_emails_allowed (#47589)
* Deprecated WC_Cart->is_coupon_emails_allowed in favour of WC_Discounts->is_coupon_emails_allowed

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

* Created new DiscountsUtil class and moved is_coupon_emails_allowed()

* Refactored tests.

* Updated internal WC_Cart::is_coupon_emails_allowed calls and added a doing it wrong warning for 3rd party tracking.

* Linting.

* Refactored and added new asserts to DiscountsUtilTest.

* Linting.

* Linting and updated test.

* Added translation to wc_doing_it_wrong() as sugested.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-05-24 10:40:56 +01:00
Eason 11cb0dcf8f
Fix the issue that the React-powered admin routing page added after initialization could not be displayed (#47696)
* Fix the issue that the React-powered admin routing page added after initialization could not be displayed.

* Delay showing admin `NoMatch` to reduce the chance of flashing error message when route page is added after initialization.

* Add JS tests for the `NoMatch` page in the admin.

* Add changelog
2024-05-24 17:17:19 +08:00
Jonathan Lane 363757cbf1
Un-skip store search and core profiler tests (#47772)
Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-05-24 11:48:15 +03:00
Vishnu Gopal 7ca056051e
Fix activation limit for single license subscriptions on woocommerce.com (#47643)
* Fix activation limit for single license subscriptions on woocommerce.com

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

* Update plugins/woocommerce/includes/admin/helper/class-wc-helper.php

Add some defensive coding.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2024-05-23 20:24:10 -07:00
Chi-Hsuan Huang 433a0e19b2
Update coming soon banner text to use translation function (#47742)
* Update coming soon banner text to use translation function

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-24 02:51:07 +00:00
Jorge A. Torres 36fa4f82ed
Address responsiveness issues with order list table in admin (#47684)
Improve (HPOS) order admin list's responsiveness.
2024-05-23 13:24:03 -07:00
Veljko V d9bcf83bf0
Fix E2E shopper mini cart test (#47756)
Fix mini cart e2e test
2024-05-23 11:49:44 -07:00
Adrian Moldovan 48a2fccef0
[e2e tests] Configure snapshotPathTemplate (#47773) 2024-05-23 11:42:55 -07:00
Maikel Perez 7f6e73dcd3
Cannot create variation options when viewport width is small (#47766)
* Fix cannot create variation options when viewport width is small

* Add changelog file
2024-05-23 14:16:03 -04:00
Alexandre Lara 5d645d94e6
Product Gallery block: Fix error on revisiting template without reloading the page (#47636)
* Detect template ID from URL

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

* Add E2E test to check if block is displayed after revisiting Single Product template

* Fix E2E tests

* Fix E2E tests

* Fix lint error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-23 13:39:31 -03:00
Adrian Moldovan c97ef43812
[e2e tests] Only run the default project in daily e2e runs (#47771)
Only run default project in daily workflow
2024-05-23 09:38:20 -07:00
Adrian Moldovan 835625c329
Fix reporting step for daily e2e runs (#47764)
* Add condition on github.event_name for lint jobs

* Update a file to trigger a lint job

* Update condition to run only on pull_request

* Revert test change

* Always run the Slack notification step

* Add pull_request test trigger

* Update report step

* Remove branch filter

* Try with push event and branch filter

* Pass secrets to ci.yml

* Update testIgnore pattern for Gutenberg project

* Add changelog

* Remove the test push trigger

* One more test run

* Removed push test trigger
2024-05-23 09:12:10 -07:00
Adrian Moldovan f1489892aa
[ci] Only run lint jobs on pull_request event (#47652) 2024-05-23 07:16:07 -07:00
Matt Sherman fd85199f9a
Doc: Fix product editor block template lifecycle doc (#46767)
* Fix action names

* Add missing slash in endpoint URL

* Doc manifest
2024-05-23 07:48:39 -04:00
Karol Manijak c318bf50f8
Fix incompability of Query Pagination block with Product Collection (#47749)
* Amend Query Pagination parent OR ancestor array and include product collection

* Rename the function and amend comment

* Add changelog

* Remove some leftovers

* Tets if it's possible to insert multiple Pagination blocks in Product Collection

* Add awaits to expects

* Update plugins/woocommerce-blocks/assets/js/blocks/product-collection/utils.tsx

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>

* Add comment explaining the condition

---------

Co-authored-by: Manish Menaria <the.manish.menaria@gmail.com>
2024-05-23 13:01:57 +02:00
Bart Kalisz 3b328156a0
Blocks E2E: Cancel running jobs on new commits (#47753) 2024-05-23 11:51:06 +02:00
Seghir Nadir 34f8c65f53
only make order summary sticky when it's not longer than view (#47680)
* only sticky summary when it's not longer than view

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

* fix tests

* correctly check for height

* switch how to get top

* remove from editor

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 22:09:50 +00:00
Adrian Duffell 501272c51b
Add a catch-all return to LYS hub after user exits essential task (#47606)
* Add redirect to LYS on homescreen when lysTaskOpen is present

* Typos

* Fix lint issues

* Fix lint issues

* Add changelog

* Fix lint issues

* Fix lint issues

* Use isDashboardShown in effect

This required adding a check to ensure query is not an empty object

* Imporve the jankiness by moving catch-all logic to layout

* use an effect to set the session value to no

* lint

* lint

* Fix tests

* Try preventing redirects from WP menu click

* Revert "Try preventing redirects from WP menu click"

This reverts commit 8ef6dcf4dd.
2024-05-22 22:05:01 +00:00
Seghir Nadir 6c136e4e1a
normalize IDs for form fields in Checkout (#47650)
* normalize IDs for form fields and fix types

* update docs as well

* update rest of docs

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

* fix linting for document

* also align classnames

* revert to correct classname

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 22:54:03 +02:00
Fernando Marichal 0dc86cea9a
Fix width of the button to set the variation prices (#47682)
* Fix set variations price button width

* Add changelog

* Fix rebase deletion
2024-05-22 17:15:33 -03:00
Thomas Roberts e6bd07d465
Loop through each package to check if the chosen rate for it is valid (#47716)
* Loop through each package to check if the chosen rate for it is valid

* Add changelog
2024-05-22 21:55:31 +02:00
Matt Sherman 5e6bce3334
Product Editor: Fix deprecation warnings about toolbar items in modal block editor (#47527)
* Don't use NavigableToolbar for header

* Rename CSS styles for header

* Put document tools in NavigableToolbar

* Fix alignment of inserter button

* Switch non-toolbar items to regular buttons

* Remove unused const

* Use same CSS styling as core for document tools

* Clean up errant change while rebasing

* Changelog
2024-05-22 15:37:17 -04:00
Veljko V b32b7049c7
Fix flaky E2E admin marketing and loading screen tests (#47665)
* Fix flaky admin marketing test

* Fix flaky loading screen test
2024-05-22 11:06:52 -07:00
Adrian Moldovan 13ab9007f6
[testing workflows] Add workflow_call trigger in CI workflow - support daily and other types of runs (#47612)
* Add workflow_call event

* Add tests-daily-run.yml

* Remove workflow version

* Update input value

* Remove secrets from caller workflow

* Rename job

* Check context

* Check context

* Check workflow_call inputs

* Override github.event_name with inputs.trigger

* Fix input name

* Add config for daily e2e tests with Gutenberg

* Update env commands for Gutenberg run

* Add disableHpos env variable in ci-utils

* Revert the trigger to push

* Revert the env variable setting in ci-jobs

* Revert the env variable setting in ci-jobs

* Rebuild utils

* Update test env start command

* Define the Gutenberg Playwright project

* Use path relative to workspace root

* Update events for test projects

* Update events for test projects

* Add changelogs

* Remove the e2e tests with Gutenberg tests from daily runs

* Set the schedule and workflow_dispatch triggers

* Add --project default flag to only run the default tests in CI

* Renamed snapshots to match the new Playwright project name
2024-05-22 11:04:44 -07:00
Seghir Nadir d2ac6ff953
Correctly attribute focus back when opening the mini cart several times (#47683)
* allow focusedOnMount element to be reset

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-22 17:03:22 +02:00
Ilyas Foo 8140a1d9c7
Fix payment task track only shown gateways (#47713)
* Fix to track only shown payment options

* Remove offline gateways and changelog
2024-05-22 22:36:12 +08:00
Thomas Roberts b7643b9b7a
Change Checkout form step numbering so it can only be toggled for all blocks, not individually per-step (#47479) 2024-05-22 07:03:48 -07:00
Adrian Moldovan 0522511a72
[testing worklflows] Consolidate the Slack channel used for test reports (#47611) 2024-05-22 11:01:51 -03:00
Thomas Roberts 845bdae5bd
Prevent Additional Checkout Fields values being shown on shortcode order confirmation (#47333) 2024-05-22 06:07:16 -07:00
Matt Sherman 8c47cfd247
Product Editor: Fix modal block editor undo granularity (#47524)
* Rename appendEdit function to appendToEditorHistory

* Don't append to editor history onInput

* Changelog

* Move onChange and onInput handles to named functions

* Debounce appendEdit

* Change undo and redo to useCallback

* Update debounce time to feel closer to post editor

* Move debounce of appendEdit into useEditorHistory

* Make sure debounced appendEdit is flushed before undo/redo

* Remove console.log() statement
2024-05-22 09:07:04 -04:00
Adrian Duffell da57287c56
Fix broken db update button on homescreen (#47608)
* Add handling of return url

* Use base admin URL and redirect to current page

* Update plugins/woocommerce/includes/admin/notes/class-wc-notes-run-db-update.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce/includes/class-wc-install.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Changelog

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-05-22 20:09:47 +08:00
Justin Palmer 544c843b67
Add order attribution GA4 UTM parameters (#47639) 2024-05-22 13:59:50 +02:00
Maikel Perez bdf2ed170d
Simplify the product images empty state (#47663)
* Simplify the product images empty state

* Add changelog file
2024-05-22 08:36:22 -03:00
Chi-Hsuan Huang ee6f69a14e
Wrap private link exclusion logic in `woocommerce_private_link` option check (#47690) 2024-05-22 19:15:37 +08:00
Karol Manijak f55e25b009
Filter by Attribute: fix potential reading property of undefined error (#47699)
* Fix reading from undefined error in attribute-filter

* Add changelog
2024-05-22 11:57:53 +02:00