Commit Graph

2183 Commits

Author SHA1 Message Date
Maikel Perez dc2c2eda8e
[Product Editor] Attribute create term failed request causes unlimited loading state (#50093)
* Fix unhandled promise rejection when creating an attribute term and the create request fails

* Add changelog file

* Fix linter error

* Fix compilation error
2024-07-30 09:59:10 -03:00
Nathan Silveira 71b865fa63
Add abbreviations for fields GTIN, UPC, EAN, or ISBN (#50042)
* Add abbreviations for fields GTIN, UPC, EAN, OR ISBN

* Add translators comments
2024-07-30 09:51:29 -03:00
Vladimir Reznichenko 07a71106dc
Monorepo: actualize loaders paths filtering for better Webpack performance. (#49714) 2024-07-29 15:20:17 +02:00
github-actions[bot] a8b560a03f
Prepare Packages for Release (#50073)
* Automated change: Prep @woocommerce/onboarding for release.

---------

Co-authored-by: mordeth <mordeth@users.noreply.github.com>
Co-authored-by: mordeth <cvetan.cvetanov@automattic.com>
2024-07-29 16:18:37 +03:00
Gabriel Manussakis 928271b427
[Accessibility ]Fix typos in experimental select control test (#48643)
* Fix "begining" and "fullfiled" typos

* Add changelog file
2024-07-29 03:16:01 +00:00
Gabriel Manussakis b2a822d44d
[Accessibility] Fix typo in Find Country Option test (#48648)
* Fix "comparsion" typo

* Add changelog file
2024-07-29 11:06:24 +08:00
Gabriel Manussakis c7003646ce
[Accessibility] Fix typos in packages/js/ resolvers error messages (#48646)
* Fix "retriving" typo

* Add changelog file
2024-07-29 11:05:55 +08:00
github-actions[bot] fe85d2b1ab
Prepare Packages for Release (#50000)
Automated change: Prep @woocommerce/experimental for release.

Co-authored-by: lanej0 <lanej0@users.noreply.github.com>
2024-07-25 14:54:32 -07:00
Jonathan Lane d6fad9f6d5
Add changelogs to trigger version bumps in packages (#48645)
* Add changelogs to trigger version bumps in packages

* Don’t update already updated packages

* Don’t update other packages

* extend-cart-checkout-block has been released

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>
2024-07-25 13:57:30 -07:00
Fernando Marichal 4e368a1b67
Add readme for validations (#49723)
* Add readme for validators

* Add changelog

* Add docs manifest

* Fix product-editor.md

* Fix readme
2024-07-24 13:02:02 -03:00
Maikel Perez 4689a09ec3
Create combobox-control (#49691)
* Create combobox-control

* Exporting the combobox control

* Integrate the combobox control into the custom field names component

* Remove some non needed styles

* Add changelog file

* Fix comment text typo

Co-authored-by: louwie17 <lourensschep@gmail.com>

* Fix linter errors

---------

Co-authored-by: louwie17 <lourensschep@gmail.com>
2024-07-24 11:13:24 -04:00
Miguel Pérez Pellicer dd8f9686fb
Rename Google Listings and Ads with Google for WooCommerce (#47614)
* Rename Google Listings and Ads with Google for WooCommerce

* Revert change regarding changelog

* Add changelogs

* Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce

* Lint

* Lint

* Lint

* Rename Google Listings and Ads with Google for WooCommerce

* Lint

* Lint

* Tweak updated tests

* Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce

* Lint

* Fix flaky tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-22 18:59:43 +04:00
Vladimir Reznichenko 46f952eeb5
Monorepo: enable babel-loader and Jest caching (inc. CI) (#49656)
In this PR, we are consolidating babel-loader caching and adding Jest caching, improving build/testing times locally and in CI. The improvement comes from cache covering transpile steps in the mentioned processes.
2024-07-19 09:40:01 +02:00
Nathan Silveira 98a0e96bc9
Product Editor: Modal block editor (description) small viewport (mobile) support (#49611)
* Add media query rules for mobile and fix rule for .block-editor-list-view-tree

* Add missing translation call

* Add small screen title to show product name on mobile

* Add changelog

* Add media-query for inserter-sidebar

* Close inserter when is mobile viewport
2024-07-17 16:41:26 -03:00
Nathan Silveira f2a4db4280
Fix missing onEscape handle in SelectTree (#49396)
* Fix missing onEscape handle in SelectTree

* Avoid passing onEscape to html element

* Propagate onEscape for recursive Tree
2024-07-17 10:12:13 -03:00
Nathan Silveira 7335645b70
SelectTree: allow navigation between items and input using tab and arrow keys (#49251)
* Hide help text in create-taxonomy-modal

* Expose onKeyDown and onBlur events in SelectedItems

* Increment isEventOutside function to consider remove button tags as well

* Add label to remove all button

* Handle navigation between added items and input using tab and arrow keys

* Add changelogs

* Prevent unwanted scroll

* Revert change in product editor and fix issue in component itself

* Change onKeyDown and onBlur to optional

* Move tags navigation to selectedItems and create lastRemoveButtonRef to avoid long CSS query

* Small refactor

* use useImperativeHandle hook in SelectedItems to abstract focusing on last remove button
2024-07-16 16:26:29 -03:00
Nathan Silveira eb2b3da95b
Adjust spacings for variations table notice (#49561) 2024-07-16 16:02:55 -03:00
Cvetan Cvetanov 54dd7a621a
Add new shared payment methods logos component (#49300)
* Add WooPaymentMethodsLogos component

---------

Co-authored-by: Anurag Bhandari <anurag.bhd@gmail.com>
2024-07-16 17:42:52 +03:00
Nathan Silveira 4dbe1c96e7
Prevent high numbers from breaking currency inputs (#49489) 2024-07-16 10:22:44 -03:00
Nathan Silveira af571585b6
Hide variation related notices when product type is not variable (#49400)
* Hide variation related notices when product type is not variable

* Revert "Hide variation related notices when product type is not variable"

This reverts commit 66a67b6ada.

* Hide variation related notices when product type is not variable
2024-07-15 16:38:14 -03:00
Fernando Marichal 67ecc95633
Add reference to number control (#49357)
* Add ref to NumberControl

* Add identifier

# Conflicts:
#	packages/js/product-editor/src/hooks/use-error-handler.ts

* Remove console.log

* Add changelog

* Stop using setTimeout and use mutation observer to check if the tab is visible before focusing field

* Rename prop

* Refactor number-control functions

* Fix lint

* resetIncrement funciton

---------

Co-authored-by: Nathan Schneider <nsschneider1@gmail.com>
2024-07-15 15:49:19 -03:00
Fernando Marichal 6bc551c71b
Add tests for snackbar error handling hooks (#49498)
* Add tests for use-error-handler

* Add tests for useBlocksHelper

* Add changelog
2024-07-15 15:01:24 -03:00
Fernando Marichal a9de74df6f
Add link into the error snackbar (#49246)
* Add link to snack bar

# Conflicts:
#	packages/js/product-editor/src/hooks/use-product-manager/use-product-manager.ts

# Conflicts:
#	packages/js/product-editor/src/contexts/validation-context/validation-provider.tsx

* Fix variations

* Add useBlocksHelper

* Remove old tests

* Remove timeout

* Fix typo

* Fix errors

* Add changelog
2024-07-15 11:00:40 -03:00
Fernando Marichal 64ce7bd732
Add context to errors (#49242)
* Add context to errors

* Add changelog

* Fix product manager hook

* Add useBlocksHelper

# Conflicts:
#	packages/js/product-editor/src/blocks/product-fields/shipping-dimensions/edit.tsx

* Send clientId as context

* Add validatorId when validating

* Small refactor errorHandler

* Improve method
2024-07-13 10:39:13 -03:00
Vladimir Reznichenko 4311640de2
Monorepo: caching deps per target package in GH actions (#49020)
In this PR, we are implementing per-package build and caching, which optimizes build and fetching cached dependencies times across our workflows.
2024-07-10 14:39:49 +02:00
github-actions[bot] de9664f922
Prepare Packages for Release (#49334)
Co-authored-by: opr <opr@users.noreply.github.com>
2024-07-10 12:34:32 +01:00
Thomas Roberts b94fd1127d
Register block in PHP and Add default opt in text when saving example block in `@woocommerce/extend-cart-checkout-block` (#48581) 2024-07-10 12:07:02 +01:00
Matt Sherman ff9656840d
Product Editor: Fix crash and issues with variations (that will cause problems with React 18) (#49248)
* Only request layout template when have an id

* Add setAttributes to useEffect dependency array

* Add ErrorBoundary around Tab inner blocks

* Style Tab ErrorBoundary

* Fix CSS specificity for .woocommerce-attribute-list-item styles

* Remove test CSS

* Add specific error boundary message

* Use variable for error boundary margin

* Changelog

* Tweak error message

* Changelog

* Tweak console error log message
2024-07-09 10:44:41 -04:00
Nathan Silveira fbf464be51
Add improvements to NumberControl, using it in Shipping dimensions and manage download limits (#49205)
* Add inputMode decimal to regular price and sale price fields and useNumberInputProps

* Change min and max numbers for NumberControl

* Allow typing minus in number

* Fix number control CSS issues in modals

* Allow providing elements as label and add onFocus handler

* Migrate manage downloads limits modal to NumberControl

* Migrate shipping dimension fields to NumberControl

* Add changelog

* Avoid passing NaN to onChange

* Move limits to individual fields

* Update max limits and add underscores for readability
2024-07-09 10:51:21 -03:00
Gabriel Manussakis da0036c12b
[Accessibility] Fix typo in remote specs validation doc (#49207)
* Fix "everyting" typo

* Add changelog file
2024-07-08 15:46:55 -03:00
Maikel Perez d849155c59
Change the custom field name component to be an autocomplete (#48949)
* Moving to a Combobox

* Create CustomFieldNameControl component

* Fix combobox styles

* Change Combobox to behave as an Autocomplete

* Integrate CustomFieldNameControl within the CustomFieldCreateModal

* Fix the ref type from CustomFieldNameControl

* Integrate CustomFieldNameControl within CustomFieldEditModal

* Fix CustomFieldNameControl default/focus border style

* Fix custom field value control height to be 36px like other controls

* Add changelog file

* Fix linter errors

* Add ->esc_like to the search criteria when searching for a product custom field name

* Add changelog file

* Add comments explaining why the implamentation was made that way

* Remove non existing classname

* Fix wrong border color when the field is invalid and focused

* Fix linter errors

* Hide props from the internal input element

* Rename comboboxRef with inputElementRef

* Fix invalid empty value when the combobox has a selected value
2024-07-08 09:14:36 -04:00
Vladimir Reznichenko 68532ce433
CI: update linting jobs to skip build step (#49193)
In this PR, we introduce changes to linting and PHPUnit jobs in order to speed them up: skip or minimize the build step.
2024-07-08 08:39:39 +02:00
Nathan Silveira e62f28b3ca
Allow selecting categories through keyboard (#49049)
* Remove portal and use inline popup

* Allow selecting existing values through , or ENTER

* Add help to taxonomy block

* Provide help attribute to taxonomy block

* Add changelogs

* Remove help text

* Add help text and a11y instructions

* Try to fix unit test

* Add changelog

* Fix E2E test

* Allow navigating up from first list item into the input

* Add scenario for single selection as well
2024-07-05 14:20:28 -03:00
Joshua T Flowers 1c8698c684
Prevent product editor styles loading on non wc-admin pages (#49170)
* Only load product editor styles on WC admin pages

* Manually load interface styles to exclude fullscreen styles

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-07-04 14:17:14 -07:00
Fernando Marichal 914348d887
Add clear button to `Categories` dropdown (#49036)
* Add clear button to Categories dropdown

* Add changelog

* Add component changelog

* Fix button styles

* Rename methods and prop
2024-07-04 13:35:57 -03:00
Nathan Silveira 96739fd6fd
Allow returning to input on selectTree when pressing escape (#49106)
* Allow returning to input on selectTree when pressing escape

* Call onEscape in single mode as well

* Close the menu on escape

* Extract handleEscapePress function
2024-07-04 14:00:32 +00:00
Matt Sherman d66e1a2438
Product Editor: Fix tab switching when variations are generated (#49058)
* Remove selected tab state from Tabs, handle via props

* Pass selected tab via props to Header

* Fix Tabs unit tests

* Remove unused imports

* Changelog
2024-07-04 09:58:26 -04:00
Nathan Silveira ac915f6905
Use default cursor for everything in select and tree components (#49048) 2024-07-04 10:14:32 -03:00
Nathan Silveira 85cedf2d2b
Add unique_id field to product (#47364)
* Add unique_id field to product

* Fix documentation

* Fix wrong comment

* Update description

* Add unique_id for variations

* Update lint

* Update tests

* Add changelog

* Update variations unit test

* Add unique_id to wc_product_meta_lookup

* Add unique_id methods to cpt interface

* Add new methods for unique_id and add it to lookup table

* Add unique_id functions to product functions

* Throw error when unique_id is duplicated

* Handle error message for unique_id on the front-end

* Add changelog

* Rename unique_id description in REST API

* Fix lint issues

* Add unique_id tracking for product publish

* Rename to 'global_unique_id'

* Fix lint

* Fix lint

* Bump documentation version

* Update controller description of fields
2024-07-03 11:45:48 -03:00
Nathan Silveira 51d9baa74e
Change Tooltip component to render Popover as inline (#48986)
* Show Popover as inline

* Adjust CSS regressions from changing popover to inline

* Change Tooltip component to render Popover as inline
2024-07-02 16:05:13 -03:00
Joel Thiessen 0d4b177b22
Fixing incorrect case causing erorrs with case-sensitive environments (#48992)
* Fixing incorrect case causing erorrs with case-sensitive environments

* Adding changelog
2024-07-02 07:36:41 -07:00
Damián Suárez fae23f0906
Product Editor: disable Add button when no terms or options when creating variations (#48928)
* fix doc. improve doc

* disabe `Add` button when not terms nor options

* variant="primary" > isPrimary

* move helpers to utils file. improve jsdoc

* add tests for hasTermsOrOptions helper

* add isAttributeFilledOut unit tests

* changelog

* allow any type in unit tests

* show a toolip with not possible to add attributes

* fix wrong inline code comment

* expect the Add button is initially disabled

* check the `Add attributes` button is enabled

* changelog

* remove obvios jsdoc

* check all terms are accepted

* minor changes

* update tests

* remove console.log to dev purpose

* improve E2E testing remviing attr row
2024-07-02 08:30:24 -03:00
louwie17 dee838e5f9
Fix product editor block template dependency conflict (#48922)
* Add ajv-keywords dependency to fix version conflct

* Add changelog
2024-07-02 04:55:37 -03:00
Nathan Silveira ce602fa8f4
Fix crash when switching between product variations (#48988) 2024-07-01 20:14:50 -04:00
Maikel Perez 38d4a97536
Variations inline editing - add Tracks (#48870)
* Add a new event called wcadmin_product_variations_inline_select that fires when the user selects one of the inline options

* Add a new event prop called updated_options to wcadmin_product_variations_change to identify the options updated by the user

* Add changelog file
2024-06-30 18:16:04 -03:00
Damián Suárez ebd95f8187
Product Editor: document WooProductMoreMenuItem slotFill component (#48759)
* first version of the WooProductMoreMenuItem doc page

* changelog

* fix md issue

* move doc file to the proper location
2024-06-28 09:06:54 +01:00
Damián Suárez ce81de95a9
Product Editor: fix issue when trying to create same terms with different cases (#48627)
* prevent creating duplicated items with different cases

* changelog

* allow terms with same name for local attributes

* fix wrong const name to identy local attributes

* use more complext terms for E2E test

* encode URL to pass E2E test

* split E2E when creating new terms

* introduce `slug` property to TokenItem

* rename terms with globalAttributeTerms

* jsdoc

* minor test name change

* changelog
2024-06-27 09:50:27 +01:00
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
RJ c74015c5cb
add/shipstation global copy (#48549)
* add: updated shipstation copy to reflect global presence

* changelogs
2024-06-19 10:24:17 +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
Ilyas Foo c9752f1eaf
Fix analytics chart previous year data when date range includes 29 Feb (#45874)
* Temp commit

* Clean up unused codes and streamline logic

* More cleanups and add comment

* Better naming and fix logic

* Rename and comment

* Changelog

* Changelog

* Lint

* Moved leap year utils to date package, added tests

* Moved functions to utils, add tests

* Add more test

* Fix changelog
2024-05-30 12:54:00 +08:00
Ilyas Foo 98b32b5ecc
Fix getPreviousDate default behaviour to compare previous year (#47951)
* Add default compare previous_year and add tests

* Changelogs
2024-05-30 11:31:10 +08:00