Commit Graph

1924 Commits

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