Commit Graph

863 Commits

Author SHA1 Message Date
Paul Sealock 6005bfc2d1
[Settings] Import Site Editor components from node_modules (#52655) 2024-11-11 11:32:45 +13:00
Paul Sealock 5ba9d8027d
[Settings] Add layout areas and styles (#52501) 2024-11-07 10:47:44 +13:00
louwie17 ac3b0515c2
Fix description toolbar toggle (#52259)
* Create reducer for managing sidebar state

* Add changelog
2024-10-28 06:06:36 -03:00
louwie17 fa2ce01246
Fix upside down tooltip in variations table (#52242)
* Move rotate down to icon and make sure tooltip uses max content width

* Add changelog
2024-10-23 08:59:34 -03:00
Vladimir Reznichenko 21d14759b3
[dev] Monorepo: minor build speed improvement (tsconfig consolidation) (#52191)
In this PR, we consolidate TypeScript config files (using the 'include' setting) and JS test directory naming. The goal is to reduce the number of processed files during different build steps.
2024-10-23 13:48:36 +02:00
Vladimir Reznichenko 46433747a2
[dev] CI: liverage composer packages cache in pr-lint-monorepo workflow (#52054) 2024-10-16 12:02:31 +02:00
Vladimir Reznichenko e148229edb
[dev] Monorepo: consolidate syncpack config, regroup react and testing deps around react version (#52022) 2024-10-16 09:55:36 +02:00
Maikel Perez ddb7e8380c
Product Editor: Alignment of SKU and GTIN fields is off (#51988)
* Fix the icon alignment when shown as part of the input label

* Add changelog file
2024-10-15 09:39:53 -03:00
Nathan Silveira 682f3fbe76
Add Notice generic block for the new product editor (#51740)
* Add Notice generic block for the new product editor

* Create reusable block for Notices

* Add changelog

* Fix wrong generic type
2024-10-02 10:10:57 -03:00
louwie17 217f01c991
Add product dataviews without new nav (#51581)
* Add styling for dataviews with old nav

* Add toggle to toggle between new and old navigation

* Update dataviews dependency

* Fix width for list view

* Remove unused type

* Add changelogs
2024-09-23 08:51:55 -03:00
louwie17 11b1e31ac3
Update the dataviews package dependency (#51511)
* Initial update

* Revert dependency output change

* Add changelogs
2024-09-19 10:43:05 +02:00
louwie17 0e8d19d43b
Upgrade storybook to version 7 and add pages workflow for GH publishing (#51168)
* Updated storybook and renamed stories to use the *.story.js/tsx format

* Renamed stories within product editor and wc admin package

* Include *story files in product editor package

* Add storybook pages workflow

* Remove the 'on' param in storybook-pages

* Add changelogs

* Fix failing tests

* Add dirname for any other webpack configs that rely on the woocommerce-admin one

* Fix React 18 warnings

* Remove unneeded storybook packages from components package

* Remove storybook workflow, to be added as a follow up instead

* Revert @storybook/react back to fix unit tests
2024-09-09 12:06:01 -03:00
louwie17 d185a34145
Fix style conflicts with LYS (#51223)
* Increase specificity for product data view styles to avoid conflicts

* Add changelog
2024-09-09 09:03:43 +00:00
louwie17 907b591a42
Add product data forms to data views (#51071)
* Add DataForms for products

* Fix list view

* Revert pnpm lock changes

* Add changelog

* Reference core store versus using string

* Revert pnpm-lock
2024-09-04 05:52:51 -03:00
Luigi Teschio af9ca20af5
[DataView]: Add Products View and Product Edit stories (#50999)
* Product Editor: add storybook

* fix storybook

* Add products data views list

* Add navigation on the left

* Update edit site package

* Fix styling

* Add changelog

* Add wp/icons package to syncpack exception list

* Delete some unused stuff and address types

* Add changelog

* Remove un needed css

* Remove dependency on edit-site package

* WIP

* WIP

* WIP

* Fix storybook build

* Ignore storybook from version pinning

* add slug stories

* Add products data views list

* Add navigation on the left

* Update edit site package

* Fix styling

* Add changelog

* Add wp/icons package to syncpack exception list

* Delete some unused stuff and address types

* Add changelog

* Remove un needed css

* Remove dependency on edit-site package

* Fix custom status filters

* Make sure page size works with view config

* improve storybook

* rename file

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

* Remove use of canvasMode and navigation context as it is not needed

* Remove wordpress/dom from syncpack

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

* add edit-site style

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

* remove not necessary file

* address feedback

* fix webpack configuration

* fix lint errors

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-09-03 14:09:54 +00:00
louwie17 2890e16c86
Add product data views list to experimental product data views page (#51008)
* Add products data views list

* Add navigation on the left

* Update edit site package

* Fix styling

* Add changelog

* Add wp/icons package to syncpack exception list

* Delete some unused stuff and address types

* Add changelog

* Remove un needed css

* Remove dependency on edit-site package

* Fix custom status filters

* Make sure page size works with view config

* Remove use of canvasMode and navigation context as it is not needed

* Remove wordpress/dom from syncpack
2024-08-30 13:27:10 -03:00
Gabriel Manussakis a40f87b9ec
[Accessibility] Fix typo in initCustomFieldsToogle variable name (#48652)
* Fix typo in initCustomFieldsToogle variable name

* Add changelog file

---------

Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
2024-08-29 17:55:23 -04:00
Gabriel Manussakis d5993ec424
[Accessibility] Fix typo in handleAdviceCardDissmiss function name (#48650)
* Fix typo in handleAdviceCardDissmiss function name

* Add changelog file
2024-08-27 22:36:25 -04:00
Caleb Mazalevskis 3ab62e11c3
Fix some comment typos. (#50993) 2024-08-27 10:54:10 -07:00
Gabriel Manussakis 7d8cd500b5
[Accessibility] Fix typo in AligmentToolbarButton function name (#48651) 2024-08-27 15:50:01 +02:00
louwie17 f2941d76e5
Add initial product data views screen (#50981)
* Add product data views feature flag

* Add basic products app file

* Add lazy render for product app

* Only render if GB is enabled

* Add translation

* Add changelogs

* Address lint issues

* Address final lint error
2024-08-27 09:49:04 -03:00
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 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
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
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
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
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
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
Fernando Marichal c410610c62
Rename and move errorHandler method (#50277)
* Rename and move errorHandler method

* Add changelog
2024-08-06 06:39:35 -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
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
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
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
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 eb2b3da95b
Adjust spacings for variations table notice (#49561) 2024-07-16 16:02:55 -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