Commit Graph

2122 Commits

Author SHA1 Message Date
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