Commit Graph

2075 Commits

Author SHA1 Message Date
Wacław Jacek 00f7420f81
Don't recommend WCS&T in tax task if WCShip or WCTax is active (#48699) 2024-06-25 14:23:07 +02:00
Gabriel Manussakis 525cd4f946
[Accessibility] Fix typo in upateItemErrorRequestId function name (#48702)
* Fix typo in upateItemErrorRequestId function name

* Add changelog file
2024-06-25 16:54:46 +08:00
Nathan Silveira 51f3807c2a
Add buttonProps to MediaUploader (#48639)
* Add buttonProps to MediaUploader

* Add storybook story to show new functionality

* Move buttonProps to last position of spread
2024-06-21 14:32:35 -03:00
Gabriel Manussakis 532f1beb02
[Accessibility] Fix misspelling in inline documentation in packages/js/* (#48640)
* Fix "colleciton" typo

* Fix "fomatting" typo

* Fix "elments" typo

* Fix "actuall" typo

* Fix "witth" typo

* Fix "varation" typo

* Fix "procesing" typo

* Fix "neigbouring" typo

* Fix "staticly" typo

* Fix "Curreny" typo

* Fix "addd" typo

* Fix "accessibile" typo

* Fix "avaiable" typo

* Fix "Resurce" typo

* Fix "curent" typo

* Fix "flakyness" typo

* Fix "flakyness" typo

* Fix "Shiping" typo

* Fix "specfically" and "Shiping" typos

* Fix "flakyness" typo

* Fix "avaliable" typo

* Fix "availble" typo

* Fix "oject" typo

* Fix "explict" typo

* Fix "sumary" typo

* Fix "whn" typo

* Fix "normaly" typo

* Add changelog files
2024-06-21 10:28:54 -07:00
Gabriel Manussakis 0bdb1a3bdd
[Accessibilite] Fix typo in packages/js/admin-e2e-tests/ test (#48642)
* Fix "fullfilled" typo

* Add changefile(s) from automation for the following project(s): @woocommerce/admin-e2e-tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-06-21 10:02:08 -07:00
Nathan Silveira 8b8b0a6a2e
Add data from the template to the product when it is selected (#48681)
* Add data from the template to the product when it is selected via URL query parameter

* Remove unused hook

* add ts-ignore
2024-06-21 09:58:43 -03:00
Gabriel Manussakis ee2a545dce
[Accessibility] Fix typos in packages/js/**/*.md files (#48569)
* Fix "dowloaded" typo

* Fix "Lifecyle" typo

* Fix "elments" typo

* Fix "confguration" typo

* Fix "curent" typo

* Fix "overriden" typo

* Fix "searchs" typo

* Fix "ot" typo

* Fix "oject" typo

* Add changelog files
2024-06-20 13:04:24 -07:00
Damián Suárez 7be79ffcd4
Product Editor: set the Items Query consistently for all selects/actions (#48672)
* ensure to use the same Items query

* changelog
2024-06-20 17:08:17 +01:00
Nathan Silveira e5fafb455e
Add product-toggle-field documentation (#48636) 2024-06-20 10:23:03 -03:00
Chi-Hsuan Huang 76171ea32f
Use `hasConnectedOwner` value instead to check if Jetpack is connected (#48609)
Use hasConnectedOwner value instead to check if Jetpack is connected
2024-06-19 13:04:50 -07:00
Damián Suárez 919da85da4
Product Editor: Increase the number of terms to 100 per request (#48616)
* increase items per page to 100. Initially show 20

* changelog
2024-06-19 17:56:50 +01:00
Damián Suárez caaf214b1a
Product Editor: show and locate help for the attribute terms component (#48600)
* show and locate the terms help

* changelog

* hide the term help once the user adds a new one

* fix typo

* always show helps for Attribute & Terms
2024-06-19 17:31:19 +01:00
Nathan Silveira e0a35960d2
Add template URL parameter to allow choosing template directly (#48573) 2024-06-19 10:08:53 -03:00
Moon f95d8b240b
Detect cache when launching store (#48586)
* Remove duplicate

* Add is-coming-soon-page endpoint

* Render invalid cache warning

* Use meta tag instead

* Add url for debug purpose

* Use a different copy for the congrats page when the cache is still shown

* Clean up unused codes

* Guard the api with permission

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

* Reuse $is_fse_theme

* Lint fixes

* Update 48586-update-48516-detect-cache-when-launching-store

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

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

* Update plugins/woocommerce/changelog/48586-update-48516-detect-cache-when-launching-store

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

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

* changed to js method

* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce

* empty commit to trigger CI

* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce

* empty commit to trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2024-06-19 18:23:29 +08:00
Chi-Hsuan Huang 0e1ae1717d
CES: Move allow tracking option call into addCustomerEffortScoreExitPageListener (#48306)
* Move fetching CES tracking logic in listener function

* Add changelog

* Remove cache
2024-06-19 08:47:05 +08:00
Damián Suárez 0cff4eba50
Product Block Editor: populate attribute options optimistically (#47618)
* show terms optimistically

* define values as TokenItem array

* introduce TokenItem type

* add token animation when adding

* terms could be undefined

* remove unused action

* changelog

* minor doc enhancements

* rename consts

* simplify items selector

* clean the temporary items, one by one

* do not pass selectedTerms when adding a new one

* pull and update form terms when creating new ones

* fix typo

* do not export TokenItem type

* rename and tweak jsdoc

* skip E2E test
2024-06-18 22:06:11 +01:00
github-actions[bot] efb7f6adda
Prepare Packages for Release (#48499)
* Automated change: Prep @woocommerce/extend-cart-checkout-block for release.

* Re-add removed items from changelog with updated prefixes

---------

Co-authored-by: opr <opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2024-06-17 10:51:29 +01:00
Chi-Hsuan Huang 4162a6ef89
Wrap activity panels in error boundary (#48415)
* Fix review error type

* Add changelog

* Rename global error-boundary class to avoid conflict

* Rename global error-boundary class to avoid conflict

* Wrap panels in error boundary

* Remove console

* Reformat

* Fix test

* Fix test

* Add changelog
2024-06-17 13:05:11 +08:00
Matt Sherman a5893ac066
Product Editor: Respect system setting for maximum upload file size for Images and Downloads (#48399)
* Move productBlockEditorSettings type to global.d.ts

* Set maxUploadFileSize to system settings

* Changelog

* Add maxUploadFileSize to test

* Set maxUploadFileSize for downloads

* Set maxUploadFileSize for variation image quick action

* Remove unused EditDownloadsModal props

* Fix typo in EditDownloadsModal prop

* Remove unused EditDownloadsModalProps prop

* Remove unused function

* Show specific error message when upload of download file fails

* Show error notice when upload fails for variation image quick action

* Set maxUploadFileSize for download files menu item

* Close downloads menu on error

* Fix up types to avoid duplicate definitions

* Show specific link error
2024-06-14 13:36:31 -04:00
Thomas Roberts 5c70064a85
Update `@woocommerce/extend-cart-checkout-block` package to add Additional Checkout Fields examples (#48280) 2024-06-14 16:01:13 +01:00
Maikel Perez caa7c8707b
Enable pricing inline actions in the variations table (#48164)
* Create VariationPricingForm component

* Add validations to the VariationPricingForm component

* Add changelog file
2024-06-13 14:41:15 -04:00
Fernando Marichal c696b1b5d9
Do not dismiss the error snackbar automatically (#48192)
* Modify Publish button error snackbar

* Modify Preview snackbar and error handling

* Modify Save draft snackbar error handling

* Modify publish button menu error handling

* Modify change product type error handling

* Fix getProductErrorMessageAndProps return types

* Remove getProductErrorMessage

* Rename get-product-error-message file

* Fix tests

* Add changelog

* Fix e2e test

* Add WC changelog

* Improve getProductErrorMessageAndProps

* Fix Variable product

* Remove productType from error object

* Remove productType from errorHandler

* Remove postType from block

* Remove visibleTab
2024-06-13 13:56:26 -03:00
Maikel Perez 68107ba8a3
Enable manage stock inline actions in the variations table (#48239)
* Create VariationStockStatusForm component

* Integrate VariationStockStatusForm within the VariationsTableRow component

* Add woocommerce_manage_stock option to the default_option_permissions list in the Options rest controller

* Enable track inventory when woocommerce_manage_stock is set to yes

* Add stock_status radio component to the VariationStockStatusForm component

* Fix VariationStockStatusForm padding

* Fix control spacing

* Add stock_quantity to the VariationStockStatusForm component

* Add changelog files

* Fix linter errors

* Fix invalid sortable state in the variations table
2024-06-13 12:08:52 -04:00
Damián Suárez 6328ffdfb2
Product Form Template: populate the template selector control with the PFTs (#48327)
* switch setting templates order

* pull product_form from the entity store

* fix typo

* set post excerpt with template description

* update the description for the Simple template

* rename type for product form post

* introduce isProductFormTemplateEnabled() helper

* render the PFTs into the templates selector

* changelog

* tscripting

* remopve dropdown

* re-write changelog files

* change and rename isProductFormTemplateSystemEnabled

* remove unused component

* try change the template version name
2024-06-13 13:55:07 +01:00
Chi-Hsuan Huang 54321a5a60
Add generic error boundary component (#48363)
* Fix storybook

* Add experimental error boundary component

* Add error boundary component

* Fix empty content button

* Add changelog

* Fix storybook

* Reset state after actioned

* Fix story

* Address feedback
2024-06-13 05:05:28 +00:00
Chi-Hsuan Huang ab1789afd2
Remove onboarding welcome modals (#48346) 2024-06-13 10:39:21 +08:00
Matt Sherman 8a69728312
Product Editor: Show error notice when error occurs uploading an image via drop on Images (#48396)
* Export MediaUploaderErrorCallback

* Show notice when error uploading image

* Changelog

* Changelog

* Wrap error message in __ for translation

* Fix sprintf/__ usage to avoid lint errors
2024-06-12 15:50:48 -04:00
github-actions[bot] 10bad90c6f
Prepare Packages for Release (#48411)
Automated change: Prep @woocommerce/csv-export for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:59:46 -07:00
github-actions[bot] 1d3c34eacd
Prepare Packages for Release (#48410)
Automated change: Prep @woocommerce/currency for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:55:38 -07:00
github-actions[bot] d88e877eea
Prepare Packages for Release (#48409)
Automated change: Prep @woocommerce/customer-effort-score for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:49:59 -07:00
Maikel Perez e3e303e776
Enable image inline actions in the variations table (#48083)
* Create UploadFilesMenuItem component

* Create MediaLibraryMenuItem component

* Create ImageActionsMenu component

* Integrate ImageActionsMenu with VariationsTableRow

* Add extensibility to the ImageActionsMenu component

* Add changelog file

* Fix compilation errors

* Fix linter errors

* Allow images only to be uploaded from the UploadFilesMenuItem component

* Fix image aligment in the actions menu toggle
2024-06-11 22:42:02 +00:00
github-actions[bot] 31254c4d45
Prepare Packages for Release (#48408)
Automated change: Prep @woocommerce/date for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:41:49 -07:00
github-actions[bot] d2ea42a658
Prepare Packages for Release (#48407)
Automated change: Prep @woocommerce/data for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:37:33 -07:00
github-actions[bot] 35609532b0
Prepare Packages for Release (#48406)
Automated change: Prep @woocommerce/eslint-plugin for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:31:03 -07:00
github-actions[bot] 4c42a8d914
Prepare Packages for Release (#48405)
Automated change: Prep @woocommerce/tracks for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:29:16 -07:00
github-actions[bot] 594d466ece
Prepare Packages for Release (#48404)
Automated change: Prep @woocommerce/navigation for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:26:38 -07:00
github-actions[bot] 1504add942
Prepare Packages for Release (#48403)
Automated change: Prep @woocommerce/number for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 15:10:48 -07:00
github-actions[bot] c3fffc28bf
Prepare Packages for Release (#48402)
Automated change: Prep @woocommerce/explat for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-06-11 22:03:35 +00:00
Chi-Hsuan Huang 50d6d0a9c5
Fix getOption() not catch error properly (#48246)
* Improve batch fetching of options error handling and code

* Add changelog

* Catch promise error

* Catch options fetch error

* Fix lint

* Use debounce fetch

* Change debounce wait time to 100ms

* Fix debounce
2024-06-11 13:44:51 +08:00
Ilyas Foo 0d461fa6e7
Add unit tests for some tracks in product editor (#48245)
* Add tests for ProductPage

* Add tests for ProductVariationPage

* Add test for product_tab_click event

* Add test for product_editor_feedback_bar_turnoff_editor_click event

* Add test for product_dropdown_option_click event

* Add test for product_add_view track

* Changelogs

* Changelog

* Lint

* Add product_edit_view test and falsey test

* Fix test name
2024-06-10 23:05:20 +08:00
Nathan Silveira b8a6966ca6
Only run layout effect after product is resolved (#48281)
* Only run layout effect after product is resolved

* Fix edit variable product test

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-07 20:49:47 +00:00
Maikel Perez 3d0b9993be
Product template not updating in the UI when it is changed (#48288)
* Fix Product template not updating in the UI when it is changed

* Add changelog file
2024-06-07 20:00:15 +00:00
Nathan Silveira 442adcc395
Determine _product_template_id from WP filter (#47762)
* Remove template matching from front-end

* Create 'woocommerce_rest_get_product' filter to allow extensions to change the product when it's fetched through the REST API

* Stop defaulting to 'standard-product-template' product template and handle defaults only in getLayoutTemplateId function

* Use created hook to determine and persist the product template ID when it's not defined.

Also introduce 'match_fn' in ProductTemplate to allow extensions to provide robust ways of matching the template

* Add changelog

* Fix tests

* Remove outdated tests

* Fix issue in filter because $product can be false and move API change to v3

* Add comments to continue statements

* Small refactor

* Only send layout template id to useLayoutTemplate after product is loaded

* Revert front-end changes

* Remove match_fn and create filter to allow extensions to determine the product template id

* Avoid loading layout template before product is loaded

* Create woocommerce_product_editor_determine_product_template filter and use it

* Update changelogs and remove unused code

* Remove _product_template_id for products that were created with the new product editor.

* Use only id to find productTemplate

* Turn hook into experimental

* Remove deprecated tests

* Rename filter

* Add more typings to useEntityRecord

* Use hasResolved boolean to check whether product has been resolved

* Add changelog

* Add 'variation' to ProductType

* Don't default to the standard-product-template for variations

* Update changelog

* Accept null in getLayoutTemplateId

* Fix edit variable product test

* Rename hook

* Revert changed logic to avoid regressions

* Increment useProductTemplate logic

* Default to standard-product-template instead of undefined when no matches

* Re-import Features class

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-06-07 19:48:20 +00:00
Damián Suárez a5bbf14e6f
PFT: retrieve and render the product form templates (#48206)
* introduce ProductFormTemplateProps type

* pull and set the default product form template

* render the PFT when it exists

* render a temporeary form templates selector

* changelog

* rollback TS global changes

* fix typo
2024-06-07 17:14:01 +01:00
Nathan Silveira cf2572bc32
Fix tabs overflowing when viewport is small (#48193) 2024-06-07 12:48:46 -03:00
Fernando Marichal f0feb62837
Override product name height and font-size (#47979)
* Override name field height and font

* Add changelog

* Update packages/js/product-editor/src/blocks/product-fields/name/editor.scss

Co-authored-by: Maikel Perez <maikel.perez@automattic.com>

* Fix styles

---------

Co-authored-by: Maikel Perez <maikel.perez@automattic.com>
2024-06-04 16:40:03 -03:00
Damián Suárez 63a2788527
Product Block Editor: improve a11y when creating a new Shipping class (#47995)
* focus description when generating slug

* focus the name once the modal renders

* changelog

* do not focus on description field

* isSecondary is depcreated. use "variant" prop

* move changelog file
2024-06-04 10:12:08 +01:00
Matt Sherman 1386fa2df2
Product Editor: Remove Add Sizes and Add Colors buttons from Variations tab (#48114)
* Temporarily remove Add Sizes and Add Colors buttons until they are fixed

* Changelog
2024-06-03 12:23:01 -04:00
Maikel Perez a0f9d159e5
New image empty state for variations (#47909)
* Fix the variations image block placeholder to show only one image

* Add changelog file
2024-05-31 11:14:33 -03:00
Damián Suárez ac6fe9f933
Product Block Editor: populate shipping class slug automatically (#47896)
* extend shipping_classses with '/suggest-slug' endpoint

* generate slug automatically

* changelog

* jsdoc

* polish setting and pulling the slug

* replace checkbox by button

* reword slug inout label with "Slug"

* add slug help

* use prefix input property

* isPrimary is deprecated. Use "variant" instead

* fixing typo. props to @mdperez86
2024-05-30 12:05:34 +01:00