Commit Graph

2223 Commits

Author SHA1 Message Date
Gabriel Manussakis a66d2f8dff
[Accessibility] Fix "toogle" typo in class names (#48700)
* Fix "toogle" typo in class names

* Add changelog file

---------

Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
2024-08-23 21:44:42 -04:00
Gabriel Manussakis 099d0a63a0
[Accessibility] Fix typo in parse number tests (#48644)
* Fix "seperator" typo

* Add changelog file

---------

Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
2024-08-23 19:59:11 -04:00
Gabriel Manussakis 4298e572c4
[Accessibility] Fix typo in noticeDismissed ref (#48706)
* Fix "Dimissed" typo

* Add changelog file

---------

Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
2024-08-23 16:07:16 -04:00
Caleb Mazalevskis b4fd419f74
Fix typos. (#50047) 2024-08-23 18:26:09 +01:00
Sam Seay 35cdc6dc20
Use syncpack to lock pnpm version till we can fix issues (#50828) 2024-08-22 12:34:42 +12:00
Tomek Wytrębowicz 63f96eb5a8
Mark props with defaults as not required (#50816) 2024-08-21 21:59:42 +02:00
Tomek Wytrębowicz d31aae633a
Move `ReportError` to `@woocommerce/components` as `AnalyticsError` (#50108)
Co-authored-by: Eason <eason.su.tw@gmail.com>
2024-08-21 20:12:13 +02:00
Jorge A. Torres 749adf304d
Cherry pick PR#50802 into trunk (#50811) 2024-08-20 20:44:48 -03: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
Chi-Hsuan Huang deaca578cc
Migrate LYS user meta (#50664)
* Migrate lys meta

* Update lys meta logic

* Update user preferences types and logic

* Add changelog

* Revert changes

* Fix types

* Fix logic

* Fix lint
2024-08-20 13:06:57 +08:00
Chi-Hsuan Huang 444cb40c7e
[Remote Logging] Use `wcAssetUrl` to check if the stack frame is from WooCommerce (#50701)
* Update remote logger to use `wcAssetUrl`

* Add changelog

* Fix tests
2024-08-20 10:48:39 +08: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
Gabriel Manussakis fc7afb41f1
[Accessibility] Fix typo in getProductStockStatusClass test (#48707)
* Fix "emtpy" typo

* Add changelog file

---------

Co-authored-by: Karol Manijak <20098064+kmanijak@users.noreply.github.com>
2024-08-16 11:01:04 +02:00
RJ 4af4389ef3
fix: missing TreeSelectControl styles (#50593)
* fix: missing TreeSelectControl styles

* fixed css for partially selected

* fixed border focus color
2024-08-16 09:49:59 +08:00
Chi-Hsuan Huang 73f45833b1
Enhance Remote Logging to Include `request_uri` (#50671)
Add request_uri prop to remote logging data
2024-08-15 22:14:53 +08:00
Moon c12b9da403
Blueprint - Disregard invalid slug and continue (#50607)
* Disregard invalid slug

* Change logic for invalid slug -- plugin dir with the slug must exist

* Use put_contents correctly

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-08-14 09:19:43 -07:00
Moon 0468bdbe82
blueprint - add php package and cli commands (#49763)
* Add blueprint package

* Add blueprint to composer

* Register blueprint cli commands

* Add feature flag

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

* Update packages/php/blueprint/src/Exporters/HasAlias.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/blueprint/src/Exporters/ExportInstallThemeSteps.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update packages/php/blueprint/src/UseWPFunctions.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Set destination correctly

* Make sure the given path is within wp content dir

* Remove debug code

* Fix typo

* Fix typo

* Fix lint errors with README

* Move READMD.md from src to the root directory and add development.md

* Add run-unit-tests.sh

* Setup test env

* Create dirs recursively

* Remove debug code

* Update packages/php/blueprint/src/Util.php

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

* Update packages/php/blueprint/src/ZipExportedSchema.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Check for steps key

* Use if statement

* Add hook comment for wooblueprint_exporters and wooblueprint_importers

* Fix plugin activation condition

* Check for download_link -- it can be empty

* Check to make sure a file was written

* Plugin must be deactivated before attemping to delete it

* Lint fixes

* Lint fixes

* blueprint - add rest api (#49765)

* Add blueprint rest api endpoint

* Rename process to import

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

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

* Remove unavailable 2nd argument from get_param -- default values are already set from the rest api def.

* blueprint - add builder page  (#49774)

* Add blueprint builder page

* Change to the correct endpoint

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

* Note that the builder intro page is temporary

* Remove unused code

---------

Co-authored-by: github-actions <github-actions@github.com>

* blueprint - add blueprint settings page (#49775)

* Add blueprint settings page

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

---------

Co-authored-by: github-actions <github-actions@github.com>

* Fix broken test

* Lint fixes

---------

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

* Update unit test env

* Added composer scripts to setup and run tests
* Moved tests to Unit dir to make space for Integration tests later

* WIP Add tests

* Use full if statement

* Use the correct step names

* Use activate_plugin and wp_get_thmes from wp functions trait

* Skip inactive plugins

* Use plural for collections

* Add a comment for StepExporter

* Remove unused construct code

* Correct function return types

* Update packages/php/blueprint/src/Importers/ImportActivateTheme.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Use full if statement

* Make sure plugin is installed

* Use functions from trait

* Remove unused functions

* Pass $force_convert correctly

* Correctly assign $this->validator

* Fix lint issues

* Rename setOptions to setSiteOptions

* Do not use die() -- throw an exception instead

* Make sure slug is a valid WP plugin slug

* Remove hardcoded string with get_step_name()

* Fix lint issues

* Update json example files

* Removed woo-specific examples -- these should be placed in the core
* Updated the built-in steps to reflect the recent changes

* Update packages/php/blueprint/src/docs/json-examples/deletePlugin.json

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce/src/Admin/Features/Blueprint/RestApi.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Rename to correct filename

* Set version number

* Use mime_content_type for checking mime type

* Catch all exceptions

* Only allow zip and json

* Remove unused function

* Remove unused functions

* Add PHPCS command and ruleset

* PHP lint fixes

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Init.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Add back removed functions

* blueprint - Add woo blueprint exporters and importers (#50057)

* Add woo blueprint exporters and importers

* Comment fix

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Update plugins/woocommerce/src/Admin/Features/Blueprint/Exporters/ExportWCSettings.php

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

* Add a test for ImportSetWCTaxRates

* Lint fixes

* Lint fixes

* Fix setWCShipping schema and data format

* Add woocommerce_default_country option

* Lint fixes

* Fix typo -- it should be decode, not encode

* Fix incorrect argument order

* Fix typo

* Export and import shipping method settings

* Lint fixes

* Lint fixes

* Type functions -- base PR has changed

---------

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

* Require admin for import and export

* Use mime type from $_FILES -- mime_content_type can return incorrect mime type depending on the system configuration

* Enable export button when backend errors out

* Enable export button when backend errors out

* Allow WooCommerce export

* Change copy text

* Remove redundant check

* Fix lint issues

* Fix lint issues

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-12 16:33:05 -07:00
Nathan Silveira f7595c6725
Add pattern validation for global_unique_id (#50501)
* Add validation for global_unique_id in classic editor

* Fix an issue with validations in the text block

* Replace everything that is not number or hyphen in the product API

* Add pattern validation in the product and variation templates

* Add changelogs

* Increment regex to also accept empty string

* Fix e2e test

* Update update-stricter-global-unique-id
2024-08-12 08:27:06 -03:00
Paul Sealock 9d12459c44
[Navigation] Prepare to remove feature (#50190) 2024-08-09 14:18:39 +12:00
louwie17 003629efb3
Address some styling conflicts in the description block editor toolbar on small viewports (#50435)
* Some minor CSS changes to address GB styling conflicts

* Add changelog

* Address issue with sidebar not showing up sometimes
2024-08-08 14:41:18 -03:00
Chi-Hsuan Huang 450a4ce3bb
Add remote logging tool to beta tester (#50425)
* Add remote logging beta tester tool

* chore: Update log method return type to Promise<boolean>

* Update pnpm-lock.yaml

* Reformat

* Check window.wcSettings?.isRemoteLoggingEnabled

* Add changelogs

* Fix test

* Update toggle_remote_logging

* Fix toggle_remote_logging

* Improve message

* Fix lint
2024-08-08 11:12:51 +08:00
Matt Sherman fe7fafa729
[e2e] Product Editor: Add SKU, GTIN, shipping, and custom fields to simple product creation test (#50241)
* Refactor to add steps in 'can create a simple product' test

* Remove unnecessary await

* Fill in shipping dimensions

* Add frontend verification step

* Get permalink from editor page

* Verify shipping dimensions

* Verify sku and gtin

* Fix label association for sku field

* Fill in shipping class

* Fill custom field

* Handle SKU auto-update before filling in SKU

* Changelog

* Changelog

* Add more specific locator for attributes "Add new" button

* Update comment for why click() is used instead of check() for toggle

* Fix incorrect selector for attributes "Add new" button

* Remove check for toggle being checked, as it is flaky

* Await isChecked()

* Scroll custom fields toggle into view if needed

* Make custom field toggling more reliable

* Break filling into a separate step

* Break filling and verifying of full description into separate steps

* Verify the description and fix verifying shipping details

* Make showing of description toolbar more reliable

* Suppress errant warning

* Suppress warning for conditional and add comment about why it is okay

* Remove unused const
2024-08-07 04:34:31 -03:00
louwie17 7fd864d234
Fix Gutenberg modal conflict around CSS specificity (#50387)
* Increase specificity for modal frame styling

* Add changelog

* Address other modals within product form
2024-08-07 04:29:36 -03:00
RJ b74bd01ca1
fix: remove defaultProps in prep for react 19 (#50266) 2024-08-06 12:20:45 +00:00
Fernando Marichal c410610c62
Rename and move errorHandler method (#50277)
* Rename and move errorHandler method

* Add changelog
2024-08-06 06:39:35 -03:00
DAnn2012 8f661d071f
Fix typos (shopper.js) (#50337) 2024-08-05 15:13:36 +03:00
Fernando Marichal 54b29ec50e
[E2E tests]: Add product description using the block editor (#50232)
* Add product description

* Add changelog

* Add changelog

* Always use same label for ToolbarItem
2024-08-05 08:43:22 -03:00
Maikel Perez 67ab34aab2
Product image getting removed in the new product editor after replacing cover image (#50181)
* Fix image gallery state conflict with external consumer state

* Fix the image gallery removal conflict now that the image gallery is stateless

* Add changelog files

* Ignore the media if it is replaced by itseft
2024-08-02 09:29:28 -03:00
Fernando Marichal 14751afeac
Use the validatorId to get access to the field instead of the context (#50035)
* Remove context

* Add method to get closest block

* Make methods async

* Add changelog

* Add await to getProductErrorMessageAndProps

* Fix getClientIdByField

* Fix tests

* Undo send id to DateTimePickerControl

* Add check before calling getClientIdByField
2024-08-02 08:31:18 -03:00
louwie17 89e8df826a
Update linked product search to use GB combobox in order to fix timing issue (#50128)
* Make use of GB Combobox for the product select

* Update E2E tests

* Add changelog

* Small CSS changes

* Fix create variable product E2E test

* Add changelogs

* Use our internal wrapper of the combobox

* A couple small fixes

* Fix bug and address feedback

* Address small formatting in comments

* Move search products back to consolidated function
2024-08-02 03:24:14 -03:00
DAnn2012 ef85173041
Fixed typo WooCommmerce (#50247)
* Update README.md.mustache

* Update README.md

* Update page-controller.md

* Update README.md

* Add changefile(s) from automation for the following project(s): @woocommerce/create-woo-extension, woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-08-02 03:14:15 +00:00
Chi-Hsuan Huang e8dacef7a6
Track frequency of unhandled JS errors with MC Stats (#50155)
* Add bumpStat and fix tests

* Add changelog

* chore: Update dependencies and add @woocommerce/tracks for remote logging

* feat: Track frequency of unhandled JS errors with bumpStat

* chore: Update error boundary to log unhandled JS errors with bumpStat

* Add changelog

* Fix lint

* Check if tracks is enabled before bumping stats

* Fix test

* Fix lint

* chore: Refactor buildQuerystring to buildQueryParams for clarity and consistency

* Add bumpStat to wc tracks mock
2024-08-02 03:04:31 +00:00
Chi-Hsuan Huang ed81aa8201
Integrate JS remote logging package in WooCommerce Admin (#50134)
* Update remote logger to check dev env and whether logging is enabled

* Add changelog

* Integrate JS remote logging package in WooCommerce Admin

* Add changelog

* Update remote logger package

* Update test

* Log error in error boundary

* Update remote logger

* Fix webpack config

* Update log stack format

* Update handleError

* Add init debug
2024-08-02 10:25:39 +08:00
Matt Sherman 606224d0d0
Product Editor: Fix shipping dimensions length field label (#50180)
Correct label of length field
2024-08-01 08:49:07 -04:00
Chi-Hsuan Huang 76e1761cf7
Add JS remote logging package (#49702)
* Add remote logging package

* Update package.json

* Fix wca admin

* Add changefile(s) from automation for the following project(s): @woocommerce/remote-logging, @woocommerce/dependency-extraction-webpack-plugin, woocommerce

* Update .eslintrc.js

* Revert core changes

* Add tracks check and update tests

* Set hard limit to trace

* Fix filename

* Add filters to customise API endpoints

* Update REDAME.md

- Add filters
- Remove installation section

* Update REDAME.md

* Add composer.lock

* Fix filename

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-08-01 12:35:43 +08:00
DAnn2012 e8dfe754dd
Fix typo (README.md) (#50156)
* Update README.md

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

* Update heading to fix lint failure

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
2024-07-31 11:37:15 -07:00
Nathan Silveira d3bd80fc61
SelectTree: keep the focus on the input while navigating between menu items (#49989)
* Commit at a functional state

* Change role to 'listbox'

* Add --highlighted class rules

* Fix overflow in create category modal

* Add countNumberOfItems
Fix multiple bugs
Refactor
Rename and move use-linked-tree file to linked-tree-utils

* Add comments

* Escape regExp

* Allow to select/remove with the enter key

* Add changelogs

* Fix unit tests

* Fix bug on css selector, since role was changed

* Fix bug in index calculation and handle focus on checkboxes and expander button correctly

* Only add activedescendant when something is highlighted

preventDefault when pressing arrowUp

* Fix bug: items array was being used instead of using linked tree

* Call onSelect when pressing enter

* Add guards to prevent tests breaking

* Add additional tests for SelectTree

* Add comments and rename some functions in linked-tree-utils
2024-07-31 11:30:32 -03:00
Maikel Perez 75d55a4a66
Product Block Editor: clicking outside of the attribute modal triggers an error (#50139)
* Fix clicking outside of the attribute modal triggers an error

* Add changelog file
2024-07-31 09:03:39 -04:00
Fernando Marichal e40d91c279
Always count variations without price (#50129)
* Always count variations without price

* Add changelog
2024-07-30 16:13:48 -03:00
Fernando Marichal e759036dcb
[Enhancement]: Change link label for duplicated SKU (#49729)
* Change link label for sku

* Add changelog

* Add id to product_sku

* Fix focus function

* Get element by id

* Fix tests

* remove hardcoded elements

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

* Add id to generic text

* Remove comment

* Fix e2e tests

* Add changelog

* Fix js tests

* Show example of empty useValidation

* Rename validator function

* Create method getParentTabIdByBlockName

* Fix errorhandler hook

* Fix tests

* Fix useBlocksHelper tests

* Fix e2e test

* Fix test

* Add tests

* Replace empty string by null

* Add errorContext null check

* Fix errorHandler hook tests

* Fix test description

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2024-07-30 10:00:17 -03:00
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