Commit Graph

2156 Commits

Author SHA1 Message Date
Sam Seay 67f67b1017
Add assets to the dewp distribution as it is needed. (#46755) 2024-04-23 20:32:12 +12:00
Nathan Silveira 05e838ec82
Export useProductEdits hook (#46808) 2024-04-22 15:50:50 -03:00
Gan Eng Chin c595717d16
Fix "Add a filter" UI issue in Analytics (#46750)
* Fix UI for add filter popover in Analytics.

* Make character casing consistent for filters.

* Add changelog.

* Add changelog.

* Change filter label to sentence case.
2024-04-22 21:15:22 +08:00
Chi-Hsuan Huang b9ea5bacd8
Fix back from CYS via LYS goes to Home, not LYS (#46665)
* Add goBack action to customize-store

* Add changelog

* Add __experimentLocationStack to history

* Update customize-store goBack action

* Rename __experimentalLocationStack
2024-04-22 21:26:32 +12:00
RJ fd52f18f6b
Move LYS coming soon initialization to core profiler flow (#46708)
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-04-22 14:49:59 +08:00
Maikel Perez 46d87d427a
[CFT Custom fields]: Show error message after pressing Add or Add another (#46703)
* Show validation message in the field that lost the focus

* Add unique validation for custom field names and trim values

* Let edit custom fields when creating a new product

* Add changelog file
2024-04-19 12:39:52 +00:00
Fernando Marichal eb4873dcd3
Fix edit custom field modal width (#46727)
* Remove min-width

* Add changelog

* move changelog

* Fix width
2024-04-19 09:36:09 -03:00
Nathan Silveira 80133578be
Fix description block collapsing when unfocused (#46646) 2024-04-18 10:37:40 -03:00
Nathan Silveira 3a21f87bed
Allow saving a product as a draft when hitting ctrl/cmd + S (#46552)
* Allow saving a product as a draft when hitting ctrl/cmd + S

* Increment logic to keep product published/scheduled after it is published when using shortcut
2024-04-18 10:37:30 -03:00
Ron Rennick 4797d72c60
Release webpack dependency plugin (#46702)
* add changelog entry for node bump

* bump package version

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-04-18 11:26:01 +01:00
Damián Suárez 2df389329e
[Product Block Editor]: when adding a new attribute, show selected item right after user clicks on it (#46713)
* render selected value before porpulate terms

* changelog
2024-04-18 05:22:16 -04:00
Damián Suárez b0e3e31cbe
Data: introduce optimisticQueryUpdate item option (#46343)
* add a CustomActionDispatchers for createProductAttribute action

* add optional options to createItem() fn

* update items object when optimisticQueryUpdate is defined

* reduce itemsCount when creating a new item

* polish TS types

* update reducer tests

* clean unused type

* clean dirty code

* add optimisticQueryUpdate test

* changelog

* minor improvement

* options could be undefined

* compute items and itemsCount based on data

* fix TS error

* changelog
2024-04-18 01:27:40 -04:00
Maikel Perez 4b1e7cbcb8
[CFT Custom fields]: Fix modal separator at the bottom (#46691)
* Remove table separator, move field names to table columns and fix the modal growing when there are validation errors

* Add changelog file
2024-04-17 15:36:33 -03:00
Maikel Perez 24306bf0bd
[CFT Custom fields]: Remove horizontal separator that initially appears (#46682)
* Remove block appender below the custom fields block

* Add changelog files
2024-04-17 14:40:10 -03:00
Maikel Perez 27b1605a3f
[CFT Custom fields] Fix copy and link (#46640)
* Fix the link in the custom field helper test

* Fix tooltip copy

* Add tracking events

* Add changelog files
2024-04-16 13:09:22 -03:00
Brent MacKinnon 8fc82e9bfd
Fix broken links from issue #46336 (#46381)
* Fixing broken links

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update docs/contributing/common-issues.md

Co-authored-by: Néstor Soriano <konamiman@konamiman.com>

* Update docs/payments/payment-gateway-api.md

Co-authored-by: Leif Singer <leif@automattic.com>

* Update writing-high-quality-testing-instructions.md

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

* ignore MD029 rule (1/2/3) as the linebreaks that are needed for the code block confuse its numbering

* update the docs manifest

`pnpm utils md-docs create docs woocommerce -o docs/docs-manifest.json`

---------

Co-authored-by: Leif Singer <leif@automattic.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Leif Singer <git@singer.sh>
2024-04-15 14:30:37 +02:00
Ron Rennick 4fa2e3822c
Update the monorepo to node v20 (#45148)
* test bumping node to v18

* remove community contributor condition from review assignment

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* bump node to v20

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, packages/php/remote-specs-validation, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* add blocks eslint-plugin-woocommerce to project workspace

* add e2e-environment as a peer to e2e-utils

* restore version on @woocommerce/api

* update lock file

* move e2e-environment to devDependencies

* add undefined location check to admin js test

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-12 13:49:55 -03:00
Nathan Silveira 5e3d372e5f
Prepare @woocommerce/product-editor for release 1.5 (#46543) 2024-04-12 12:03:37 -03:00
Oleksandr Aratovskyi 5bcbb52a9b
Remove BNPL (Klarna) apm and fix icons on wcpay welcome page (#46523)
* Update payment method icons

* Use latest payment methods icons on wcpay weclome page

* Style payment icons on wcpay welcome page similarly to connect page

* Remove BNPL from wcpay welcome page additional payment methods

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

* Fix warnings on CB payment method

* Fix lint error

* Change discover icon to new

---------

Co-authored-by: oaratovskyi <oleksandr.aratovskyi@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-12 17:07:12 +03:00
Nathan Silveira 027f83f1fa
Remove Media Library menu item from Downloads section (#46490)
* Remove MediaLibraryMenuItem from downloads

* Add changelog
2024-04-12 11:03:10 -03:00
Nathan Silveira 0b69d4d6f7
Prepare @woocommerce/admin-layout and block-templates for release (#46538)
* Prepare @woocommerce/block-templates for release

* Prepare @woocommerce/admin-layout for release

* Revert mistake
2024-04-12 13:52:36 +00:00
Fernando Marichal d8037dd154
Add menu item to Publish button with copy to draft (#46294)
* Add duplicate product store

* Add copyToDraft method

* Add copy to draft button

* Modify success notice

* Add changelogs

* Update name before saving product

* Add comment to code
2024-04-12 10:19:12 -03:00
Nathan Silveira 450b06a1e1
Always use productTemplateId when available and use editedRecord in useEntityRecord hooks (#46395)
* Use editedRecord instead of record

* Always use productTemplateId when available

* Change private methods to protected in ProductVariationTemplate

* Use editedRecord in hook useEntityRecord

* Update changelogs

* Restore attribute renamed by mistake

* Change useProductTemplate unit test
2024-04-12 10:16:35 -03:00
Damián Suárez 5db25ea616
[Product Block Editor]: expose __experimentalSectionActions component (#46515)
* add basic Readme.md file

* expose __experimentalSectionActions component

* changelog

* update readme example
2024-04-12 05:48:40 -04:00
Ron Rennick c6048b5c49
Add glob, rimraf, and uuid to Syncpack (#46278)
* add uuid to syncpack

* add rimraf to syncpack

* add glob to syncpack

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/integrate-plugin, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/components, @woocommerce/block-templates, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests, woocommerce

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 12:52:49 -03:00
Matt Sherman 4ba72b2258
Product Editor API: Add tooltip attribute to woocommerce/product-select-field block (#46447) 2024-04-11 07:20:57 -04:00
Nathan Silveira 3fb744313b
Add isSelectableByUser attribute to product templates (#46394)
* Add selectable attribute in product template to allow creation of product templates that do not appear on the "Change product type" UI

* Always use productTemplateId when available, otherwise fallback to standard-product-template

* Rename attribute

* Use editedRecord in hook useEntityRecord

* Revert "Always use productTemplateId when available, otherwise fallback to standard-product-template"

This reverts commit 2960fcd520.

* Revert "Use editedRecord in hook useEntityRecord"

This reverts commit c28e005e7b.

* Add changelogs

* Fix unit tests

* Increment changelog
2024-04-10 17:57:42 +00:00
Chi-Hsuan Huang 95b36650d7
Fix Launch Your Store task item should not be clickable once completed (#46361)
* Fix Launch Your Store task item should not be clickable once completed

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-10 20:32:15 +08:00
Leif Singer 8ee74ede0e
Update Woo.com references to WooCommerce.com (#46259)
* replace capitalized Woo.com with WooCommerce.com

* replace http URLs

* replace https URLs

* replace developer.woo.com

* add missing version in `@since` tag

* unslash the HTTP_REFERER

* WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

* add changelog file

* add more changelog files

* address linter errors

* address more linter errors

* fix test

* more linter errors
2024-04-09 09:50:15 +01:00
Fernando Marichal 931aec84e8
[Linked products] - Change number of 'choose products for me' to 4 (#46094)
* Add limit to "choose products for me"

* Add changelog
2024-04-05 11:35:59 -03:00
Ilyas Foo 7e7be4f9d0
Add launch your store success screen (#46103)
* Initial commit with LYS components

* Update CustomerFeedbackSimple component to support emoji value props

* Add confetti package in woocommerce components

* Add confetti usage

* Remove unnecessary files

* Update pnpm lock

* Changelogs

* Lint and temporarily comment out tests

* Lint css and rename image

* Various fixes

* Rename transitional to congrats

* Add copy link functionaility from Moon's code and move whatsnext component

* Rename components

* Move and renames

* Fix ref type

* Add temporary dynamic actions

* Remove confetti background

* Add header

* Update xstate actions for launch success page

* Add temporary spinner

* Combine congrats data fetching to a single action and service

* Add functioning dynamic actions list

* Temporarily remove test

* Cleanups

* More cleanups

* Small lint

* add url listener for content param

* Update comment on confetti package

* Remove lodash and replace with reduce

* Fix Woo Express condition

---------

Co-authored-by: rjchow <me@rjchow.com>
2024-04-05 10:44:57 +08:00
Nima Karimi 1dc97f0801
[Woo AI] Add JSON response format (#46137)
* Add response_format to Woo AI package

* Add changelog

* Request JSON response format for product name generation

* Add changelog

* Add shared types
2024-04-03 21:37:39 +03:00
Damián Suárez df2ba716ef
[Product Block Editor]: disable TextArea RichText instance according to `disabled` attribute value (#46089)
* get ready to disable text-area block

* changelog

* update doc
2024-04-02 10:56:52 -04:00
Nathan Silveira e2eaa55b7d
Apply filter to add metadata for generated variations (#45953)
* Add meta_data parameter in generateProductVariations

* Apply filter to get meta_data to generate variations

* Add meta_data parameter in generate variations endpoint

* Update name and add documentation

* Fix useEntityRecord in blockEditor
2024-04-02 05:25:01 -03:00
Maikel Perez 75a563df58
Redirect to the edit product page after changing the product type and publishing it (#46092)
* Redirect to the edit product page after changing the product type and publishing it

* Add changelog file
2024-04-01 14:43:35 -03:00
Oleksandr Aratovskyi 14cd6e6dfd
Remove ToS acceptance in WCPay banner and promotions JSON (#46003)
* Remove ToS acceptance in WCPay banner and promotions JSON

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

* Add line break in banner to look nicer

* Center banner content

* Style banner for mobile version

* fix js test to use another block (previous one no longer exist)

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

* Add comment to css

---------

Co-authored-by: oaratovskyi <oleksandr.aratovskyi@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-03-29 14:59:29 +02:00
Matt Sherman 468c5e61bf
Product Editor: Accessible label for text area block (#45968)
* Add aria-labelledby attribute to rich text component

* Handle label click to focus rich text

* Remove unneeded ts-ignore

* Pass in label ID explicitly instead of hardcoding knowledge of its naming pattern

* Changelog

* Add tooltip attribute to block.json

* Focus text area when clicking on label

* Remove Label id... not needed

* Set text area labelled by to label

* Add aria-required to rich text

* Hide required asterisks from aria
2024-03-28 05:24:16 -03:00
Fernando Marichal 89bbebe6b8
Change Tracks event name for Quick variations menu action (#45889)
* Rename tracks event

* Add changelog
2024-03-27 10:59:10 -03:00
Matt Sherman 9000fd764e
Product Editor: Only send edited properties when saving (#45958)
* Only send edited properties

* Changelog

* Rename const to match previous code

* Remove all the logic to look up the entity key... we know it is 'id' for products
2024-03-27 05:21:32 -03:00
dependabot[bot] 0a7fcb8324
Bump composer/composer from 2.6.5 to 2.7.0 in /packages/php/monorepo-plugin (#44460)
Bump composer/composer in /packages/php/monorepo-plugin

Bumps [composer/composer](https://github.com/composer/composer) from 2.6.5 to 2.7.0.
- [Release notes](https://github.com/composer/composer/releases)
- [Changelog](https://github.com/composer/composer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/composer/composer/compare/2.6.5...2.7.0)

---
updated-dependencies:
- dependency-name: composer/composer
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 11:08:22 -03:00
Paweł Nguyen e610b5048c
Fix homepage link in create-woo-extension package.json (#45811)
* Fix homepage link in package.json

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-22 17:09:27 -03:00
Matt Sherman 37e58a982a
Product Editor: Show correct Publish/Schedule button label when timezone is behind UTC (UTC-1, UTC-4, UTC-9, etc.) (#45848)
* Use useProductScheduled to determine button label

* Changelog
2024-03-22 14:18:32 -04:00
Nathan Silveira ff79576cd3
Fix word break inside columns in product editor (#45687) 2024-03-22 14:42:15 -03:00
Maikel Perez 54476cb7f3
After Variations are created, disable the fields that don’t do anything (#45838)
* Disable woocommerce/product-regular-price-field when product type is variable

* Disable woocommerce/product-sale-price-field when product type is variable

* Disable woocommerce/product-sku-field when product type is variable

* Disable Track stock quantity toggle when product type is variable

* Disable woocommerce/product-radio-field when product type is variable

* Disable woocommerce/product-shipping-class-field when product type is variable

* Disable woocommerce/product-shipping-dimensions-fields when product type is variable

* Add changelog files

* Fix php linter
2024-03-22 13:52:42 -03:00
Damián Suárez 27124828e9
[Product Block Editor]: register `metadata` attribute for all blocks (#45657)
* register the `metadata` attribute for all blocks

* bind value attribute with the nane product entity

* changelog

* add a ToDo note

* rename edit component fn to NameBlockEdit

* changelog

* restore @ts-export line

* fix eslint issue

* fix eslint issue
2024-03-22 12:23:38 -04:00
Fernando Marichal 3842611975
Update copy of inventory management fields (#45801)
* Update copy of inventory management fields

* Add changelog

* Add changelog
2024-03-22 11:49:54 -03:00
Fernando Marichal 4a0d7f5822
Enable 'Publish' button when product status is draft (#45812)
* Enable publish button when draft

* Add changelog
2024-03-22 11:49:22 -03:00
Fernando Marichal dd550ddca4
Add an image to multiple variations using Quick updates (#45774)
* Add component

* Add utils

* Add styles

* Use utils in images block

* Add changelog

* Add tracks event

* Add mode upload by default

* Fix js tests

* Fix variation-actions-menus tests
2024-03-22 11:49:11 -03:00
Damián Suárez 72d2a39de2
[Product Block Editor]: document woocommerce/product-text-area-field field block (#45513)
* [Product Block Editor]: document `woocommerce/product-text-area-field` block

* changelog
2024-03-21 10:49:04 -04:00
Damián Suárez b357bdc593
[Product Block Editor]: introduce `woocommerce/entity-product` source handler (#45616)
* introduce woocommerce/entity-product source handler

* add test for product entity source handler

* add useSource value test

* changelog

* clean unused helper

* minor TS changes

* rename TS type
2024-03-21 09:00:23 -04:00
Fernando Marichal 50bec2d1b0
Change hidden tag behavior (#45766)
* Modify header hidden tag

* Modify visibility section hidden tag

* Add changelog
2024-03-20 15:34:33 -03:00
Matt Sherman 4272a782a6
Product Editor: Fix crash when uploading files from variations list Quick Update menu (#45748)
* Handle when downloads menu is passed an empty selection

* Changelog
2024-03-20 14:24:15 -04:00
Mahesh Bohara 6ce72a25ba
Add loading state functionality to Schedule button in the calendar (#45645)
* Add loading state functionality to Schedule button in the calendar

* Add changelog

* Updated changelog file
2024-03-19 14:45:27 -04:00
Lee Willis b88821f685
Introduce handleConfirm. Export handlePrompt & handleConfirm from product-editor (#44226)
* Introduce handleConfirm. Export handlePrompt, and handleConfirm from product-editor

* Change as requested

* Add changelog

* Fix onCancel behaviour

* Fix lint error

---------

Co-authored-by: Lee Willis <lee@ademti-software.co.uk>
Co-authored-by: Matt Sherman <matt@jam123.com>
2024-03-19 14:11:14 -04:00
Fernando Marichal 99853c19bf
Fix double scroll bar in pre-publish panel (#45671)
* Fix double scroll bar

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Add changelog

* Add comment to styles
2024-03-19 15:06:30 -03:00
Fernando Marichal 298ed3c680
Fix section title styles in the pre-publish panel on WP 6.5 (#45689)
* Fix section title

* Add changelog
2024-03-19 13:21:29 -03:00
Maikel Perez c2f33b2f5b
Replace the Draft tag with a Scheduled tag in the product header (#45685)
* Show Scheduled product header tag when the product is been scheduled

* Fix the pre publish modal header message when to say scheduled when the product has a date in the future

* Add changelog file
2024-03-19 16:20:19 +00:00
Maikel Perez 617b49464e
Hidden tag inconsistency (#45679)
* Header tag Hidden now is aligned with the Visibility: Hidden from the pre publish modal

* Add changelog file
2024-03-19 16:16:34 +00:00
Fernando Marichal 506a8b0086
Fix publish dropdown visibility in new product after hiding pre-publish modal (#45682)
* Publish dropdown visible after hidding panel

* Add changelog

* Rename prop
2024-03-19 13:15:33 -03:00
Maikel Perez dea68ee3e3
Handle taxes not being enabled and customized tax classes (#45531)
* Create and register the woocommerce/product-select-field block

* Replace the tax class radio group block by woocommerce/product-select-field block

* Hide tax fields when taxes are disabled

* Hide tax fields when taxes are disabled in product variations

* Add changelog files

* Fix linter errors
2024-03-18 18:09:03 +00:00
Fernando Marichal ee044a7b50
Remove the "Always show pre-publish checks" from pre-publish panel (#45672)
* Remove "always show prepublish panel"

* Add changelog
2024-03-18 14:00:21 -04:00
Matt Sherman 52d300f2a9
Product Editor: Disable description full editor when using an incompatible version of Gutenberg (#45650)
* Check Gutenberg version and prevent full editor use if using a version that causes crash

* Changelog
2024-03-18 02:23:08 -04:00
Matt Sherman c658b1c163
Product Editor: Fix editor crash when clicking in editor margin when summary or description fields are focused (#45608)
* Revert dashboard size (changed in #44166)

* Hide toolbar on blur of text-area

* useClearSelectedBlockOnBlur hook

* Use useClearSelectedBlockOnBlur hook to hide toolbar

* Changelog

* Update packages/js/product-editor/src/hooks/use-clear-selected-block-on-blur/use-clear-selected-block-on-blur.ts

---------

Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
2024-03-15 05:54:34 -04:00
Seghir Nadir 4be06d8959
Add support for WooCommerce Analytics module in @woocommerce/explat (#45131)
* support running A/B tests in frontend

* add optional chaining

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

* switch to shared variable

* fix tests

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-03-14 21:43:52 +00:00
Matt Sherman afe0e0724b
Product Editor: Handle loading of product editor when global settings are not available on initial render (#45490)
* Do not pass settings from global down to editor; let BlockEditor handle loading settings itself

* Changelog

* Changelog
2024-03-14 13:02:40 -04:00
Nathan Silveira 7fdaf53a88
Match template based on different attributes besides product types (#45454)
* Match template based on different attributes besides product types

* Do not hard-code postType

* Refactor code

* Handle isResolving from useEntityRecord

* Refactor useProductTemplate

* Handle null value in `useProductTemplate`
2024-03-14 10:51:42 -03:00
RJ 59635fb4c8
add: update onboarding task list copies and illustrations (#44854) 2024-03-14 15:20:31 +08:00
Maikel Perez 0fc75c5148
Remove Custom Fields for New Product Editor (#45493)
* Add remove custom field for the new product editor

* Add changelog file

* Show add button when the custom fields are empty

* Ensures to always convert the metas into a string array since it can be anything

* Add changelog file
2024-03-13 19:16:12 -03:00
Fernando Marichal 1c068ce3a4
Update Attributes tooltip copy (#45485)
* Change attributes tooltip copy

* Add changelogs
2024-03-12 12:58:49 -03:00
Maikel Perez 88f1187928
Add Custom Fields for New Product Editor (#45484)
* Create the Add new button

* Integrate the CreateModal with the CustomFields component to add fields

* Add validation utils

* Fix validation errors in the edit modal component

* Fix linter error

* Add changelog file
2024-03-12 10:02:24 -03:00
Sam Seay 0f98ffee64
Remove redundant dependency on moment in the csv-export package (#45410) 2024-03-12 17:06:53 +13:00
Paul Sealock 172bbac661
Remote Specs: Update endpoints to 2.0 (#45298) 2024-03-12 15:53:59 +13:00
Nathan Silveira 1ad84aa6fe
Allow using woocommerce icons for product details section description (#45348)
* Allow using woocommerce icons for product details section description and add gift icon

* Use core components for SVG
2024-03-11 20:30:31 -03:00
Maikel Perez 277fa6b005
Edit Custom Fields for New Product Editor (#45396)
* Create edit modal

* Add update function to the useCustomFields hook

* Integrate the EditModal in the CustomFields component

* Add edition and validation logic to the custom field EditModal component

* Fix text control validation error styles

* Focus the name field when its invalid

* Fix linter error

* Fix edit modal min width and controls width

* Add changelog file

* Fix text overflow in custom fields table

* Remove non needed block style file
2024-03-11 15:28:51 -03:00
Fernando Marichal 7cc4094f4a
Set product status after publishing (#45436)
* Set product status after publishing

* Refactor save

* Add changelog

* Remove comment

* Rename select alias
2024-03-11 12:25:08 -03:00
Matt Sherman 39306765d0
Tooltip: Fix max width of tooltip (used in Product Editor) (#45358)
* Set max width on tooltip

* Changelog
2024-03-11 11:04:54 -04:00
Maikel Perez 3658ac2d0e
List Custom Fields for New Product Editor (#45360)
* Create woocommerce/product-custom-fields block

* Register woocommerce/product-custom-fields block

* Add product-custom-fields block to the simple product template

* Create useCustomFields hook

* Create empty state

* Create CustomFields component

* Add custom fields table

* Add custom field remove button

* Hide the custom fields table base on the toggle value

* Remove non list features

* Add changelog files

* Fix linter errors

* Fix empty state styles

* Fix php linter error

* Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used

* Change url for the Read more about custom fields
2024-03-11 11:48:55 -03:00
Matt Sherman 99dec31578
Product Editor: Remove editable outline (#45366)
* Remove outline for the block when it is editable

* Refactor block-editor-block-list__block CSS

* Changelog
2024-03-11 10:41:33 -04:00
Maikel Perez 0a90499e7b
Custom Fields for New Product Editor (#45291)
* Register metaboxhidden_product user meta as a user rest field

* Create useMetaboxHiddenProduct to manage the user metaboxhidden_product meta field

* Create woocommerce/product-custom-fields-toggle-field block

* Register woocommerce/product-custom-fields-toggle-field block

* Create product-custom-fields feature flag

* Hide custom fields behind the product-custom-fields feature flag

* Add changelog files

* Get default postcustom user meta value when the metaboxhidden_product does not exist yet in the user object
2024-03-11 10:55:31 -03:00
Fernando Marichal fce3aeb90f
Close prepublish panel before creating new product (#45397)
* Close prepublish panel before create new

* Add changelog

* Remove close fn from blockeditor

* Close panel after clicking outside

* Refactor useEffect

* Remove empty lines

* Replace mousedown with click event

* Replace click with mouseup
2024-03-11 10:10:36 -03:00
Fernando Marichal 9865701cbb
Add message after publishing a product to pre-publish panel (#44864)
* Add message after publishing product

* add styles

* Fix animation styles

* Fix panel footer

* Remove console.logs

* Add changelog

* Fix product url

* Remove preview

* Add post-publish-section and fix animation

* Add hook useProductURL

* Add postpublish

* Refactor usePreview

* Use PostPublishSection and PostPublishTitle

* move style

* modify styles

* Fix footer

* Fix copy

* Add ts-ignore

* Add CopyButtonProps

* Fix productStatus

* Rename isPublished
2024-03-07 09:08:51 -03:00
louwie17 c740988d55
Fix multiple warning in blocks in Atomic (#45283)
* Set multiple to true

* Add changelog
2024-03-04 17:18:58 -04:00
Maikel Perez d0f095df72
Add menu item to publish button with 'Move to trash' (#44940)
* Move products to trash

* Create useProductManager hook

* Use useProductManager hook in the publish button

* Create PublishButtonMenu

* Hide move to trash when the product is already in trash

* Fix linter error

* Add changelog file
2024-03-04 14:04:38 -03:00
Fernando Marichal f24eb2efa3
Modify product header (#44711)
* Create title-bar

* Remove div

* Refactor title

* Add visibility tags

* Visibility for variations

* Modify variation title

* Add changelog

* Remove isDraft and isScheduled

* Fix tag font-weight
2024-03-04 11:14:44 -03:00
Chi-Hsuan Huang 1f27a9e877
Revert " Temporarily commented out failing date package test due to the February 29th issue" (#45239)
Revert " Temporarily commented out failing date package test due to the Febru…"

This reverts commit b471e51734.
2024-03-01 22:12:09 +08:00
Moon da64238290
Add range operator in Remote Inbox Notification (#45201)
* Add range rule in Remote Inbox Notification

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

* Add range

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

* Update README.md

* Fix lint errors

* Make sure right-hand is an array with two elemetns -- range

* Update README

* Lint fixes

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-29 13:02:38 -08:00
Ron Rennick c84d9d944a
pin simple-git in syncpack (#44902)
* pin simple-git in syncpack

* update pnpm-lock for simple-git

* add changelog for json linting

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-02-29 13:30:24 -04:00
Chi-Hsuan Huang b471e51734
Temporarily commented out failing date package test due to the February 29th issue (#45202)
* Temporarily commented out a test due to February 29th issue

* Add changelog

* Fix lint
2024-02-29 11:23:45 +08:00
Moon 49b3e510cb
Allow JSON schema string (#45151)
* Receive JSON schema string from the constructor -- this is more flexible than accpeting a physical file

* Add changelog

* Add get_bundle_json method

* Update composer version
2024-02-27 00:34:41 -08:00
Chi-Hsuan Huang ec8bd31365
Improve webpack cache-busting version parameter by using file contents hash (#44838)
* Update webpack config to use file content hash for chunks and generate asset php for styles

* Use StyleAssetPlugin to generate style.asset.php

* Remove unneed ?ver=<version> code

* Use file hash from asset file when SCRIPT_DEBUG is off

- Use file hash to load scripts/styles ?ver=<file hash>
- Add register_style() method to WC_Admin_Assets

* Load payment method promotions in admin_enqueue_scripts

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

* Add json2php

* Update doc

* Update pnpm-lock.yaml

* Fix add_print_shipping_label_script

* Add a comment to style-asset-plugin.js

* Change register_style to use WC_ADMIN_DIST_CSS_FOLDER

* Reset the outputNormal object to avoid duplicate files

* Fix type error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 08:07:53 +00:00
Fernando Marichal 3d3f6d64b8
Add `Always show pre-publish checks` checkbox (#44595)
* Add show-prepublish-checks-section

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/prepublish-panel.tsx

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Add show-prepublish-checks hook

* Refactor prepublish panel button visiblity

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

* Fix footer styles

* Add changelogs

* Add content div

* Fix styles

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Rename recorded action

* Fix styles

* Hide panel after unchecking option

* Improve resolving

* Add new E2E test for merchant transforming classic cart to cart block (#44926)

* Update the monorepo-utils gitignore to only include index.js and its license file. (#44932)

* Fixed `@woocommerce/plugin-woocommerce` Watch (#44930)

By default `nodemon` only watches for JS file changes. This expands the
config so that it watch the file extensions that are actually
produced by builds.

* Update core package.json to remove nightly ci config (#45096)

* Update core package.json to remove nightly ci config

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

---------

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

* Update blocks build message (#44811)

* Update blocks build message

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

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* [CYS on Core] Update the themes list on the intro screen (#44822)

* Update themes list on core. Update the themes data and remove hardcoded reference to free themes.

* Update styles for the Free, Paid and active cards.

* Add the color palletes to TT4 theme.

* Update the references for default and core themes.

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

* Update the link to TT4 theme

* Update default value for price.

---------

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

---------

Co-authored-by: Veljko V <veljano@yahoo.com>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-02-26 07:38:48 -04:00
Maikel Perez 9498687d2c
Add menu item to publish button to schedule product updates (#44783)
* Add support for other Button Props to the ButtonWithDropdownMenu component

* Refactor the PublishButton to be used in the PrepublishPanel and the Header at the same time

* Prevent button behavior when it's visually disabled

* Improve date timezone calculation in the Schedule Section component

* Revert status to publish if it was future and the date is not in the future

* Get the product status from the edited product

* Create SchedulePublishModal component

* Integrate SchedulePublishModal component

* Change the edit schedule menu item style

* Fix date time formating

* Fix date time conversion across different timezones

* Update ScheduleSection to use useProductScheduled hook

* Add changelog file

* Fix linter error

* Hide the scheduling messages behind the product-pre-publish-modal feature flag

* Validate product before trying to schedule it

* Fix schedule section publish error
2024-02-23 10:14:50 -03:00
louwie17 ddbbccf5a3
Fix download buttons in downloads section (#44816)
* Remove use of subsection actions and fix add support for subsection and section in SectionActions

* Add changelog

* Make sure subsection description block will still work.
2024-02-20 14:35:27 -04:00
Nathan Silveira ff23d1ed21
Prepare @woocommerce/product-editor for release 1.4.0 (#44817)
Prepare for release 1.4.0
2024-02-20 18:33:11 +00:00
Damián Suárez 3b4cb31d4e
[Product Block Editor]: do not include current product in the suggested products list (#44815)
* exclude current product from suggested list

* changelog
2024-02-20 14:30:01 -04:00
Nathan Silveira 9fa9431534
Export Notice component in @woocommerce/product-editor (#44812) 2024-02-20 15:01:38 -03:00
Moon 0bc6c37aa6
Add JSON schema files for remote spec validation (#44484)
* Add build scripts

* add schemas

* Add more schemas

* Update readme

* Add wc-pay-promotions schema

* Add composer version

* Update pnpm-lock.yaml

* Add changelog

* Fix markdown lint errors

* Fix markdown lint errors

* Add RemoteSpecValidator

* Update README

* Add fixture tests

* Add bundle names

* Remove Tests\\ from namespace

* Remove version from package.json

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

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

* Update packages/php/remote-specs-validation/src/RemoteSpecValidator.php

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

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

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

* Update packages/php/remote-specs-validation/bin/build

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

* Update packages/php/remote-specs-validation/README.md

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

* Update lock file

* Fix markdown lint errors

* Revert package.json

* Update composer

* Use jetpack changelogger 3.3.0

* Update lock file with php 7.4

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-02-16 13:31:21 -08:00
Fernando Marichal 587ba79350
Modify pre-publish texts after scheduling product (#44652)
* Modify prepublish texts after scheduling product

* Add changelog
2024-02-16 13:06:05 -03:00
Fernando Marichal cb967f6dfd
Change Visibility section label when a password is set (#44624)
* Change visibility section label

* Add changelog

* Fix changelog
2024-02-16 08:54:37 -03:00
Alexandre Lara 452c522b95
[DOC] Resolve incorrect branch references in Gutenberg links (#44566)
* Fix Gutenberg links in the docs pointing to the wrong branch

* Add changefile(s) from automation for the following project(s): @woocommerce/notices, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/components, woocommerce-blocks, woocommerce-beta-tester, woo-ai

* Fix markdown lint errors

* Fix wrong link in the docs

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-15 14:13:28 -03:00
Fernando Marichal f09bc85875
Fix pre-publish modal styles (#44562)
* Fix pre-publish modal styles

* Improve styles

* Add changelog

* Add vars to styles

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Fix sidebar styles

* Add changelog

* add overflow auto

* Fix quotes
2024-02-15 09:36:59 -03:00
RJ 141c2e4399
add/explat experiment name validation (#44535) 2024-02-15 12:35:23 +08:00
Maikel Perez 5af88543eb
Add the collapsible Schedule section (#44563)
* Create schedule section within the pre-publish panel component

* Add publish date time picket to the schedule section

* Enhance schedule section title to show the selected date

* Change the text of the publish button to schedule once the product is scheduled

* Add changelog file

* Fix linter errors

* Set schedule text in pre publish button too

* Fix timezone offset from getSiteSettingsTimezoneAbbreviation when the onboarding wizard is skipped
2024-02-14 13:57:53 -03:00
Matt Sherman d279466eb3
[Product Editor] Fix blank editor flash when loading product (#43840)
* EditorLoadingContext

* Use EditorLoadingContext

* Remove fallbacks

* Make sure metadata exists before using it

* Add header loading state

* Do not return skeleton

* Use EditorLoadingContext

* Update editor loading state

* Remove ProductPageSkeleton

* Remove unused import

* Remove unused import

* Handle undefined variationId and parentId in VariationSwitcherFooter

* Remove ProductPageSkeleton

* Include productId in determination of whether editor is loading

* Handle variation loading

* Fix rebase merge conflict mistakes

* Fix layout margins

* Show welcome tour and feedback bar after editor has loaded

* Changelogs

* Make loading context experimental
2024-02-14 09:57:17 -05:00
Matt Sherman a619aba5ee
Product Editor: load translations (#44520)
* Clarify when the custom message is used in useConfirmUnsavedChanges

* Changelog

* Load translations for wc-navigation and wc-product-editor scripts

* Changelog
2024-02-13 15:38:04 -05:00
Fernando Marichal 75791b2aff
Add visibility section to pre-publish panel (#44434)
* Add visibility-section

* Fix generic checkbox

* Move visibility-section

* Add isPasswordRequired to store

* Change password checked

* Add tracks events

* Fix generic checkbox

* Add changelog

* Create reequire-password component

* Create CatalogVisibility component

* Use CatalogVisibility component

* Add changelog

* Fix lint

* Remove requirePassword from store

* Add useEffect to update checkbox

* Remove object spread from state

* Remove empty line

* Fix useEffect

* Refactor if in useEffect

* Refactor catalog-visibility

* Modify useEffect

* Remove not used import
2024-02-13 10:09:06 -03:00
Fernando Marichal dd64e2724a
Refactor section and subsection blocks (#44502)
* Add section-header component

* Use section-header and remove inventory-email scss

* Add changelog

* Rename file type
2024-02-09 15:47:02 -03:00
Maikel Perez f68467ff96
Filtering product variations by attributes that are not associated to any generated variations leads to blank variations results (#44505)
* Add empty state when filtering variations by attribute terms and the response is empty

* Add changelog file

* Fix linter errors
2024-02-09 15:46:34 -03:00
Maikel Perez 0d52fdb738
Toggle Visibility doesn't seem to work always as it should in the product variations (#44508)
* Fix toggle visibility on bach update variations

* Add changelog file
2024-02-09 15:46:24 -03:00
Fernando Marichal 30f66aa94f
[Product editor block]: Rename the Add button to Publish (#44461)
* Rename Publish button

* Fix e2e tests

* Add changelog

* Add WC changelog

* Modify "Product published" copy
2024-02-09 15:19:35 -03:00
Nathan Silveira 596bf271ab
Prepare product-editor package for release 2.0 (#44507) 2024-02-09 12:45:22 -04:00
Fernando Marichal a89d2572f0
Product Editor: Subsection block (#43725)
* Add SubsectionInterface

* Replace use of add_section inside sections

* Add Subsection class

* Add subsection block component

* Add subsection-description block

* Update deprecation note

* Add changelogs

* Fix lint

* Add get_subsection_by_id

* Add tests

* Fix ProductFormTemplate lint

* Fix CustomProductFormTemplateTest lint

* fix readme

* Fix lint

* Replace add_section with add_subsection

* Fix readme

* Fix markdown file multiple headings duplication
2024-02-08 15:44:49 -03:00
Paul Sealock c6e11562ac
Remote Specs Testing package: Add new package (#44419) 2024-02-08 12:46:26 +13:00
Fernando Marichal 19a78cd176
Add pre-publish sidebar (#44331)
* Add prepublish sidebar

* Add openPrepublishSidebar to store

* Add changelog

* Rename modal and small refactor

* Add feature flag

* Move prepublish sidebar

* change import path

* Rename classes

* Fix width

* Fix styles

* Rename prepublish panel

* Rename div class

* Remove onSuccess from PublishButton

* Fix panel position

* Use actions instead of sidebar

* Add wc-admin changelog

* Move changelog

* Fix lint
2024-02-07 15:30:33 -03:00
Guilherme Pressutto 4dcc7d8bf8
Make state optional when filling address with e2e-util (#44090)
Co-authored-by: Francesco <frosso@users.noreply.github.com>
2024-02-06 09:30:53 -08:00
Matt Sherman 68247d13de
Product Editor: Export recent SlotFills as __experimental (#44285)
* Make header slotfills experimental

* Make variation quick update menu items experimental

* Changelog
2024-02-06 09:33:24 -05:00
Maikel Perez 26bcbb0417
Add an empty state to the variations table when there are no options added yet (#44163)
* Create variation empty state when no variable attributes are asigned to the product

* Add changelog file

* Remove the Add new button when a custom empty state is set

* Conditionally invalidate resolution before requesting a new variations page
2024-02-05 18:00:37 -03:00
Matt Sherman 7e7b78f943
[create-product-editor-block] Fix product editor block registration (#44194)
* Use registerProductEditorBlockType

* Changelog

* Update changelog to provide more detail
2024-02-05 15:59:39 -05:00
Damián Suárez 35b5677860
[Product Block Editor]: fix the top area for the dashboard (#44370)
* fix the padding-top for the dashboard

* changelog
2024-02-05 15:11:21 -03:00
Damián Suárez 4492698340
[Product Block Editor]: use Label component to render Textarea field block label (#44222)
* use Label to render base control label

* changelog
2024-02-02 18:57:41 -03:00
Damián Suárez 207e8de73d
[Product Block Editor]: add plain and rich text mode to the Textarea field block (#44191)
* introduce `mode` attribute

* move block props to wrapper el

* render plain text mode

* minor const name change

* changelog

* add toolbar buttons only in rich-text mode

* set rich-text mode as default
2024-02-02 16:04:01 -04:00
Damián Suárez 951e5ecce6
[Product Block Editor]: redefine the app dashboard size (#44166)
* chnages how to define the editor dashboard size

* remove onBlur stuff from summary block

* add a @todo note about dashboard padding top

* changelog
2024-02-02 15:57:28 -04:00
Damián Suárez f1236696d9
[Product Block Editor]: use Textarea block in the variation description field (#44151)
* use text-area for variation desctiption field

* changelog

* tweak // Translators string

* use var to define textarea border color

* remove optional from description label
2024-02-02 15:50:36 -04:00
Maikel Perez eaa791f7da
Hide Downloads section under Toggle for product variations (#44152)
* Create DownloadableProductTrait for common downloadable blocks creation

* Use DownloadableProductTrait in SimpleProductTemplate

* Use DownloadableProductTrait in ProductVariationTemplate

* Remeber downloadable files in product variations

* Add changelog file

* Fix php linter error

* Unlink downloads and downloadable product props so they can be managed separately

* Remove invalid margin bottom from the uploader label

* Add changelog file
2024-02-02 10:04:42 -03:00
Nathan Silveira 862383e1eb
Fix invalid value being propagated on change event for number input (#44195) 2024-02-01 12:49:12 -03:00
Maikel Perez 861cc7cc02
Add common options to the variations options empty state (#44001)
* Always show Variation options and Variations sections within the Variations tab

* Remove woocommerce/product-variations-fields block since it's not needed anymore

* Create ProductTShirt image for variation options empty state

* Add renderCustomEmptyState to the attribute control component to be able to set a not default empty state

* Render a custom empty state for variation options

* Adds defaultSearch prop to NewAttributeModal so it can be used to start searching right after the modal is shown

* Let the empty state adds an attribute that matches a given text

* Add changelog files

* Fix linter errors
2024-02-01 11:18:23 -03:00
github-actions[bot] 495bf4eeb2
Prepare Packages for Release (#44211)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-01-31 18:58:06 +13:00
Fernando Marichal e703b3d947
Add slotFills for header items (#43687)
* Add slotFills for header items

* Refactor plugin-header-items

* Add changelog

* Remove order prop

* Fix lint

* Change constant name

* Rename constant

* Add callback to fills

* Make icon not required

* Add fallback plugin
2024-01-30 16:58:20 -03:00
Damián Suárez 05aa24df0b
[Product Block Editor]: introduce note attribute to Label component (#44198)
* do not use createInterpolateElement

* introduce `note` to Label component

* changelog
2024-01-30 16:40:30 -03:00
Nathan Silveira e0728e6d11
Fix undefined meta_data on slow connections (#44197) 2024-01-30 18:08:08 +00:00
Damián Suárez 20fe832f8b
[Product Block Editor]: fix e2e test that happens in the text-area block (#44184)
* add components-summary-content class to rich text

* changelog
2024-01-30 12:33:52 -03:00
Nathan Silveira c1a5b60245
Add isLoading to useProductMetadata hook (#44156)
* Add isLoading to useProductMetadata hook

* Add unit test

* Rename `updateMetadata` to `update`

* Remove content from inside useSelect
2024-01-30 10:05:01 -03:00
Paul Sealock 740c5e40ae
Create-woo-extension: Update WC version (#44107)
* Update version

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-29 21:29:37 +00:00
Damián Suárez 74d0b39bb0
[Product Block Editor]: introduce TextArea field block (#44104)
* introduce TextAreaBlockEdit block

* reglister text area block

* use text-area block in the summary block

* changelog

* changelog

* fix whitespace lint issue

* remove unused types

* intrduce placehholder attribute

* property is the only required attribute

* tidy block attributes

* use useProductEntityProp()

* define fallback value

* remove unused CSS class

* organize attrs

* do not implement tooltip yet

* fix eslint error

* update text-area keywords
2024-01-29 17:14:17 -03:00
Nathan Silveira 8e79cfa3ea
Fix product editor UI misbehaving in Calypso (#44132)
* Fix product editor UI misbehaving in custom adminmenu widths (e.g. Calypso)

* Extract logic to useAdminSidebarWidth hook
2024-01-29 14:09:06 -05:00
Damián Suárez cd3feaa3dd
[Product Block Editor]: always show "loading" state when choosing suggested products (#44053)
* add forceRequest param

* changelog

* force request when getting suggestions for linked
2024-01-24 19:08:40 -03:00
Damián Suárez aaf9981e90
[Product Block Editor]: improve getting suggested products from linked product section (#44047)
* introduce getSuggestedProductsFor helper

* use suggested products to get choices

* update helper to the data store

* changelog
2024-01-24 18:11:31 -03:00
Damián Suárez 65d71fa1e2
Data: reduxify suggested products (#44043)
* use Thunks in wc/admin/products store

* first implementation

* changelog

* fixing tests

* remove unused __meta prop

* update constant name

* fix eslint issue
2024-01-24 16:56:41 -04:00
Matt Sherman 1ea439fb61
[Product Editor] Variation quick actions succeed when sku is inherited from parent (#44017) 2024-01-24 09:50:00 -05:00
Nathan Silveira c7d4c88270
Expose metadata as object from useProductMetadata hook (#43860)
* Add useParentMetadata hook

* Move functionality to existing useProductMetadata hook

* Update changelog

* Remove deleted hook from index

* Update useProductMetadata API and unit tests
2024-01-23 17:50:36 -03:00
Fernando Marichal 2acbb3d3fb
Add slotFill for variation menus (#43441)
* Add slotFills to main variation actions

* Add slotFills to groups

* Create variation-actions component

* Add references

* Remove file and change reference

* Add Dropdown

* Add styles

* Add changelog

* split variation-actions-menu

* Add tests

* Remove variation-actions-menu and variations-actions-menu

* Rename variation-actions and add tests

* Rename VariationSingleUpdateMenuItem

* Rename single-update

* Add supportsMultipleSelection and slotFill rename

* Add component export

* Rename groups

* Show multipleSelection items in both components

* Take fills as MenuItems

* Remove __experimental from slotFill

* Fix lint

* Add onClick to slotFill

* Rename constant QUICK_UPDATE, add new constant

* Add tests for getGroupName and getMenuItem

* Rename variation-actions tests

* fix test description

* Add onChange, onClose and selection to slots

* Refactor slotFill

* Refactor slotFill file

* Rename QuickUpdateMenu to MultipleUpdateMenu

* Modify tests

* Fix test name

* Improve import

* Always return array of selected items

* Create MenuGroup for every extension menu items

* Group fills
2024-01-23 11:27:03 -05:00
louwie17 1a4ebebf6a
Fix description toolbar with latest GB version (#43835)
* Initial changes to fix the toolbar in the iframe editor

* Moved toolbar to header and respect fixedToolbar preference

* Only render Gutenberg toolbar with specific version

* Update GB version

* Fix build issue

* Add fixed toolbar menu

* Remove unused import

* Add changelogs

* Fix lint errors

* Fix PHP lint error
2024-01-23 11:17:37 -04:00
Maikel Perez 26a546954a
Hide Downloads section under Toggle (#43864)
* Add Include downloads to show/hide the Downloads section

* Fix margin top for none first child nested sections

* Add changelog files

* Fix php linter errors
2024-01-23 12:12:52 -03:00
Maikel Perez 4c29a65378
Track Linked Products feature events (#43828)
* Track  (props:  ids,  ids)

* Track  ( props:  ( template id ),  : ( if unsupported or not ) )

* Track  ( props:  ( template id ) )

* Track  ( props: :  | , same as product value )

* Fix advice card to support persistent dismiss via a preference id or non persistent one using the local state

* Track  ( props: :  | , same as product value )

* Track  ( props: :  | , same as product value )

* Track  ( props: :  | , same as product value )

* Track  ( props: :  | , same as product value )

* Add changelog file

* Fix linter error

* Track linked_products_product_add when adding a new product to the linked product list
2024-01-22 14:18:31 -04:00
Christopher Allford db8da8d712
Properly Configured Wireit Production Builds (#43716) 2024-01-22 10:13:45 -08:00
Maikel Perez d174fb39db
[Enhancement] Add a featured product button (#43664)
* There's a star button on the right side of the name field. It's centered vertically.

* Clicking it marks the product as featured

* When hovered, we show a tooltip that reads: Mark as featured

* When clicked, the icon changes from star-outline to star-filled. Clicking it again reverts to the original icon.

* Add changelog file

* Change the tooltip text depending on the featured flag
2024-01-19 12:03:11 -03:00
Maikel Perez aa57be7c97
Hide the product type selector dropdown when click outside (#43798)
* Hide the product type selector dropdown when click outside

* Add changelog file
2024-01-19 08:32:59 -04:00
Matt Sherman 824dc6be51
Remove BlockTemplateRegistry (#43589) 2024-01-17 07:12:12 -05:00
Damián Suárez 8878f00707
[Product Block Editor]: show three products by default in the Linked Products tab (#43698)
* pick three products by default

* changelog
2024-01-17 05:33:18 -03:00
Matt Sherman 3838975b24
[Product Editor] Fix blank editor when clicking Add New while already in editor (#43702) 2024-01-16 13:04:48 -05:00
Damián Suárez 0d878afb8e
[Product Block Editor]: add loading for the `Choose products for me` button (#43656)
* store is loading when chossing products for me

* disable choose btn when it's loading

* changelog

* restore is busy animation styles when disables

* restore changes

* fiox rebase issue

* restore disabling button
2024-01-16 10:35:03 -03:00
Damián Suárez ea3504b372
[Product Block Editor]: exclude the current product from the suggested ones to use in the Linked Product tab (#43662)
* exclude the current product from the suggested list

* changelog
2024-01-16 09:05:04 -04:00
Damián Suárez 68fa0dd338
[Product Block Editor]: fallback with random products when no related products (#43584)
* add fallbackToRandomProducts option to getRelatedProducts()

* fallback to random when there isn't related products

* changelog

* update and tweak doc

* introduce POSTS_NUMBER_TO_PICK const
2024-01-16 09:13:55 -03:00
Christopher Allford 95bc1189e5
Update `wireit` & Optimize Builds (#43595)
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
2024-01-15 14:06:55 -08:00
Fernando Marichal d929994afb
Show feedback prompt only once (#43164)
* Show feedback prompt only once

* Add changelog

* Fix feedback prompt

* Move changelog

* Fix feedback prompt visibility

* Add modalShown logic to ces
2024-01-15 13:44:38 -04:00
Damián Suárez 8974b86a04
[Product Block Editor]: relocate block actions in the sections area (#43555)
* handle section actions styles from section block

* rename DownloadBlockEdit

* remove unneeded wrap el from linked product list

* put Choose an Image button in the actions section

* move attribute control to block actions section

* changelog

* remove unused clientId prop

* tweak Image button

* remove `should show subtitle and "Add new" button` test
2024-01-15 11:02:54 -03:00
Christopher Allford 758df4854d
Use `ci-jobs` Utility For `ci.yml` Matrix (#43532)
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
2024-01-12 20:32:14 -08:00
Maikel Perez 4f8922aa0b
Remove Variable product template from the product template list (#43422)
* Remove variable-product-template from the product template list

* Add changelog files

* Redirect the variable product to the new experience now that is does not have a product template anymore

* Fix php linter error
2024-01-12 18:47:15 -03:00
louwie17 ec85c4bd4a
Fix variations initial load (#43583)
* Retrieve new variations if not already generating

* Add changelog

* Fix lint error
2024-01-12 17:13:22 -04:00
Matt Sherman ee6642e0c7
Product Editor: Load layout templates from the REST API (#43384)
* Move ProductTemplate type

* useProductTemplate

* Use useProductTemplate

* Use useLayoutTemplate

* Handle if window.productBlockEditorSettings doesn't exist

* Unit tests for useProductTemplate

* Fix fallback in useProductTemplate

* Remove layoutTemplates from ProductEditorSettings on client

* Fallback to simple-product layout template

* Unit test to verify the standard product template is used if product type is variable

* Use standard product template if product type is variable

* Unit test to verify product type is used to match if product template id matches a template with a different product type

* Make sure product type matches on product template, unless variable, in which case we match simple

* Remove layoutTemplates and layoutTemplateEvents from global

* Changelog

* Changelog

* Import types only
2024-01-12 11:54:35 -05:00
Damián Suárez ec2a3f839f
[Product Block Editor]: introduce `<SectionActions />` slot (#43540)
* pick clientId by using hook

* do not pass clientId to BlockFill component

* pick clientId from core hook

* introduce SectionActions slot component

* expose SectionActions slot component

* fix ts issue

* changelog

* fix closing component bug

* do not pass clientId to the BlockSlot instance

* revert changes in the description block

* fix name for the section actions component

* export section actions properly

* add a warning when the slot DOM doesn't exist

* define the name explicitely

* export SectionActions component name

* import SectionActions from product list cmp

* rename ProductListBlockEdit component fn
2024-01-12 10:20:39 -03:00
Nathan Silveira 97fecbd605
Replace Tooltip on Label and checkbox controls (#43513)
* Replace wordpress Tooltip with woocommerce Tooltip

* Add nowrap to links inside tooltip

* Add margin-left to tooltip

* Move logic to handle not opening multiple popovers to inside tooltip component

* Add changelogs

* Remove unused prop
2024-01-11 21:49:50 -03:00
Damián Suárez 47e1f50ae2
[Product Block Editor]: implement `Choose products for me` button (#43520)
* implement `Choose products for me` button

* clean

* selectSearchedProductDispatcher accepts products array

* rename component with LinkedProductListBlockEdit

* pull and set linked products from choose button

* changelog

* rollback minor changes

* fix typo in fn

* pull the related product from core entities

* minor
2024-01-11 17:33:07 -03:00
Damián Suárez d0d056c60e
Data: add selector to get related products (#43489)
* add getRelatedProducts to get related products

* changelog

* add a resolver to pull the related products

* minor jsdoc enhancement

* query Product params should be optional

* fix ES issue

* minor TS enhancement

* use createSelector() helper
2024-01-11 12:56:59 -03:00
Damián Suárez c487c84778
[Product Block Editor]: use AdviceCard empty state sections (#43405)
* use AdviceCard for Grouped product

* AdviceCard is not dismissible for grouped

* replace custom implementation with AdviceCard cmp

* changelog
2024-01-10 18:11:41 -03:00
Nathan Silveira 00d205626d
Use different delays for initial click and hold when incrementing number on NumberControl (#43479) 2024-01-10 17:38:09 -03:00
Maikel Perez 1ad48760c9
Redirect supported product types to the new experience based on the product template associated to it (#43341)
* Redirect supported product types to the new experience based on the product template associated to it

* Add changelog file

* Fix linter error

* Redirect using the product type first and then the associated product template

* Set the product template id also for unsupported product templates

* Add changelog file

* Remove supported_product_types from the RedirectionController since the product_templates is used instead

* Fix php linter error
2024-01-09 18:31:25 -03:00
Nathan Silveira 548987d758
Add step buttons for Number block and component (#43045)
* Add showStepButtons attribute for Number block and component

* Use native step buttons

* Revert "Use native step buttons"

This reverts commit 8425d17399.

* Use custom step buttons and hide them when field is not focused

* Revert type="number" as it's not working well with number formatting

* Disable autocomplete

* Remove leftover showStepButtons from documentation

* Prevent default event when pressing up/down

* Change to onKeyDown event

* Implement timeout to hold + and - buttons

* Remove unnecessary onBlur and prevent default event when onKeyUp

* Fix TS issue

* Update changelog
2024-01-09 18:08:38 -03:00
Matt Sherman 4114f989e5
Implement useLayoutTemplate hook (#43347)
* Add @wordpress/core-data dependency

* Update lock file

* Implement useLayoutTemplate

* Changelog

* Allow layoutTemplateId param to be undefined

* Only enable useEntityRecord when layoutTemplateId is set

* Workaround for query made when layoutTemplateID is not set

* Use getEntityConfig instead of getEntity

* Update comment with core-data version

* Add doc for useLayoutTemplate
2024-01-09 15:42:20 -05:00
Damián Suárez 9dce7fc71d
[Product Block Editor]: improve and tweak AdviceCard component (#43427)
* rename image prop with children

* update AdviceCard usage

* tweak AdviceCard styles

* tweak advice cards in the Linked Product feature

* changelog

* tweak story layout
2024-01-09 16:43:34 -03:00
Damián Suárez ed5c7b265c
[Product Block Editor]: Add new image components (#43383)
* remove unused image component

* add Shirt image component

* add Glasses image component

* changelog
2024-01-09 11:49:49 -03:00
Damián Suárez d9fd8cee20
[Product Block Editor]: tweak styles and layout of AdviceCard component (#43272)
* set max height for the AdviceCard component

* changelog

* remove Flex components

* tweak dismiss button size

* update changelog

* tweak layout depending on isDismissible or not

* set min-height fior advice card instead

* add bottom padding to card boddy
2024-01-08 15:45:56 -03:00
Nathan Silveira 245fea22ac
Provide recently updated data for the validate function in the useValidation hook (#43320)
* Allow providing recently updated data for the validate function in the useValidation hook

* set newData parameter as optional
2024-01-08 12:12:10 -03:00
Maikel Perez a7627fbf0e
Linked product list empty state (#43163)
* Add product search field to the linked product list block

* Add empty state to the linked product list block

* Fix AdviceCard styles

* Create skeleton for the linked product list block

* Fix linter errors

* Move the product list skeleton to the product list component folder

* Revert AdviceCard changes

* Remove upsells and cross-sells block to use linked-product-list block instead

* Add changelog files
2024-01-05 15:26:06 -05:00
Nathan Silveira d2636f55f8
Add HOC to hide inventory collapsible block when nothing is inside it (#43228)
* Add expression-evaluation package

* Export useEvaluationContext

* Add HOC to hide collapsible block when nothing is inside it

* Add changelog

* Create a separate place for WP hooks and move existing hook to it

* Reintroduce line deleted automatically

* Refactor to useSelect
2024-01-05 15:01:12 -03:00
Maikel Perez da04df38b4
Fix performance issue when modifying product metadata (#43299)
* Fix performance issue when modifying product metadata

* Add changelog file

* Fix linter error
2024-01-04 15:38:00 -05:00
Damián Suárez 17c8354ad9
[Product Block Editor]: Be able to dismiss AdviceCard instances (#43124)
* introduce packages/js/data/src/user/types.ts pref

* be able to dismiss the Upsells advice

* rename user pref key

* typify product_advice_card_dismissed prop

* store is dismissed state in the user pref

* delegate the dismiss state to the component

* changelog

* remove console.log :'(

* fix TS issue

* fix TS issue

* changelog
2024-01-04 12:17:03 -03:00
Ron Rennick 8550da9959
bump php version in packages/js/*/composer.json (#42020)
* bump php version in packages/js/*/composer.json

* add package changelogs

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-01-04 10:18:34 -04:00
Maikel Perez f34bb52f9e
Linked product list (#43145)
* Create and register product-linked-list-field block

* Add upsells and cross-sells blocks to the simple product template

* Create formatted price component

* Add linked product table to the linked product list block

* Add remove product button to each product row

* Add see product page button

* Add link to the product name so it can be edited in a new tab

* Fix some styles

* Add product search field to the linked product list block

* Fix styles

* Add changelog files

* Fix linter error

* Fix rebase conflicts

* Use useProductEntityProp instead of useEntityProp within product-linked-list-field block

* Move the product list to its own component

* Move the product select to its own component

* Move the product image to its own component

* Fix linter error
2024-01-04 08:34:53 -05:00
Damián Suárez b6f8ab94f5
[Woo beta tester]: add User Preference panel (#43125)
* introduce UserPreference panel

* render user preference panel

* expose UserPreferences type

* introduce force mode to update user pref

* rename global object with `__wcbt`

* changelog

* changelog
2024-01-03 17:42:18 -03:00
Damián Suárez 84ed581215
[Product Block Editor]: add className prop to ButtonWithDropdownMenu component (#43136)
* add className to the ButtonWithDropdownMenu cmp

* chnagelog

* move changelog file location
2024-01-03 08:34:05 -03:00
Tomek Wytrębowicz f35b6e2f9c
Fix sizing of `<SelectControl>` & UI bug for `<ReportFilters>` (#42969)
Fix the style of select control components 

Set `box-sizing` to `border-box`, to prevent `<SelectControl>` from being wider than its container.
2024-01-02 22:42:19 +01:00
Fernando Marichal 89c82f00e6
Add tooltip attribute to Pricing field (#43144)
* Add tooltip attr to Pricing field

* Remove Fragment reference

* Add tooltip to regular price

* Add tooltip to sale price

* Remove "labelToShow" const

* Add changelog
2023-12-29 16:42:59 -03:00
Fernando Marichal cb9bd1ae76
Revert "Show feedback bar only once (#41787)" (#43178)
* Revert "Show feedback bar only once (#41787)"

This reverts commit defa590f32.

* Add changelog
2023-12-29 16:33:59 -03:00
Alexandre Lara 4efd2123a3
[Docs] Update links from WooCommerce.com to Woo.com for the Woo Blocks documentation (#43055)
* Update woocommerce.com URLs in documentation and code files

* Add changelog

* Fix github repository link in extend-rest-api-add-custom-fields.md

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>

* Add github reporter (#42974)

* Add github reporter

* Add changelog

---------

Co-authored-by: Jon Lane <jon.lane@automattic.com>

* Fix product task redirect to support grouped and external products (#43051)

* Rearrange product redirection logic to better accept grouped and external produc types

* Add changelog

* Modify feedback modal actions (#43005)

* Adapt feedback modal actions

* Add changelogs

* Modify comments

* Fix tests

* Fix test

* Update class-wc-gateway-bacs.php (#43054)

* Update class-wc-gateway-bacs.php

Fix typo in textdomain

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

---------

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

* [Product Block Editor]: Add `Linked product` tab (#43009)

* add linked-products to group IDs

* add Linked Products tab

* tweak hideConditions condition

* changelog

* fix typo in doc comment

* Introduce a product type selection within the new experience (#41823)

* Create a relation between the product type and the product block template

* Add 'patterns' to name the kind of products that can be created for a specific template

* Resolve template using its id as a template query param

* Rename ProductEditPattern to ProductTemplate

* Rename get_patterns hook to woocommerce_product_editor_get_product_templates

* Return the list of templates to the client

* Set layout template events as array

* Register the layout template based on the product template or the post type in case of product variations

* Registering non supported product types

* Create and register the woocommerce/product-details-section-description block

* Add the product type to the section description

* Create product type selector

* Fix menu item style

* Highlight selected menu item

* Set the selected product template

* Set product template title to lowercase in the content description

* Rename blocks by blockTemplates under the AbstractBlockTemplate class

* Rename to woocommerce_product_editor_product_templates filter

* Remove product_template_ prefix from the supported_product_types map

* Rename get_formatted to to_JSON and convert the props to client side like

* Refactor get_product_templates

* Fix icon resolution

* Add a confirmation modal for unsupported product templates

* Add changelog files

* Remove product types using for testing

* Fix redirection when changing to a non supported product template

* Set the change button state to busy when it is saving the product

* Fix php linter errors

* Fix rebase conflict

* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace

* Add the to_json definition to the BlockTemplateInterface

* Create default product template by custom product type if it does not have a template associated yet

* Fix some comments and product template creation validation

* Add support to load the product template icon from an external resource

* Fix php linter

* Fix the changelog description

* [Experimental] Interactivity Dropdown multi-select mode, ratings filter and introduce each directive (#42981)


---------
Co-authored-by: David Arenas <david.arenas@automattic.com>

* Introduce the transient files engine (#42877)

Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>

* Change marketplace install API request to POST instead of GET (#43033)

* Change marketplace install API to using POST instead of GET
* Fix linting error
* Add changefile(s) from automation for the following project(s): woocommerce

---------

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

* Prep trunk for 8.6 cycle (#43021)

Prep trunk for 8.6 cycle with version bump to 8.6.0-dev

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Add Playwright tests for All Reviews, Reviews by Product and Reviews by Category blocks (#42903)

* Remove Reviews blocks Puppeteer tests

* Minor code cleanup

* Typos

* Create publishAndVisitPost() editor util

* Fix subcategories when importing products in Playwright and add reviews

* Add Reviews blocks tests in Playwright

* More typos

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

* Create a 'reviews' object in data.ts so we can store reviews data in one single place

* Update test so instead of creating a new post in each test, we go to the already-created post

* Add source comments to reviews data to match it with the script

---------

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

* Release: Remove 8.5 change files (#43022)

Delete changelog files from 8.5 release

Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>

* Delete changelog files based on PR 43033 (#43079)

Delete changelog files for 43033

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Delete changelog files based on PR 43051 (#43081)

Delete changelog files for 43051

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* Interactive Price Filter: use `context` instead of `state` (#42980)

* feat: use context instead of state

* fix: temporary move the context to inner element for diffing to work

* fix: update context before navigation for optimistic UI

* Load google analytics gtag script asynchronously in WooCommerce Blocks (#43040)

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

* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build (#43074)

* set WOOCOMMERCE_BLOCKS_PHASE to 1 for the production build

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

---------

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

* Revert "Fix schedule sales error" (#43094)

Revert "Fix schedule sales error (#42700)"

This reverts commit 9b800aa179.

* [Product Block Editor]: add Linked product sections. First approach. (#43013)

* add Linked products, Upsell section

* changelog

* add Cross-lens section

* add links to the Upsell sections

* changelog

* fix lint issues

* fix lint issus

* fix linting issue :-|

* check whether the linked product group is defined

* [Product Block Editor]: introduce ShoppingBags component (#43042)

* add ShoppingBags component

* Add ShoppingBag story

* changelog

* Fix: Collection data being leaked between Collection Filters blocks (#43044)

* fix: CYS - change heading color (#43076)

* fix: CYS - change heading color

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

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>

* Delete changelog files based on PR 43074 (#43118)

Delete changelog files for 43074

Co-authored-by: WooCommerce Bot <no-reply@woo.com>

* [Product Block Editor]: fix feature flag to hide the Linked products (#43119)

* fix flag to hide/show product editor

* changelog

* Add changelog

---------

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Jonathan Lane <lanej0@users.noreply.github.com>
Co-authored-by: Jon Lane <jon.lane@automattic.com>
Co-authored-by: louwie17 <lourensschep@gmail.com>
Co-authored-by: Fernando Marichal <fernando.marichal@automattic.com>
Co-authored-by: Marc Guay <marc.guay@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
Co-authored-by: Maikel David Pérez Gómez <maikel.perez@automattic.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Néstor Soriano <konamiman@konamiman.com>
Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com>
Co-authored-by: Kyle Nel <22053773+kdevnel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: WooCommerce Bot <no-reply@woo.com>
Co-authored-by: Alex López <alex.lopez@automattic.com>
Co-authored-by: Tung Du <dinhtungdu@gmail.com>
Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2023-12-29 12:28:11 -03:00
Damián Suárez b36023e8aa
[Product Block Editor]: render empty state for the Cross-sells section (#43143)
* introduce cross-sells product field block

* export Cross-sell block

* add Cross-sells block instance into the Cross-sell section

* fix importing image bug

* changelog

* changelog

* remove unexpected console.log instance
2023-12-28 09:06:01 -05:00
Niels Lange 591adc6248
Fix typo introduced in #43116 (#43148)
* Fix typo introduced in #43116

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-12-28 14:14:50 +07:00
Damián Suárez 35a4f077cf
[Product Block Editor]: render empty state for the Upsells section (#43116)
* Upsells block: scafolding

* export Upsells block

* add Upsells block into the Upsells section

* render empty state for the Upsells section

* iadd hardcoded isEmpty flag

* changelog
2023-12-27 19:40:03 -03:00
Damián Suárez 378f610d3a
[Product Block Editor]: add CashRegister image component (#43127)
* rename shipping bags folder

* introduce CashRegister image component

* simplify Shopping bags story

* changelog

* clean svg code

* remove unused React lib from story
2023-12-27 19:38:51 -03:00
Damián Suárez ccdfb16fc8
[Product Block Editor]: Introduce ButtonWithDropdownMenuProps component (#43103)
* first approach

* improve story. fix TS issues

* support `variant` prop

* add position props

* add offset popover prop

* reorganize popover props

* changelog

* set component roles

* rotate chevron when opened

* Introduce defaultOpen prop

* export component

* improve story

* ensure 1px of gap

* reorganize types

* change API. Add Readme,md

* dropdownButtonLabel is optional

* fix border-radious

* minor change in doc

* pass down defaultOpen prop
2023-12-27 12:29:37 -03:00
Maikel David Pérez Gómez 2a4c4e8e1e
Product template association (#43120)
* Load the product template from the product meta data

* Save product template id as part of the product meta data

* Add changelog file

* Fix linter error
2023-12-26 15:11:17 -05:00
Damián Suárez 5ee2447145
[Product Block Editor]: Introduce AdviceCard component (#43082)
* introduce AdviceCard component

* import advice card styles

* add onDismiss() prop

* tweak border style

* implement dashed border

* log the onDismiss function

* changelog

* tweak layout

* tweak card border style
2023-12-26 15:54:29 -03:00
Damián Suárez 67e01c1f6b
[Product Block Editor]: introduce ShoppingBags component (#43042)
* add ShoppingBags component

* Add ShoppingBag story

* changelog
2023-12-25 09:21:29 -03:00
Damián Suárez 7be2481381
[Product Block Editor]: add Linked product sections. First approach. (#43013)
* add Linked products, Upsell section

* changelog

* add Cross-lens section

* add links to the Upsell sections

* changelog

* fix lint issues

* fix lint issus

* fix linting issue :-|

* check whether the linked product group is defined
2023-12-22 18:44:44 -03:00
Maikel David Pérez Gómez a592a473d3
Introduce a product type selection within the new experience (#41823)
* Create a relation between the product type and the product block template

* Add 'patterns' to name the kind of products that can be created for a specific template

* Resolve template using its id as a template query param

* Rename ProductEditPattern to ProductTemplate

* Rename get_patterns hook to woocommerce_product_editor_get_product_templates

* Return the list of templates to the client

* Set layout template events as array

* Register the layout template based on the product template or the post type in case of product variations

* Registering non supported product types

* Create and register the woocommerce/product-details-section-description block

* Add the product type to the section description

* Create product type selector

* Fix menu item style

* Highlight selected menu item

* Set the selected product template

* Set product template title to lowercase in the content description

* Rename blocks by blockTemplates under the AbstractBlockTemplate class

* Rename to woocommerce_product_editor_product_templates filter

* Remove product_template_ prefix from the supported_product_types map

* Rename get_formatted to to_JSON and convert the props to client side like

* Refactor get_product_templates

* Fix icon resolution

* Add a confirmation modal for unsupported product templates

* Add changelog files

* Remove product types using for testing

* Fix redirection when changing to a non supported product template

* Set the change button state to busy when it is saving the product

* Fix php linter errors

* Fix rebase conflict

* Move ProductTemplate to Automattic\WooCommerce\Admin\Features\ProductBlockEditor namespace

* Add the to_json definition to the BlockTemplateInterface

* Create default product template by custom product type if it does not have a template associated yet

* Fix some comments and product template creation validation

* Add support to load the product template icon from an external resource

* Fix php linter

* Fix the changelog description
2023-12-21 18:45:31 -05:00
Fernando Marichal 350fb94d8d
Modify feedback modal actions (#43005)
* Adapt feedback modal actions

* Add changelogs

* Modify comments

* Fix tests

* Fix test
2023-12-21 15:42:47 -03:00
Nathan Silveira 0dac985d8e
Prepare @woocommerce/product-editor for 1.2.0 release (#42991)
* Prepare @woocommerce/product-editor for 1.2.0 release

* Fix typo
2023-12-20 11:46:12 -03:00
Nathan Silveira 8a07e61db5
Expose Taxonomy and TaxonomyMetadata types (#42962)
* Expose Taxonomy and TaxonomyMetadata types

* Apply suggestions from code review

Co-authored-by: Damián Suárez <rdsuarez@gmail.com>

---------

Co-authored-by: Damián Suárez <rdsuarez@gmail.com>
2023-12-20 10:06:34 -03:00
Nathan Silveira ddd877441c
Add useProductMetadata hook (#42961)
* Add useProductMetadata hook to perform update in multiple meta entries at same time

* Update type to string

* Add test

* Remove unused parameters
2023-12-19 17:17:08 -03:00
Nathan Silveira f83a2a8ae8
Add step prop to NumberControl (#42928)
* Add step prop to NumberControl

* Add step to block attributes as well

* Add documentation
2023-12-19 15:43:36 -03:00
Damián Suárez 5d20ab5ffa
[Product Block Editor]: expose Label component (#42959)
* expose Label component

* changelog
2023-12-19 15:16:50 -03:00
Nathan Silveira 1cf4b20fdd
Support HTML in checkbox-control tooltip (#42926)
* Support HTML in checkbox-control tooltip

* Add HTML support for tooltip in label
2023-12-19 14:44:42 -03:00
Damián Suárez 3faedf24d9
[Product Block Editor]: add story for Label component (#42953)
* [Product Block Editor]: add story for Label component

* changelog

* add simple Label story

* add Product Editor pkg to Storybook app:
2023-12-19 13:09:30 -03:00
Maikel David Pérez Gómez cecf452faa
Move action button ( reorder and add products ) inline with the section header (#42929)
* Create BlockSlotFill component

* Add section-actions BlockSlot to the section-block

* Fill the section actions BlockSlot from the ProductList action buttons

* Add changelog file

* Use the BlockSlot/BlockFill to define the description of a section-block

* Pick the closest ancestor that contains the Slot
2023-12-18 15:53:59 -05:00
Maikel David Pérez Gómez 1c3843e4ec
Remove list/sale price from the General tab in grouped products (#42909)
* List and sale price should not be visible in the general tab for grouped products.

* Add changelog files

* Fix lint error
2023-12-18 16:26:38 -04:00
Nathan Silveira 09bcb3fcac
Add support for appending a unique string to the filename for the wp/v2/media endpoint (#42702)
* Extract 'downloadable product' class and include it for API endpoint calls as well

* Re-add mediauploader component

* Restore UploadFilesMenuItem

* Provide additionalData type

* Restore MediaUploader component

* Lint PHP

* Add changelogs

* Update pnpm-lock

* Revert "Update pnpm-lock"

This reverts commit b61ee5813aa0b7b8b1ea8e71423bedbb6f876139.

* Revert pnpm-lock.yaml

* Fix unit tests

* Use WC_ABSPATH
2023-12-18 14:12:44 -03:00
Christopher Allford bf29119032
Updated PNPM to ^8.12.1 (#42860) 2023-12-18 20:31:49 +13:00
Nathan Silveira ac50320fae
Fix menu not being pinned correctly with certain screen widths (#42791)
* Fix menu not being pinned correctly with certain screen widths

* Move changelog
2023-12-15 12:41:40 -03:00
louwie17 90dc5bad2e
Address some deprecation warnings (#41845)
* Remove use of deprecated conditional block

* Remove use of deprecated context usage

* Remove use of deprecated positoin on Dropdown in favour of popoverProps

* Add changelogs

* Remove unused import

* Fix lint errors

* Remove popoverProps.position with popoverProps.placement

* Update missed items replacing position to placement

* Fix lint error

* Fix placement position

* Update changelogs
2023-12-15 09:45:06 -04:00
Nathan Silveira 2f8ac30097
Prepare create-product-editor-block for 1.3.0 (#42844) 2023-12-15 10:31:05 -03:00
Damián Suárez d996008219
[Product Block Editor]: propagate content from description inner blocks to Modal editor (#42768)
* set description like the property to update

* switch between summary block and block preview

* add todo: comment

* femove duplicated doc comment block

* Use a quick check to improve performance

* expose getContentFromFreeform() helper fn

* parse freeform content to valid blocks

* changelog

* fix TS issue

* changelog
2023-12-15 09:20:02 -03:00
Matt Sherman bf4bdfff3e Changelog 2023-12-14 15:22:04 -05:00
Matt Sherman a31fec1927 Fix typos 2023-12-14 15:21:05 -05:00
louwie17 b406a084e4
Add reorder grouped products option (#42766)
* Add re-order modal

* Consolidate some of the styling and components

* Add changelog

* Only show reorder when products are added, and remove 'x' from reorder modal
2023-12-14 16:01:55 -04:00
Christopher Allford e46d6bd207
Fixed `watch:build` Race Conditions (#42802)
There's currently a bug with `wireit` that makes the watch crash.
Swiching over to `nodemon` until that is resolved will
keep that from happening.
2023-12-13 18:25:16 -08:00
Nathan Silveira 35a68e212c
Update template to use new function register_block_type_from_metadata (#42711) 2023-12-13 10:38:33 -03:00
Christopher Allford 4c4e89bc98
Enhance Build Watching (#42712)
Similarly to `build:project`, a new `watch:build:project`
script will watch individual projects for changes. The
`watch:build` script has been updated so that it does
a deep watch in the same vein as `build`. We have also
hooked up tool-level watching for faster performance.
2023-12-12 12:43:48 -08:00
Damián Suárez 8b9651276a Merge branch 'trunk' into update/product-editor-use-block-preview-in-description-block 2023-12-12 16:56:53 -03:00
Ron Rennick 76b4f39116
remove woocommerce-blocks from text domain substitution (#42017)
* remove woocommerce-blocks from text domain substitution

* restore prior art commented out

* add internal-js-tests composer.json

* covert internal-js-tests/changelog to a folder

* update blocks composer.json

* fix path, add composer install to changelog script

* add woo-ai changelog

* add composer install to beta tester changelog script

* add composer.json to woocommerce-admin

* add changelog folder & file to woocommerce-admin

* add composer install to woocommerce changelog script

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2023-12-12 15:38:20 -04:00
Christopher Allford 4e89debd0c
Fix Jest Preset (#42707)
When using a preset we need to keep in mind that the transformation
paths are relative to the preset, not the consuming package. We get
around this by using `<rootDir>` in the transform paths. However,
doing this means fixing the root directory for all of the jest tests.
This keeps the tests working in the same way but lets us fix the
preset too.
2023-12-12 09:58:13 -08:00
Damián Suárez fcb9b60ced Merge branch 'trunk' into update/product-editor-use-block-preview-in-description-block 2023-12-12 10:59:47 -03:00
Christopher Allford 1c635cda6f
Optimized `wireit` Fingerprinting File Inputs (#42684)
Having an explicit `"files"` definition will allow us to fingerprint
dependencies in `wireit` more granularly. This avoids problems
that can be caused by different source files and directories that
trigger a rebuild in a dependee before a dependent finishes.
2023-12-11 16:21:35 -08:00
Nathan Silveira 120a3dba87
Add meta_data type to Product (#41961) 2023-12-11 14:45:00 -03:00
Damián Suárez 5901533b4a move changelog file to proper location 2023-12-11 14:43:23 -03:00
Damián Suárez b7e4d06a42 set viewport width to 800px 2023-12-11 10:07:56 -03:00
Damián Suárez 871469de7e set 320px height when description has content 2023-12-11 10:06:44 -03:00
Damián Suárez f919a5526f tweak preview box padding 2023-12-11 10:06:44 -03:00
Damián Suárez 8b84134bff clean unused styles 2023-12-11 10:06:44 -03:00
Damián Suárez 61d5b16d30 set preview viewport to 960px 2023-12-11 10:06:44 -03:00
Damián Suárez ff9df643ef get rid of cover element 2023-12-11 10:06:44 -03:00
Damián Suárez 789c849666 replace ContentPreview with BlockPreview core cmp 2023-12-11 10:06:44 -03:00
Christopher Allford 11521bf8e6 Linting Fixes 2023-12-09 23:49:53 -08:00
Christopher Allford a8fd8fafa5 Applied Linting Fixes 2023-12-09 23:32:45 -08:00
Christopher Allford 9bc3e97bbf Load CJS `memize` 2023-12-09 23:18:30 -08:00
Christopher Allford 96af36bf1f Locked `wireit` Version 2023-12-09 21:56:12 -08:00
Christopher Allford a08fdf8698 Updated Lock File 2023-12-09 15:57:05 -08:00
Christopher Allford 4d0cde4b4b Lock File Update 2023-12-09 15:35:55 -08:00
Christopher Allford d244662669 Synchronized Dependencies 2023-12-09 14:40:16 -08:00
Christopher Allford fa011a431b Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
Christopher Allford 1e4d55b36a Updated Documentation 2023-12-09 14:30:29 -08:00
Christopher Allford b0d896c3e3 Refactored Monorepo Setup Action
This makes some adjustments for consistency in style as well as making
improvements to usability and performance. It also updates all of the
pinned hashes to pull in any fixes that have been made.
2023-12-09 14:28:37 -08:00
Christopher Allford fb6424e6f2 Applied Consistent Outputs 2023-12-09 14:26:36 -08:00
Christopher Allford e1fb89ba7f Fixed Test Command 2023-12-09 14:26:36 -08:00
Christopher Allford d015950e86 Wireit Dependencies Set 2023-12-09 14:24:51 -08:00
Christopher Allford 3d79d5f204 Removed Turbo References 2023-12-09 14:22:04 -08:00
Christopher Allford e729417335 Revised Test Command
We will never run all tests concurrently so this is better.
2023-12-09 14:14:47 -08:00
Christopher Allford 40852f2fb6 Fixed Test Commands 2023-12-09 14:13:32 -08:00
Christopher Allford eca3d9754c Add Wireit: Remaining Packages 2023-12-09 14:09:14 -08:00
Christopher Allford 97b5cc48fd Add Wireit: Lots of packages! 2023-12-09 14:05:39 -08:00
Christopher Allford ea67b99607 Sorted Package Files 2023-12-09 13:40:51 -08:00