Commit Graph

1967 Commits

Author SHA1 Message Date
Fernando Marichal f437c538e7
Avoid duplicated product request (#46934)
* Add getPermalinkParts utility

* Use getPermalinkParts utility

* Add changelog
2024-04-26 09:56:25 -03:00
Damián Suárez 8d2f88da71
[Product Block Editor]: update the attributes list optimistically when a new attribute is created (#46717)
* tweak optimisticQueryUpdate type

* sort items optimistically

* update attributes list optimistically

* do not invalidate when creating a new attribute

* changelog

* changelog

* update tests

* update options param in test

* wait for the promise when creating new attribute

* fix the rest of tests
2024-04-26 07:53:13 -04:00
Damián Suárez ae305a0ef8
Product Block Editor: introduce AttributesComboboxControl component (#46912)
* first approach

* update TS types

* rename

* add storybook story

* changelog

* update types

* onChange should return item

* rename css classes

* tweak styles. remove unused prop
2024-04-26 06:24:16 -04:00
Nathan Silveira 6d914ff573
Fix invalid date format errors in certain languages (#46932)
* Fix invalid date format errors in certain languages

* Remove rest of jsdoc
2024-04-26 06:28:47 -03:00
Nathan Silveira a317bc5fab
The toolbar to edit linked text in the new product's editor disappears too fast (#46888)
Add .block-editor-link-control css class to condition to not clear the selected block
2024-04-25 11:06:23 -03:00
Vlad Olaru 8a0ed2dd0b
Revert "Upgrade the WooPayments surfaces to the new designs" (#46915)
Revert "Upgrade the WooPayments surfaces to the new designs (#46873)"

This reverts commit 24808a0a8b.
2024-04-25 16:24:05 +03:00
Damián Suárez a0aa4724df
Tidy and update product attribute TypeScript types (#46907)
* rename ProductAttribute with ProductProductAttribute

* introduce ProductAttribute to define actions

* update importing attribute types

* fix select item type

* export ProductAttribute TS type

* update attribute-input-field component

* changelog

* update jsdoc block

* update test
2024-04-25 07:30:02 -04:00
Vlad Olaru 24808a0a8b
Upgrade the WooPayments surfaces to the new designs (#46873)
* Import colors.native scss variables

* Add changelog

* Refactor WCPay banner and cleanup

We introduce a new WCPayConnectCard onboarding component and
remove/cleanup all other WCPay surface components.

This component uses the new design, updated payment methods icons
and WCPay logo.

* Add changelog

* Upgrade the WCPay payments settings banner

* test: Fix WCPay payments settings banner tests

* Update the WCPay welcome page to use the WCPayConnectCard component

* Update the Payments task page to use the WCPayConnectCard component

* Fix copy for payments settings methods CTA buttons label

* Add changelog

* Further cleanup of no-longer-used WCPay surfaces

* Consolidate onboarding component icons for single sources

* Minor cleanup

* test: Fix WCPay payments settings banner test

* test: Fix payments tasks page tests
2024-04-24 21:41:40 +03:00
Matt Sherman 955786affc
Product Editor: Add ability to check if product editor made REST request (#46741)
* Add apiFetch middleware to add X-Wc-Product-Editor header to all requests from product editor

* Use productEditorHeaderApiFetchMiddleware

* Update name of header

* Utility function to check header

* Changelog

* Changelog
2024-04-24 06:24:09 -04:00
github-actions[bot] 4ca110172b
Prepare Packages for Release (#46847)
Automated change: Prep @woocommerce/dependency-extraction-webpack-plugin for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-04-24 08:39:24 +12:00
Cvetan Cvetanov 2ea10959a6
Update the styling of the WooPayments banner for the mobile version (#46647)
* Style WCPay banner for mobile version

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-04-23 15:30:42 +03:00
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