Commit Graph

1529 Commits

Author SHA1 Message Date
Chris Runnells 59ca5daeeb Add changelog entry for package. 2023-08-25 14:50:41 -10:00
louwie17 6688c60fe4
Fix description toolbar (#39873)
* Make sure the iframe block toolbar still contains full width with latest WP version

* Add min height

* Add changelog

* Revert one change

* Remove unused imports
2023-08-25 13:40:51 -03:00
Maikel David Pérez Gómez 23f33a6b74
Add Pricing item to the Quick Actions menu per Variation item (#39872)
* Move the Quick Actions menu to its own component

* Add Set list price item to the Pricing sub menu

* Add notice when a variation gets updated

* Add Set sale price to Pricing sub menu

* Do not fire change if the user cancel the window propmt

* Add Increase list price to Pricing sub menu

* Add Decrease list price to Pricing sub menu

* Add Increase sale price to Pricing sub menu

* Add Decrease sale price to Pricing sub menu

* Add Schedule sale to Pricing sub menu

* Add changelog file

* Fix lint error

* Fix typo

* Add Sale end date to the Schedule sale to Pricing sub menu

* Add tracking events

* Fix tracking event params from camelcase to snakecase
2023-08-25 12:13:16 -04:00
Chris Runnells bd5fc03aae Add secondary container to fix layout shifts
Also added CSS so that the container is always aligned to the top of the wrapper
2023-08-24 14:01:55 -10:00
louwie17 9198596918
Set up and migration to use BlockTemplate classes (#39814)
* Initial set up and migration for the BlockTemplate

* Migrate remaining fields to the new SimpleProductTemplate

* Remove re-usable functions and clean up

* Add interfaces

* Add changelogs

* Remove unused id from block attributes

* Update changelog

* Address refactor suggestions

* Fix lint errors

* Add tests

* Address PR feedback

* Extend from BlockContainerInterface instead of BlockInterface
2023-08-24 16:04:44 -03:00
Fernando Marichal 471bfd1f29
Fix new category name field error (#39857)
* Fix category name input

* Add changelog

* Move changelog
2023-08-24 10:25:20 -03:00
Maikel David Pérez Gómez f2511d4034
Product Block Editor: remove +1 category from the Variations options set of cardinality 3. (#39856)
* Change variation option labels cardinality to 3

* Add changelog file
2023-08-23 16:19:53 -04:00
Maikel David Pérez Gómez 0db29cd8c1
Create several global attributes with the same name (#39827)
* Save changes

* Remove restriction from the variations dropdown to let users create multiple attributes with the same name

* Add support for autogenerate slug in the create attribute endpoint

* Add a tooltip to specify the slug of the attribute when there are more than one listed in the dropdown list

* Add changelog files

* Revert filtering to the prev implementation

* Add review suggestions

* Add return description to the generate_unique_slug function description
2023-08-23 12:08:05 -04:00
Nathan Silveira 97137f15e7
Update new product editor middleware regex to not match 'product_brand' (#39822)
Update regex to not match 'product_brand'
2023-08-23 11:38:20 -03:00
Maikel David Pérez Gómez 897e0673a7
Add quick actions dropdown menu per variation item (#39816)
* Add the dropdown menu to the variations list

* Add preview link to the preview dropdown menu item

* Add delete variation support to the delete menu item

* Fix linter error

* Add changelog file

* Add wcadmin_product_variations_menu_view, wcadmin_product_variations_preview and wcadmin_product_variations_delete tracking events to the variation quick actions menu items
2023-08-22 10:42:18 -04:00
RJ cb2cf79342
dev: refactor core profiler loader (#39735)
* dev: refactor core profiler loader

* dev: added storybook example for loader

* lint

* Apply suggestions from code review

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

* addressed review feedback

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-08-22 19:58:33 +10:00
Néstor Soriano 4876ab35b8
Bump WooCommerce minimum required PHP version to 7.4 (#39820)
-Change "Requires PHP":
  - In woocommerce.php
  - In readme.txt
  - In plugins/woocommerce-docs/woocommerce-docs.php
  - In packages/js/create-product-editor-block/plugin-templates/$slug.php.mustache

- Change "testVersion" in phpcs.xml:
  - In the root of the repository
  - In plugins/woocommerce
  - In plugins/woocommerce-beta-tester

- Change "require-php" and "config-platform-php" in composer.json
- Update composer.lock with more modern versions of some of the dependencies
- Remove the admin notice about the upcoming bump for PHP 7.3 users in class-wc-admin-notices.php
2023-08-22 09:21:09 +02:00
Maikel David Pérez Gómez a4ed336a0d
Variation attributes can not be enabled in Attributes section and Non Variations attributes cannot be enabled in Variation Options section (#39770)
* Disabled attributes used in different section

* Let the attribute input field to disable some items within the dropdown list

* Define disabled attribute ids and message

* Filter non variable attributes as disabled to be used under variations options

* Filter variable attributes as disabled to be used under attributes

* Add changelog file

* Fix linter error

* Add tooltip option to menu item and use it for attribute and variations

* Fix some rebase conflicts

* Add changelog file

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-08-21 15:39:31 -04:00
Fernando Marichal 3f17b9b13b
Allow users to select multiple items from the media library while adding images (#39741)
* Allow select multiple items

* Add changelog

* Fix TS error
2023-08-21 12:10:30 -03:00
Fernando Marichal 79df3d7937
Fix display error in the Categories dropdown (#39811)
* Set flip as false

* Add changelog
2023-08-21 11:02:12 -03:00
louwie17 b3f7be5fdc
Update ImageGallery toolbar: changing icon to text and adding ellipsis menu (#39753)
* Update ImageGallery Toolbar by adding an ellipsis options dropdown menu

* Add changelog

* Remove typings

* Fix build issues

* Fix lint errors

* Add comment and remove old comment
2023-08-18 16:24:26 -03:00
Fernando Marichal 278366def9
Disable tabs in parent product page with variations (#39675)
* Add warning block

* Delete warning block

* Add notice component

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

* Add page notice

# Conflicts:
#	packages/js/product-editor/src/blocks/tab/edit.tsx

* Add `isOptionsNoticeVisible` to tab

* Add utils functions

* Remove warning

* Add notice visibility to tab

* Add notice visibility to pricing, inventory, shipping

* Add changelog

* Remove warning

* Change button text

* Add check to hasAttributesUsedForVariations

* Fix tests

# Conflicts:
#	packages/js/product-editor/src/components/tabs/test/tabs.spec.tsx

* Create notice block and move notice from tabs

* Fix product-notice block declaration

* Remove title from array

* Fix notices

* Fix styles

* Change error to error-type

* Revert "Add notice visibility to pricing, inventory, shipping"

This reverts commit 140703d49e.

* Remove import

* Revert "Fix tests"

This reverts commit 96036c5a6c.

* Remove duplicated function

* Add changelog

* Remove `isSelectedTabApplicableForOptionsNotice`

* Remove styles out of scope

* Fix notice props

* Rename block

* Remove selectedTab

* Update packages/js/product-editor/src/blocks/notice/edit.tsx

Co-authored-by: louwie17 <lourensschep@gmail.com>

* Fix lint

---------

Co-authored-by: louwie17 <lourensschep@gmail.com>
2023-08-18 11:14:02 -03:00
louwie17 c11b11631b
Add/39443 attribute filters (#39685)
* Add not filterable and not visible icons to attribute list

* Fix types

* Add changelogs

* Fix lint errors
2023-08-16 14:49:52 -04:00
nigeljamesstevenson d1f2218f71
Add loading indicator when submitting location in Tax task (#39613)
thanks a lot!
2023-08-15 13:49:13 +01:00
Sam Seay 45c49dc232
Add a workflow to separate out eslint and annotate PRs. (#39704) 2023-08-15 18:21:51 +12:00
RJ 3611fafe79
dev: upgrade storybook to 6.5.17 for TypeScript 5 compatibility (#39745)
There's been a Storybook breakage with Typescript 5 detailed here: https://github.com/hipstersmoothie/react-docgen-typescript-plugin/issues/78

This fix should allow us to continue using Storybook 6 until we upgrade to Storybook 7 down the road.

Even though it relies on an alpha release of 6.5.17-alpha, the only change in the alpha is https://github.com/storybookjs/storybook/pull/21745.

It should be an acceptable risk considering that Storybook is internal dev tooling for now.
2023-08-15 14:13:42 +08:00
louwie17 3edd1bd823
Auto delete unused variations when auto generating variations (#39733)
* Add auto delete functionality for variations

* Add the remove confirmation modal

* Update delete unmatched product variation logic

* Add tests

* Add changelogs

* Fix lint errors

* Fix lint errors
2023-08-14 16:35:16 -03:00
Ilyas Foo e3caf5e540 Changelog 2023-08-14 11:48:45 +08:00
Ilyas Foo b497df10d8 Add preemptive set isRequesting when optimistically updating settings 2023-08-14 11:47:34 +08:00
Ilyas Foo 8aa753d917 Fix unintended reset of isRequesting when updating settings 2023-08-14 11:47:15 +08:00
louwie17 71e8b699db
Convert simple to variable product and auto add variations (#39673)
* Auto create variations and move product to variable when adding variation options

* Delete unused components

* Add tour to variation options

* Remove unneeded options

* Add changelog

* Fix types

* Fix lint errors

* Fix broken tests

* FIlter out option tags when not included in attributes

* Don't invalidate variations data when no new variations are created
2023-08-11 11:15:05 -03:00
Fernando Marichal 91fadfd8fe
[Product Block Editor] Remove additional create term modal (#39610)
* Remove additional create term modal

# Conflicts:
#	packages/js/product-editor/src/components/attribute-term-input-field/attribute-term-input-field.tsx

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

* Add changelog

* Fix list refresh and add loading state

* Remove duplicated "invalidateResolutionForStoreSelector"

* Add modal and `autoCreateOnSelect`

* Update packages/js/product-editor/src/components/attribute-term-input-field/attribute-term-input-field.tsx

Co-authored-by: louwie17 <lourensschep@gmail.com>

* Add Attributes `invalidateResolution`

* Improve error handling

* Add term_exists error

* Fix lint errors

* Fix isOpen variable

* Fix lint

---------

Co-authored-by: louwie17 <lourensschep@gmail.com>
2023-08-10 14:21:28 -03:00
Maikel David Pérez Gómez 3ffe7b8376
Create variation items block (#39657)
* Create and register product-variation-items-field block

* Create variations-table component

* Use variations-table component in variation-items block

* Remove last border bottom from the variation options list

* Add changelog file

* Add changelog file
2023-08-09 16:06:59 -03:00
louwie17 592b4feb5e
Fix attribute terms disappearing in list (#39620)
* Fix enhance attribute logic

* Add changelog

* Fix test

* Add auto create global attribute term and fix bug with terms for global attribute

* Fix test and update changelogs

* Add invalidate resolution call and error notice

* Revert auto create on select changes
2023-08-09 10:41:47 -03:00
louwie17 75d64ee063
Create global attributes by default (#39548)
* Add support to attribute control for creating global attributes

* Add create global attribute to variation block

* Add changelog

* Invalidate the attributeTerm search after creating a new attribute term
2023-08-08 12:54:11 -03:00
Maikel David Pérez Gómez 8d8d315d66
Focus the first attribute field when opening the modal (#39549)
* Focus the first attribute field on modal shown

* Add changelog file

* Remove setTimeout to focus the attribute dropdown field
2023-08-08 10:50:11 -04:00
Maikel David Pérez Gómez b546e4fb17
Manage default variation option (#39570)
* Add default attributes property to the Product type

* Add change log file

* Set default attributes when click add from the attribute options modal

* Add Set default value checkbox to the edit attribute modal

* Manage default attributes when update or delete an attribute option

* Show Set default value only when the editing attribute is used for variations

* Add change log file
2023-08-08 10:41:26 -04:00
Maikel David Pérez Gómez d3702c53ba
Add product visibility blocks (#39477)
* Add catalog visibility block

* Add product search visibility block

* Add changelog files

* Fix linter errors

* Remove non necesary block

* Add catalog_visibility property to the Product type
2023-08-08 09:58:00 -03:00
Sam Seay e8c3808527
Upgrade TypeScript to v5.1 (#39531) 2023-08-08 16:35:31 +12:00
Alefe Souza 428feb58a7
Update WCPay banners for WooPay (#39596)
* Update WCPay banners for WooPay

* Fix unit tests

* Always checks for WooPay eligibility

* Use existing method to determine WooPay eligibility

* Create is_woopay_eligible method
2023-08-07 19:17:59 -07:00
Joel Thiessen 144bf08293
Generating the short description on the product editor (#39237)
* [Woo AI] Generate short description after long description is generated.
2023-08-07 14:03:52 +02:00
Joshua T Flowers 63ca33ae35
Fix toolbar button text not showing in WP 6.3 (#39572)
* Fix toolbar button text not showing in WP 6.3

* Add changelog entry
2023-08-04 16:23:09 -05:00
Fernando Marichal a436b3b3a4
Fix selection of term after clicking the value name (#39574)
* Fix select attribute values

* Add changelog

* Move changelog

* Remove 'list-item' class name
2023-08-04 15:40:32 -05:00
Maikel David Pérez Gómez b5db405265
Feedback bar is mis-aligned; transient notices overlap (#39233)
* Fix the feedback bar alignment to be centered

* Move the transient notices to the top of the feedback bar

* Add changelog file

* Remove feedback bar animation
2023-08-03 10:06:45 -04:00
louwie17 1212fcb689
Add new variation modal (#39522)
* Hook up add new variations options modal

* Fix duplicate logic and test

* Add changelog

* Match local attributes by name case incentive

* Remove console log

* Make use of some function instead of findIndex
2023-08-02 14:29:09 -03:00
louwie17 86788fcaed
Pass down height of inserter panel to allow for scrolling (#39491)
* Pass down height of inserter panel to allow for scrolling

* Add changelog
2023-07-31 12:36:07 -03:00
Nathan Silveira 403c8ba8b8
[ Product Block Editor ] Create Variation options block (#39256)
* Add support for variable products

* Add 'hello world' block to variations tab

* Add product-section block to template

* Add AttributeControl component to screen

* Add changelog

* Change labels

* Make a copy of AttributeControl to VariationOptionsControl to allow the fields to evolve separately in future

* Fix tests

* Add changelog to woocommerce

* Fix alert error

* Remove copied control and start adapting attribute control to handle both scenarios

* Add -field to block name

* Revert "Add -field to block name"

This reverts commit 50e1ee66e27ffb2df22ea7f6a4f78d1577a273f5.

* Revert "Revert "Add -field to block name""

This reverts commit eee0441c6532f9fa8cf8383d9699fd503dd054ae.

* Extract more labels

* Hide drag handle in variation options
2023-07-28 14:40:18 -03:00
Nathan Silveira bf97630ad0
[Product Block Editor] Add require password block field (#39464)
* Add post password to API

* Add changelog

* Fix phpcs issue

* Remove post_password from tests

* Add additional property to test

* Increment number of properties in product schema

* Update the post when post_password changes

* Start adding password block

* Add css and import it

* Refactor attributes and erase password when checkbox is unchecked

* Add changelogs

* Remove unused imports

* Rename 'fields' to 'field'

* Refactor CSS

* Remove example object
2023-07-28 14:05:03 -03:00
Panos (Panagiotis) Synetos 155420f79c
Merge branch 'trunk' into fix/admin-colors-use-theme 2023-07-21 12:12:06 +03:00
Nathan Silveira 8020f3407b
[Block Product Editor]: Only run name validation if the field has been edited (#39320)
Only run name validation if the field has edit
2023-07-20 10:42:01 -04:00
Maikel David Pérez Gómez 776d567f30
Create the Organization tab (#39232)
* Add Organization to the right of General tab

* Add Product catalog and Attributes sections to the Organization tab

* Add Categories and Disable product reviews blocks to Product catalog section

* Add attributes block to the attributes section

* Add changelog files

* Fix php linter error

* Remove Categories and Attributes blocks from the General tab

* Change Disable product reviews by Enable product reviews
2023-07-19 10:11:03 -04:00
Panos (Panagiotis) Synetos ea1d08c72a
Merge branch 'trunk' into fix/admin-colors-use-theme 2023-07-19 15:21:30 +03:00
Sam Seay 4a2fd63b99
Use syncpack customTypes to keep pnpm and node in sync. Update pnpm to 8.6.7 (#39245) 2023-07-18 14:27:18 +12:00
Joel Thiessen 7cb5cfed69
Making completion utilities available in AI package (#39190)
Co-authored-by: github-actions <github-actions@github.com>
2023-07-17 10:25:14 -07:00
Maikel David Pérez Gómez 24a655aec4
Allow the user to delete the description (#39229) 2023-07-14 11:00:03 -04:00
Fernando Marichal bbd727c257
Add header buttons to the description editor modal (#39156)
* Add header buttons to the description editor modal

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

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

* Remove isModalActionsBarVisible

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

* Fix styles and removed comment

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

* Add changelog

* Fix styles

* Fix gap between buttons
2023-07-14 11:18:16 -03:00
Panos (Panagiotis) Synetos 6260251f52
Changelog 2023-07-14 14:06:54 +03:00
Panos (Panagiotis) Synetos cfff3c6d69
Components empty content icon color 2023-07-14 13:50:02 +03:00
louwie17 9a5f7643c4
Prepare woocommerce/components for release (#39235)
* Ran package release prepare for woocommerce components for release

* Update changelog and change version update
to minor
2023-07-13 17:00:25 -03:00
Matt Sherman a706bd666b
Product Editor: Fix description modal editor scrolling (#39212)
* Scroll modal editor

* Set editor to always 100% height

* Only scroll editor canvas

* Scroll sidebar

* Clip inserter

* Comment for inserter clipper

* Move iframe editor css

* Remove unused const

* Changelog
2023-07-13 10:40:02 -04:00
Matt Sherman 408cf8d53c
Product Editor: Add "Copy all content" menu item to description editor modal (#39199)
* Copy all content menu item skeleton

* Add blocks to editor context

* Show notice on copy success

* Use store to get blocks to copy

* Remove blocks from editor context (decided to use store instead)

* Changelog

* Disable menu item if no content
2023-07-13 10:39:34 -04:00
Matt Sherman a51f384021
Product Editor: Disable autocomplete on product name field (#39211) 2023-07-13 10:09:59 -04:00
Oleksandr Aratovskyi aeaaac9505
Change WooCommerce Payments to WooPayments across the WC Core (#39188)
* Change WooCommerce Payments to WooPayments across the WC Core

* Change WooCommerce Payments to WooPayments across the WC Core

* Add more changelogs

* Add changelog for data package

* Change banner image and task description

* Fix lint error

* Change one more banner image

* Fix to the banner image

* Roll back changelog.txt and fix one condition for backwards compatibility

* Fix in changelog.txt

* Small fix in changelog.txt
2023-07-13 12:58:17 +03:00
Matt Sherman 17f83af095
Product Editor: Add help menu item to description modal editor (#39178)
* More menu skeleton

* Help menu item

* Tracks event for help menu item

* Remove invalid/unused ref from MoreMenu

* Changelog
2023-07-11 13:19:53 -04:00
Nathan Silveira e85491bdea
Focus on name field when mounting and update summary field UI (#39050)
* Move placeholder of summary to help text at bottom of the component

* Focus the name field when mounting

* Add changelog

* Create 'autoFocus' block attribute instead of using useEffect

* Add changelog
2023-07-11 09:48:26 -03:00
Maikel David Pérez Gómez 96c0c5bd74
On-/offboarding copy updates (#39055)
* Change the modal's description test in the first step of the product block editor tour

* Change the modal's description text in the first step of the product block editor guide

* Change the modal's description text in the second step of the product block editor guide

* Change the modal's title and description text in the third step of the product block editor guide

* Change the modal's description text in the four step of the product block editor guide

* Enhance the Options menu of the product block editor

* Add slide up animation and translucent background to the feedback bottom bar

* Change de CES's modal heading text in the product block editor

* Change the notice message after the feedback is being sent from the CES Modals

* Enhance leave feedback modal checkbox labels

* Change leave feedback modal submit button text

* Show success notice after submit the leave feedback modal

* Add changelog files

* Change the illustration in the first step of the feature tour

* Change the modal's title and description text in the first step of the product block editor tour for old users

* Change the modal's title and description text in the first step of the product block editor guide for old users

* Change the modal's title and description text in the third step of the product block editor guide for old users

* Fix unit tests

* Change the customer effort score changelog description

* Change footer forward button to primary and backward button to tertiary in the tour guide modal
2023-07-10 14:51:55 -04:00
Maikel David Pérez Gómez 714e50bf4c
Create variations block with empty state (#39038)
* Create and register woocommerce/product-variations-fields block

* Hide or show the empty state or inner blocks if the product has attributes

* Add changelog files

* Fix php linter errors
2023-07-07 17:15:54 -03:00
Moon 7c5b98ea02
Remove accents from country labels to match geo detected country data (#39110)
* Remove accent for comparison

* Add changelog

* Use localCompare instead
2023-07-07 10:50:42 -07:00
Nathan Silveira ee900c9b33
Add button on toolbar to toggle show/hide block inspector (#39090)
* Add button on toolbar to toggle show/hide block inspector

* Move changelog

* Copy drawerright icon from @wordpress/icons
2023-07-07 12:14:41 -03:00
Chi-Hsuan Huang 16d50edc8b
Tourkit: focus the step after opening (#38963)
* Tourkit: Focus the first step after opening

* Add changelog

* Update focusElementSelector

* Fix Card isElevated deprecated warninig
2023-07-06 19:06:24 +08:00
Fernando Marichal 4086e8e7f5
Fix backward compatibility for AdvancedFilters (#39049)
* Create function getInterpolatedString

* Fix interpolated strings

* Add tests

* Add changelog

* Fix deprecation text

* Improve getInterpolatedString

* Add tests

* Add method backwardsCompatibleCreateInterpolateElement

* Use another "createInterpolateElement"

* Fix deprecation text
2023-07-05 14:43:07 -03:00
Maikel David Pérez Gómez 8b1d576918
registerCoreBlocks still being called on legacy product page (#38982)
* Remove registerBlocks from rich text editor to avoid  warning messages

* Expose registerBlocks as registerRichTextEditorBlocks from the rich text editor package

* Add changelog file
2023-07-04 12:46:11 -04:00
louwie17 f8c6c43721
Update/create product block package (#39023)
* Add publish config

* Add changelog
2023-06-30 15:23:13 -03:00
louwie17 8978f2a929
Prepare create product editor block package (#39022)
* Prepare create product editor block package

* Remove legacy message
2023-06-29 10:32:04 -03:00
Sam Seay 957fb2b07e
Update pnpm to 8.6.5 (#38990) 2023-06-29 16:51:29 +12:00
louwie17 cb0fb46e7b
Add gitignore to package and update package.json (#39007)
* Add .gitignore

* Update package.json

* Add changelog
2023-06-28 18:18:02 -03:00
louwie17 b11b17c17c
Added initial changelog and ran prepare package release (#39001)
* Added initial changelog and ran prepare package release

* Add gitkeep to changelog folder

* Remove legacy link that is not required
2023-06-28 14:55:25 -03:00
Maikel David Pérez Gómez ecd1795b44
Add the list view component and button to the modal editor (#38809)
* Add document overview opened state to the EditorContext

* Create document overview toolbar button

* Add document overview button to the header toolbar

* Create document overview sidebar

* Register document overview sidebar styles

* Set document overview sidebar visible when document overview button is pressed

* Add changelog file
2023-06-27 10:08:08 -04:00
Chi-Hsuan Huang 5db0fd4fce
Add instructions on how to run the tests when using @woocommerce/components (#38821)
* Add instructions on how to run the tests when using @woocommerce/components

* Add changelog
2023-06-26 17:05:49 +08:00
Joshua T Flowers 6bbc4dad1a
Add missing tracks events to product editor (#38728)
* Only record product update on already published products

* Add source into published product tracks event

* Add missing tracks options to product update event

* Track tab clicks in the editor

* Add source to tab clicks

* Record tracks on preview click

* Add events for media gallery, description, and attributes

* Add tracks events to more menu

* Replace new_product_page with source

* Add changelog entry

* Fix lint errors

* Add tracks for About the Editor menu item

* Add onClick event to AboutTheEditor menu item

* Use dropdown option event for classic editor menu click
2023-06-21 09:38:04 -07:00
github-actions[bot] 109b9bfb2e
Prepare Packages for Release (#38818)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2023-06-20 16:13:48 +08:00
Matt Sherman 7004396617
Set attributes to visible by default (#38777)
* Default visible to true if not explicitly set

* Refactor onAddingAttributes to reduce complexity

* Changelog

* Improve hasTermsOrOptions based on review suggestion
2023-06-16 18:02:16 -04:00
Fernando Marichal a40543c16d
Fix styles for modals (#38775)
* Fix obw modal

* Fix modal styles

* Add changelog

* Add changelogs

* Move __selection and __errors
2023-06-16 15:48:33 -03:00
Matt Sherman 9a6d9533c9
Keep showing product editor feedback bar after feedback modal shown (#38773)
* Show feedback bar even after feedback is given

* Changelog
2023-06-16 11:51:18 -04:00
Ismael Martín Alabarce 9a49ff72da
Update WCPay welcome page incentives (#38689)
* Initial refactor of components

Move out from index every UI component to make it easier to maintain.

* Initial implementation of new design

Some minor adjustments are missing, and I've added a few TODOs to complete later.

* Add changelog entry

* Finish design update

* Compress menu icon

* Add user's first name to heading copy

* Fetch and cache eligible incentive from WCPay API

Sharing its properties under `window.WcSettings.admin`

* Filter `allowed_promo_notes`

To be able to add those form WCPay API request

* Update JS side to use the new shared incentive details

* Ensure we cache requests even if there are no eligible incentives

* Fix a typo in WCPayBanner

* Move incentive preloaded data from wcSettings

to a new window variable which will be only loaded on WCPay welcome page.

* Simplify `has_wcpay` check

* Render sanitized HTML from incentive description

* Update get incentive logic to also cache non success responses

* Add incentive ID to page view track

* Add changelog entry for the onboarding package

* Update used options names

and add them to `get_default_option_permissions

* Differentiate every dismissed incentive

Reuse WCPay welcome page logic for notes display conditions

* Use tos_url instead of tos_link to match response

* Fix incentives endpoint request payload

* Back to preload incentive on admin shared settings

* Move promo notes filter to where it's used

to avoid any possible race conditions.

* Replace every occurrence of `WooCommerce Payments` with `WooPayments`

* Prevent modal large padding-bottom

* Prevent another global style override on modal

* Fix TS error coming from trunk merge

* Fix wrong style property

* Further restrict WCPay incentives to plugin not active and countries supported

* Adjust the meaning of has_wcpay

* Wait for dismiss option update before redirect

to prevent the side menu entry to be visible after redirecting back to WC admin.

* Enforce TOS asterix at the end of incentive description

* Remove underscore from priavate instance var.

* Fix ESLint error

* Fix SCSS linting issues

* Refine `has_wcpay` and `has_orders`

* Enforce consistent WooPayments branding

* Enforce stricter i18n calls with escape

* Update page title to match new branding

* docs: Enforce branding in code docs also

* Remove method that is unreliable to be used outside of onboarding

* Remove unused constant

* Missing new line

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

---------

Co-authored-by: Vlad Olaru <vlad@pixelgrade.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 16:32:58 +02:00
Ilyas Foo 1e72bb0401
Allow `plugins_page_skipped` parameter in Onboarding API endpoint (#38764)
* Append plugins_page_skipped parameter to onboarding API

* Changelog

* Rename property to is_plugins_page_skipped and fixed tests

* Changelog

* Fix lint
2023-06-16 18:06:58 +08:00
Moon 1a42094e5e
Fix Jetpack redirection issue when the auth endpoint returns an invalid url (#38760)
* Return full response from getJetpackAuth

* Add success and errors

* Redirect to Home in case of an error from getJetpackAuth endpoint

* Add changelog

* Use redirectToJetpackAuthPage

* Replace window.location.href with navigateTo

* Fix type issue with getJetpackAuthUrl

* Update plugins/woocommerce-admin/client/core-profiler/index.tsx

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

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-06-16 00:56:30 -07:00
Moon 630faadb81
Update/implement connect to jetpack (#38674)
* Add install-and-activate-plugins-async action to onboarding

* Add label and learn_more_link types

* Use label and learn_more_link

* Remove unused imports

* ts fixes

* Visual changes on the plugin page

* Change CTA font size from 13px to 14px
* Change spacing between the chebox and logo to 24px
* Change heading font-weight to 500

* Fix css lint error

* Add back learn more link that was removed from rebase

* Add required packages

* Load Jetpack Config

* Add getJetpackAuthUrl to data/onboarding

* Add Connection Rest Auth -- seems like this is required for Jetpack to communicate back to the connected site

* Add jetpack-authorization-url REST API

* Redirect to Jetpack Auth page after the installatino process if jetpack was selected

* Require can_install_plugins permission for jetpack auth url endpoint

* Update packages/js/data/src/onboarding/resolvers.ts

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

* Update plugins/woocommerce/src/Admin/API/OnboardingPlugins.php

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

* Remove automattic/jetpack-sync and its config

* Support redirect_url and from params

* Do not redirect to Jetpack auth if it is already connected

* Add installed_ext_success=1

* Use woocommerce-core-profiler for from value

* Revert unrelated lock file changes

* Minor refactor

* Extracted out isJetpackConnected cond to a guard

* Added meta data for isJetpackConnected to prevent unwanted spinner

* Add Changelog

* Lint fix

* Move Jetpack Connection config init to class-woocommerce

* Add changelog

* Remove unnecessary require

* Note jetpack-authorization-url endpoint is experimental

* Fix broken test

* Add component to sendToJetPackAuthPage state

* Fix lint error

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-15 20:28:18 -07:00
Joshua T Flowers 3ad98ec8b4
Add tool selector option to iframe editor (#38686)
* Add tool selector option to iframe editor

* Fix lint errors
2023-06-15 16:29:12 -07:00
Joshua T Flowers ce770bbfd2
Fix empty state for currency inputs in product editor (#38697) 2023-06-15 09:32:57 -07:00
Matt Sherman de6f77d8be
Fix transient notices overlapping product editor footer (take 2) (#38698)
* Use WooFooterItem for Footer

* Use WooFooterItem fill for TransientNotices

* Adjust TransientNotices styling to work in footer

* Fix footer width when in setup wizard

* Change export of TransientNotices from default to named

* Add border to footer

* Changelog

* Changelog

* Mock WooFooterItem to allow unit tests to pass

* Fix lint error in test
2023-06-14 16:32:28 -04:00
Fernando Marichal 47481490d8
CES modal modifications (#38643)
* Add extraFields prop

# Conflicts:
#	packages/js/product-editor/src/components/product-mvp-ces-footer/product-mvp-ces-footer.tsx

* Add changelog

* Add changelogs

* Fix styles

# Conflicts:
#	packages/js/product-editor/src/components/product-mvp-ces-footer/style.scss

* Add extraFields validation

* Remove files

* Add styles and js

* Modify the other share feedback form

* Change modal title

* Fix feedback-bar

* Fix return

* Fix params types

* Rename `extraFields` to `getExtraFieldsToBeShown`

* Fix styles

* Fix error handling

* Fix styles

* Rename prop

* Fix error message
2023-06-14 11:25:51 -03:00
Moon 620ff93e5a
Additional changes for the core profiler plugins page (#38616)
* Add install-and-activate-plugins-async action to onboarding

* Add label and learn_more_link types

* Use label and learn_more_link

* Fix type

* Add changelog

* Add changelog

* Add install_priority -- this will be used in the core profiler

* Sort selected plugins by install_priority for installation

* Remove unused imports

* dev: refactor installAndActivatePlugins to xstate

* ts fixes

* Sort plugins by install_priority

* Make sure WooCommerce Shipping is always visible

* Update free extension list content

* Updated WC payment description
* Updated logo images

* Visual changes on the plugin page

* Change CTA font size from 13px to 14px
* Change spacing between the chebox and logo to 24px
* Change heading font-weight to 500

* Fix css lint error

* Fix gray-900 variable name

* Hide learn more link on mobile view

* Add back learn more link that was removed from rebase

* Send pluginsAvailable to pluginInstallermachine

* Use is_activated to determine plugin availability and install status

* Update packages/js/data/src/onboarding/types.ts

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

* Update plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php

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

* Add back recordTracksPluginsLearnMoreLinkClicked

* Use install-and-activate-plugins-async when timer is up

* Record plugin and link with learn more linked clicked event

* Fix failign tests

* Add comment for install_priority

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-13 15:03:03 -07:00
Matt Sherman ef6fe8567d
Create Product Editor Block: Do not add script prop to generated block.json (#38496)
* Remove script prop from generated block.json

* Changelog

* Remove style prop from generated block.json
2023-06-13 09:53:20 -04:00
Matt Sherman 0f8d274d7f
Remove editor-styles-wrapper class from product editor (#38681)
* Remove editor-styles-wrapper class from product editor

* Override default block margins and layout applied for themes without a theme.json file

* Changelog
2023-06-12 18:56:57 -04:00
Joshua T Flowers 93262ac019
Add editor history and undo/redo toolbar buttons (#38573)
* Add editor history and undo/redo behavior

* Add option to limit max editor history

* Move inserter properties to editor context

* Move editor toolbar to separate folder

* Add changelog entry

* Remove no longer needed editor provider
2023-06-12 14:23:22 -07:00
Joshua T Flowers 90e4ddbf29
Update product editor CES modal to match new designs (#38592)
* Add new fields and copy update to product CES modal

* Update styling for product CES modal

* Record email in tracks callback if provided

* Fix modal header spacing

* Fix record callback types

* Add optional tag styling

* Allow submitting form when a reason has been selected

* Fix modal padding bottom

* Update modal width to match designs

* Add changelog entries

* Update margin for legend

* Add props to doc comment

* Make className prop optional

* Update tests for recording score with email
2023-06-12 10:58:00 -07:00
Maikel David Pérez Gómez 72f7e6ebbb
Publishing product in classic editor redirects back to new editor (#38551)
* Changes the feature given it's id and a toggle value as a query param

* Swap classic editor and new product block editor url when product_block_editor feature changes

* Turn off the product_block_editor feature when user choose to use the classic editor

* Add changelog files

* Fix linter errors

* Add nonce to each feature change request

* Change the hooks name for better readability

* Use get_current_screen function to better identify if the current screen is the product creation or edition

* Add wp_die if the nonce verification failed

* Change regex for explode/parse_url for better reading
2023-06-09 11:18:40 -04:00
Matt Sherman dadc0eb777
Show feedback footer on product editor page (#38599) 2023-06-08 20:56:07 -04:00
Joshua T Flowers e09e8b8ab0
Show "Save draft" instead of "Saved" on initial product page (#38609) 2023-06-08 15:32:49 -07:00
Joshua T Flowers 4569fda5c1
Add iframe editor header toolbar and block inserter (#38549)
* Add initial toolbar and secondary sidebar

* Style the sidebar and inserter panel

* Adjust toolbar and modal paddings

* Move header toolbar styles to separate file

* Make header toolbar class names consistent with component

* Dont use experimental insertion index and fall back to default insertion point

* Add changelog entry
2023-06-08 12:14:25 -07:00
Maikel David Pérez Gómez 338bf6e45e
Product route not updated after save initially failed and succeeded after (#38507)
* Enhance error handling

* Use last persisted product status to show a right publish button label and notices

* Use last persisted product status to show a right preview button label and notices

* Use last persisted product status to show a right save draft button label and notices

* Uses the last persisted product to better compare it with the most recently updated product so the buttons can behave correctly

* Add changelog file

* Fix getProductErrorMessage unit test

* Fix notice message when create / update the product

* Get product id from within each button hook
2023-06-08 14:22:07 -04:00
Nathan Silveira 52fe3c4a5a
Product Editor Onboarding: Show spotlight for first time visitors (#38590)
* Add placeholder TourKit in product-page

* Create component and configure it to show to the right of wp menu

* Finish TourKit and start creating features guide

* Implement CSS changes and background color

* Create Wrapper to facilitate showing the tour and guide without relying on the options in the future

* Refactor
Add tracks events

* Add changelog

* Fix lint problems

* Fix CSS

* Refactor styles

* General refactor and extract BlockEditorGuide component

* Add changelog

* Fix lint issues
2023-06-06 12:06:26 -03:00
louwie17 bb0e8803a0
Replace interpolateComponents within onboarding package (#38423)
* Replace use of interpolateComponents with createInterpolateElement

* Remove @automattic/interpolate-components package from onboarding package

* Add changelog
2023-06-05 10:36:47 -03:00
Maikel David Pérez Gómez abcedbefe0
[MVP QA #1] Visual: spacings (#38325)
* Update the margin-left on the buttons in the top bar from 16px to 8px

* On mobile, the left and right body margins should be 32 px

* The inner padding in the tab in the top bar should be 12px, not 16px

* In the edit product link modal, let's set this modal’s width to 650 px and remove the line separating the header from the contents

* All modals should now have 8 px window radius

* In the feedback form, can we fix the buttons at the bottom

* The help icon in checkboxes small, detached from the item label, and vertically misaligned. Left margin of 4 px, no vertical adjustment; somehow it has a -2px set for the top margin)

* Fix block-editor-block-contextual-toolbar top position

* When the product is in a draft state, the button in the top bar should say Add, not Save. It should change into Update once it's published on the store

* Fix layout margin top

* Add ection support for blockGap and set title and description to optional

* Remove non needed control field margin bottom

* Fix schedule sale block spacing

* Remove non needed control field help text margin bottom

* Remove the sub section outer spacing

* Move pricing fields into a sub section block

* Fix collapsible-contet margin top

* Remove invalid inner block layout spacing

* Wrap sku, stock toogle and quantity within a sub section

* Group inventory advance section inner blocks into a sub section

* Fix linter error

* Add changelog files

* Fix php lint error

* Change unit names to fit GB definitions
see: b2c16f3c68/packages/base-styles/_variables.scss\#L31-L41
2023-06-01 13:56:31 -04:00
Sam Seay 664468f51a
Add a new plugin to the monorepo for the docs project (#38406) 2023-06-01 10:21:33 +12:00
Sam Seay 4f2fb497fd
Remove eslint-plugin-react plugin warnings from lint (#38512) 2023-06-01 08:27:06 +12:00
Joshua T Flowers a5e36377f9
Check for unsaved changes before leaving product editor (#38430)
* Check for unsaved changes before leaving product editor

* Add changelog entry

* Add hasEdit convenience method to useProductEdits hook
2023-05-31 10:14:12 -07:00
Sam Seay b076a7b521
Fix linter issues and update Syncpack (#38523) 2023-05-31 11:45:10 +12:00
Matt Sherman 4e530ba2e2
Prevent theme styles from being used in the block-based product editor (#38491) 2023-05-30 13:25:55 -04:00
Ilyas Foo edf95bf3f4
Update shipping partner suggestions to use data from API (#38457)
* Added shipping partner suggestions data handling in JS

* Add woocommerce services real info

* Add dynamic layout components, remove unused JS, added images to proper asset paths

* Changelog

* Update changelog and removed unused variable

* Remove console.log

* Lint fix

* Add shipping methods module in woocommerce/data

* Update data usage

* Revert "Added shipping partner suggestions data handling in JS"

This reverts commit 6a87ef2658.

* Lint fix
2023-05-30 15:56:32 +08:00
RJ ab18828e84
add: core profiler business info page (#38412)
* add: core profiler business info page
2023-05-30 15:05:38 +08:00
Matt Sherman 27574c98cd
Update DateTimePickerControl's dropdown positioning (#38466) 2023-05-29 16:12:28 -04:00
Matt Sherman f186403a77
Opt out of Reset and Help buttons in DateTimePickerControl (#38480) 2023-05-29 16:09:06 -04:00
Moon 6946ef384a
Core Profiler - Add extensions page (#38405)
* Initial design impl. without the full functionality

* Delete unused icons

* Add is_installed and plugins_page_skipped

* Add plugin-card component to render an installable plugin

* Implement plugins page

* Add loaders for plugins

* Add changelog

* Remove unused type

* Add changelog

* Remove unnecessary return statement

* Add obw/core-profiler

* Replace extensions with plugins

* Temp -- use window.location.href for Woo Home redirection

* Minor: code refactor

* Refactor isntallAndActivatedPlugins

* Skip plugins page when there is no available plugin

* Apply mobile styles

* Update plugins/woocommerce-admin/client/core-profiler/components/plugin-card/plugin-card.scss

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

* Update plugins/woocommerce-admin/client/core-profiler/components/plugin-card/plugin-card.scss

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

* Update plugins/woocommerce-admin/client/core-profiler/style.scss

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

* Bold errored plugin name

* Fix checkbox alignment

* Update changelog

* Fix object type for formatToParts function

* Fix lint issues

* Fix CSS lint issues

* Fallback to en-US when locale is not available

* Fix error with siteLocale

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-29 07:45:30 -07:00
Christopher Allford 230bc04050
Updated `wp-env` To 8.0.0 (#38440) 2023-05-26 15:48:48 -07:00
Matt Sherman 2b12908a80
Add @woocommerce/create-product-editor-block package (#38263)
* Initial commit for create-product-editor-block

* Changelog

* Add stylelint support

* Install WooCommerce and WooCommerce Beta Tester in wp-env

* Set PHP and WordPress versions

* Enable product block editor after wp-env setup

* Lower priority for modifying template, so that the template is actual there!

* Update wp-env afterSetup command to use npx

* Update output README.md

* Update README for package

* Use long form of template parm name in README

* Remove unused example in block config

* Update block registration to handle both WP 6.2 and WP 6.3

* Include note about how to change version of WP and WC in README

* Update WP to 6.2.1

* Remove explicit enqueuing of block script and style

* Update minimum required versions of WordPress and PHP in generated plugin file

* Enable feature flag option after setup of wp-env

* Add minimum required WC version to generated plugin file

* Support wp-env lifecycleScripts

* Guard against product_block_editor not enabled or missing template

* Update lock file
2023-05-26 08:16:57 -04:00
Maikel David Pérez Gómez a43a418019
List price gets reset on blur when error is shown (#38414)
* List price gets reset on blur when error is shown

* Add changelog file

* Fix linter error
2023-05-24 13:53:28 -04:00
Joshua T Flowers 353e01eb65
Tweak typography and element spacing in product editor (#38351)
* Update header font size

* Remove icons from sections

* Update radio block label and spacing

* Make checkbox tooltips larger and vertically align

* Update description colors

* Update h4 font sizes in editor

* Add changelog entry

* Add core changelog entry

* Handle initial design feedback

* Remove copy of assets in client webpack config
2023-05-24 10:11:00 -04:00
Maikel David Pérez Gómez 195bcd2368
Limit 'email me when stock reaches' field to numerical only (#38353)
* Limit 'email me when stock reaches' field to numerical only

* Add changelog file
2023-05-22 06:59:58 -03:00
Maikel David Pérez Gómez e16792dc11
Make DateTimePickerControl a ForwardedRef (#38306)
* Forward ref the DateTimePickerControl

* Add changelog file

* Remove the component typing definition

* Integrate the forwardedRef component with the schedule-sale block

* Add changelog file
2023-05-22 06:55:07 -03:00
Chi-Hsuan Huang 4547922f3f
Add core profiler user profile page (#38328) 2023-05-22 11:21:16 +08:00
Nathan Silveira 5437ed50c3
Use SelectTree in Parent Category field (#38261)
* Increment label CSS to look the same as TextControl's label

* Migrate Parent Category field to SelectTree

* Add changelogs

* Fix unit test that was edited by mistake

* Revert css changes in select-control.scss

* Use BaseControl as label on SelectTree

* Increment changelog

* Increment changelogs

* Refactor test

* Refactor category-field functions and use them in related places

* Fix ordered list appearing empty
2023-05-19 12:45:11 -03:00
RJ 06e6f5012f
dev: moved geolocation utils from wccom to here (#38356) 2023-05-19 15:02:39 +08:00
louwie17 2843fbb7a8
Fix editor header hidden in Firefox (#38247)
* Update page config to add support for layout header/footer

* Fix lint error
2023-05-18 13:00:42 -03:00
Joshua T Flowers d17ca83b02
Add error specific messages to product save functionality (#38307)
* Allow errors to be thrown when saving entity records

* Show frontend error message when one exists

* Allow errors to be thrown in preview save entity

* Rename new util to getProductErrorMessage

* Add tests around error message util

* Add changelog entry
2023-05-18 05:28:28 -03:00
Joshua T Flowers 81e92392d5
Fix double scrollbars on product editor page (#38281)
* Refactor Layout component to functional component

* Add class to pages based on page path

* Add styling for interface skeleton on product pages

* Add changelog entries

* Move product page styles out of product editor package and into client

* Fix linting issues

* Check for location before checking path in page tracking

* Dont add body classes when no page path exists

* Record page view without router location for embed pages
2023-05-18 05:25:36 -03:00
Maikel David Pérez Gómez 470ecd0e7d
Fix validation behavior (#38194)
* Create ValidationContext

* Add ValidationProvider to the product editor

* Add new validation to the name block

* Add new validation to the Save button

* Store validations within a useRef instead of useState to improves re-renders

* Create find first visible and invalid element function

* Add focus first invalid element feat when submitting

* Integrate autofocus with name block

* Migrate sale-price block to the new validation system

* Add changelog file

* Migrate regular-price block to the new validation system

* Migrate schedule-sale block to the new validation system

* Migrate inventory-quantity block to the new validation system

* Migrate shipping-dimensions block to the new validation system

* Remove old validation hook

* Add validation to the save-draft button

* Add validation to the preview button

* Expose validation hooks to be used outside of the package

* Make sure the product is in fact saved before calling the onPublishSuccess
2023-05-17 01:01:30 -04:00
Joshua T Flowers 5b50bbc442
Wrap selected items in experimental select control (#38284) 2023-05-16 15:15:26 -07:00
Maikel David Pérez Gómez 4b3479595b
Only register blocks when user navigates to the product edit page (#38303)
* Remove block registration from within the Editor component

* Expose the initBlocks function to be used outside of the product package

* Register blocks within the ProductPage component

* Add changelog files

* Unregister blocks when product page gets unmounted
2023-05-16 07:41:26 -03:00
Joshua T Flowers 35e1fed2f9
Wait for editor changes to be debounced before closing modal (#38262)
* Wait for editor changes to be debounced before closing modal

* Handle PR feedback
2023-05-16 04:41:43 -03:00
RJ 8cd0f2f997
dev: added types for resolveSelect where applicable (#38241) 2023-05-16 08:55:50 +08:00
Maikel David Pérez Gómez 332094e87d
Update shipping class block to match new designs (#38301)
* Change the section title from Shipping fee to Shipping class

* Replace the radio buttons with a regular dropdown

* Add changelog files
2023-05-15 13:06:48 -04:00
Matt Sherman ac78d3de2b
Product Block Editor: Fix product summary field top margin (#38251)
* Fix product summary field margin

* Changelog
2023-05-12 10:45:03 -03:00
Nathan Silveira 581601f545
Add single selection mode to SelectTree (#38140)
* Add single mode for SelectTree

* Add storybook example for single selection in SelectTree

* Add changelog

* Improve type definitions and refactor code

* Add onRemove to story
2023-05-11 13:42:20 -03:00
Joshua T Flowers a587612934
Add editor styles to product editor and iframe editor (#38168)
* Add editor styles to product editor and iframe editor

* Make section title css selectors more specific

* Add changelog entry

* Remove additional commented component

* Remove unused import
2023-05-11 11:43:22 -03:00
Nathan Silveira f668ce72ac
Add tests to tracks events fired through JS (#38124)
* Add test for inbox_note_view event

* Add tracks test for Layout's page_view

* Add test to inbox_action_click

* Add tests to analytics_filter tracks event

* Add tracks event test to activity_panel_open

* Add tests to tracks event activity_panel_orders_orders_begin_fulfillment

* Add tracks tests to activity_panel_stock_update_stock

* Improve tests based on code review comments

* Mock recordEvent and recordPageView globally

* Add missing mock

* Improve inbox panel tests
2023-05-10 09:36:42 -03:00
Maikel David Pérez Gómez 227695386d
Fix spacing between pricing fields (#38146)
* Fix spacing between pricing fields

* Add changelog file

* Fix spacing between sale toggle and the next section
2023-05-09 19:13:56 -04:00
Chi-Hsuan Huang 4a237ca476
Migrate Purchase task and dashboard utils to TS (#37725)
* Fix onboarding productTypes TS define type

* Rename purchase.js -> purchase.tsx

* Rename utils.js -> utils.ts

* Migrate dashboard/util to TS

* Rename tasks fills to index.ts

* Migrate purchase task to TS

* Add changelog

* Fix types

* Update changelog
2023-05-09 11:28:57 +08:00
Joel Thiessen c76203cde5
Correcting spacing for image gallery block (#38151)
* Correcting spacing for image gallery component

* Adding changelog
2023-05-08 14:18:15 -03:00
Maikel David Pérez Gómez c265db936e
Add Sale price validation (#38078)
* Create sale-price block

* Create regular-price block

* Add changelog files

* Fix some typos in field validator names
2023-05-08 10:05:13 -04:00
Jeffrey Paul df0583f9b8
Fix/37502: Correct spelling errors. (#37887)
* change reference of Catpure to Capture

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference of expicitly to explicitly

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference 'cutted' to 'cut'

* change reference 'determening' to 'determining'

* change reference 'retreive' to 'retrieve'

* change reference 'neccessary' to 'necessary'

* change reference 'Fitler' to 'Filter'

* change reference of "seperate" to "separate"

Co-Authored-By: Ankit K Gupta <ankit.himcs@gmail.com>

* change reference of "wether" to "whether"

Co-Authored-By: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>

* change reference of "staus" to "status"

* change reference of "retrive" to "retrieve"

* change references of "gatways" to "gateways"

* change references of "existant" to "existent"

* change reference of "requries" to "requires"

* change reference of "configuation" to "configuration"

* change reference of "processsing" to "processing"

* change reference of "represenation" to "representation"

* change reference of "dimentions" to "dimensions"

* change references of "reigster" to "register"

* change reference of "colum" to "column"

* change reference of "transtions" to "transitions"

* change references of "intially" to "initially"

* change references of "orignal" to "original"

* change references of "deprected" to "deprecated"

* change references of "paramter" to "parameter"

* change reference of "intance" to "instance"

* change reference of "elemets" to "elements"

* change references of "funcitons" to "functions"

* change reference of "specificed" to "specified"

* change references of "atributes" to "attributes"

* change reference of "tast" to "task"

* change reference of "chaning" to "changing"

* change reference of "retreiving" to "retrieving"

* change reference of "caluclation" to "calculation"

* change references of "Invaid" to "Invalid"

* change references of "paramaters" to "parameters"

* change reference of "Additonal" to "Additional"

* change reference of "teh" to "the"

* change reference of "evalutes" to "evaluates"

* change reference of "addedd" to "added"

* change reference of "excempt" to "exempt"

* change reference of "sequencially" to "sequentially"

* change reference of "previos" to "previous"

* change reference of "elegible" to "eligible"

* change references of "Boostrap" to "Bootstrap"

* change references of "compability" to "compatibility"

* change reference of "heirarchy" to "hierarchy"

* change references of "visibilty" to "visibility"

* change reference of "comparsion" to "comparison"

* change reference of "capabilties" to "capabilities"

* change reference of "datatores" to "datastores"

* change reference of "occured" to "occurred"

* change reference of "coresponding" to "corresponding"

* change references of "thier" to "their"

* change reference of "sucessfully" to "successfully"

* change reference of "insde" to "inside"

* change reference of "nagivation" to "navigation"

* change references of "visiblity" to "visibility"

* change reference of "documentaiton" to "documentation"

* change reference of "anayltics" to "analytics"

* change reference of "intalling" to "installing"

* change reference of "mininum" to "minimum"

* change references of "intial" to "initial"

* change reference of "Feld" to "Field"

* change reference of "taks" to "task"

* change reference of "trasnfer" to "transfer"

* change reference of "respone" to "response"

* change reference of "Extenstions" to "Extensions"

* change reference of "detault" to "default"

* change reference of "simultanious" to "simultaneous"

* change reference of "overides" to "overrides"

* change references of "Indvidual" to "Individual"

* change reference of "refering" to "referring"

* change reference of "aginst" to "against"

* change reference of "execuatable" to "executable"

* change reference of "repsonse" to "response"

* change reference of "documention" to "documentation"

* change reference of "asumed" to "assumed"

* change reference of "Minium" to "Minimum"

* change reference of "unqiue" to "unique"

* change references of "existance" to "existence"

* change reference of "compatability" to "compatibility"

* change reference of "Taxnomy" to "Taxonomy"

* change reference of "quering" to "querying"

* change reference of "retrun" to "return"

* change reference of "informations" to "information"

Co-Authored-By: Viktor Szépe <viktor@szepe.net>

* Add changelog

* Add changelog

* Fix typo

---------

Co-authored-by: Vikram  <93216400+vikrampm1@users.noreply.github.com>
Co-authored-by: Ankit K Gupta <ankit.himcs@gmail.com>
Co-authored-by: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-08 15:55:09 +08:00
Joshua T Flowers c4806c3ac8
Show comma separated list in ready only mode of select tree control (#38052)
* Add read-only state to selected items in select control

* Only close menu on focus outside of select control

* Add changelog entry

* Remove errant comment out of onBlur line

* Fix regression of input focus behavior

* Hide input when in read only mode

* Turn off read only mode when focused

* Show select control input on single item dropdowns and when no selections have been made in multiple dropdowns

* Prevent focus loss when removing an item

* Prevent loss of field focus when clicking on selected item tags

* Fix broken assertion with comma separated list

* Add product editor changelog entry
2023-05-08 04:17:52 -03:00
Chi-Hsuan Huang 2a87e4d21c
Migrate select control component to TS (#37751)
* Migrate select control to TS

* Add changelog

* Migrate test to TS

* Change value type to be optional

* Fix missing prop
2023-05-08 12:18:27 +08:00
Joel Thiessen e7d67710fd
Restoring standard tabbing behavior in product block editor (#38105) 2023-05-05 12:39:39 -07:00
Joshua T Flowers f1db682cc6
Fix summary toolbar positioning and selection on blur (#38086)
* Remove block selection on summary input blur

* Move block props to wrapper around rich text

* Fix content ID and for label

* Add changelog entry

* Use useInstanceId instead of lodash uniqueId
2023-05-05 11:52:12 -07:00
Joshua T Flowers bb244484d3
Update shipping dimensions image in new product blocks editor (#38101)
* Update shipping dimensions image SVG

* Allow labels in shipping dimension SVG

* Add changelog entry
2023-05-05 09:15:35 -07:00
Joshua T Flowers 14ed88cd1f
Prevent double debouncing of iframe editor callback (#38087)
* Prevent double debouncing of iframe editor callback

* Add changelog entry
2023-05-05 09:15:07 -07:00
Nathan Silveira 95ca53675f
Fix TreeControl bugs in single selection mode (#38079)
* Add onFirstTreeItemBack hook

* Fix item not being selected on single mode when it had children

* Remove if statement that prevented items with children from being selected in single mode

* Add storybook example with onFirstTreeItemBack

* Remove onFirstTreeItemBack

* Replace radio button with checkbox

* Update changelog
2023-05-05 09:21:32 -03:00
Joshua T Flowers 4deb5b3f84
Remove drag and drop handle in product blocks editor (#38127)
* Remove drag and drop handle in product blocks editor

* Add changelog entry
2023-05-05 04:55:57 -03:00
louwie17 ce07458752
Update disable drag and drop within images block (#38045)
* Allow disabling of drag and drop within ImageGallery component

* Add changelogs

* Fix onReplace logic for images block

* Fixing linting error

---------

Co-authored-by: Joel <dygerati@gmail.com>
2023-05-05 04:45:26 -03:00
Chi-Hsuan Huang ef7bf6a28b
Update Payfast logo and title (#38090)
* Update Payfast title

* Update Payfast logo

* Add changelog

* Update Payfast 72x72 logo
2023-05-05 15:42:47 +08:00
Joel Thiessen 4729ea054b
Adding basic ordering to tab slot fill (#38081) 2023-05-04 10:57:19 -07:00
Chi-Hsuan Huang ea58ae339a
Add core profiler "Welcome to Woo!" page (#37952)
* Add core profiler - welcome to woo page

* Add changelog

* Update checkbox styles

* Update copies

* Add test

* Add enable prop to window.wcTracks type

* Add tracks

* Add explat changelog

* Fix import

* Update default tracking value

* Update copies

* Fix test

* using invoked promise instead of useState

- take advantage of xstate's built ins for side effects instead of  useEffect/hooks
- discovered that error result wasn't really handled in original useEffect
- use text labels instead of inline functions so that we can decouple the implementation from the machine model
- todo: can move the invoked function out elsewhere and also tests if needed (not necessary here because it's a simple call)

* use actions.choose instead of branching inside action 

- https://stately.ai/docs/xstate/transitions-and-choices/guarded-actions#the-choose-action
- makes it so that the machine model is serializeable
- todo: in the distant future i wonder if it might be tidier to have tracks be its own actor that just receives the same events that this machine does, that way it's just standalone instead of mixing up tracks with the implementation

* use dispatch instead of useDispatch

- decouples the implementation of the handler from the react component
- makes the handler testable on its own if needed
- makes the state machine testable without relying on external dependencies

* decoupled remaining function calls

* Fix lint error

* Fix style lint

* address xstate console warnings

- .withConfig() is a function call that returns a new object every invocation so we need to wrap it in useMemo to keep it stable

* Add optInDataSharing is false test

* Fix lint

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-05-03 15:54:28 +08:00
Joel Thiessen 3679f019bb
Adding attributes block to product block editor. (#38051) 2023-05-02 21:13:48 -07:00
Joshua T Flowers 6b141fa2c6
Add fixed toolbar to modal editor (#38031) 2023-05-02 08:45:50 -07:00
Joel Thiessen 16b9191c0d
Adding shipping class option and modal (#37968) 2023-05-01 10:04:54 -07:00
Joshua T Flowers 8827d3fb9a
Add block inspector to modal iframe editor (#38011)
* Add block inspector to modal iframe editor

* Add changelog entry
2023-05-01 10:04:25 -07:00
Joel Thiessen d014e80a20
Fixing more menu width in product block editor header (#38053)
* Fixing more menu styles

* Adding changelog
2023-05-01 06:55:31 -03:00
Nathan Silveira 8fc6972161
Fix N/A displayed on re-enabling toggles for "Stats overview" panel after refreshing "Woocommerce > Home" page. (#38030)
* Fix N/A on stats overview on WooCommerce > Home

* Add changelogs

* Fix wrongfully added type definition
2023-04-28 16:15:10 -03:00
Maikel David Pérez Gómez a35f2c3d5d
Update List price Pricing link on the general tab to navigate to the Pricing tab (#37961)
* Update List price Pricing link on the general tab to navigate to the Pricing tab

* Add changelog files

* Simplify the event name to product_pricing_help_click
2023-04-28 11:33:56 -04:00
Maikel David Pérez Gómez 1514333162
Remove AUTO-DRAFT in product name field on create new product page (#37982)
* Remove AUTO-DRAFT in product name field on create new product page #37930

* Add changelog file

* Remove non needed useEffect import
2023-04-28 11:33:28 -04:00
Maikel David Pérez Gómez f3959d0700
Summary field remove 'inline image' and 'keyboard input' options (#38012)
* Summary field remove 'inline image' and 'keyboard input' options

* Add changelog file
2023-04-28 10:51:22 -04:00
Joshua T Flowers bf14b26846
Add modal editor for use in product editor (#37937)
* Add modal editor for use in product editor

* Allow title of modal to be modified by consumer

* Add changelog entry

* Remove errant style imports after rebase

* Handle PR feedback
2023-04-28 07:48:36 -07:00
louwie17 452fa75038
Remove strange block editor highlighting within product block editor (#38000)
* Remove or hide block highlighting within product block editor

* Add changelog
2023-04-28 08:31:14 -03:00
Moon 8f02ecbeba
Migrate Ellipsis Menu component to TS (#36405)
* Migrate ellipsis-menu to TS

* Add changelog

* Remove React.VFC -- it is deprecated in React 18

* Make renderContent props optional

* Allow KeyboardEvent

* Make onToggle optional

* Allow undefined for backward compatibility

* Remove unnecessary @ts-expect-error -- ellipsis menu is now in TS

* Make onToggle required

* Make event e required - backward compatibility

* Use toggleHandlerOverride to make it more readable

* Remove React.VFC -- it is deprecated in React 18
2023-04-27 17:00:35 -07:00
Joshua T Flowers 64dbeba260
Add ContentPreview component for previewing block content (#37990)
* Allow custom tags and attributes in sanitize html util

* Add ContentPreview component for previewing block content

* Add styling around preview area

* Add changelog entry

* Only show content preview area when content exists
2023-04-26 19:29:50 -07:00
Moon 4f484f144e
Migrate Rating component to TS (#36301)
* Convert rating to ts

* Add changelog

* Add gridicons type

* Fix style

* Change ReactElement to ReactNode

* Remove propTypes

* Remove React.VFC -- it is deprecated in React 18
2023-04-26 15:21:16 -07:00
Matt Sherman e81f8ae88f
Update AdvancedFilters to use createInterpolateElement instead of interpolateComponents (#37967) 2023-04-26 06:58:14 -04:00
psealock b726c62be5 Automated change: Prep @woocommerce/extend-cart-checkout-block for release. 2023-04-26 00:53:18 +00:00
Joel Thiessen 6f7eeeaf49
Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
Joshua T Flowers 48af8c1333
Add the product description block and callbacks for the IframeEditor (#37852)
* Add onChange and onClose callbacks to IframeEditor

* Add description block

* Add initial blocks to iframe editor

* Update button text when description already exists

* Remove unused editorStyle block property

* Debounce onChange callback

* Add changelog entry

* Handle PR feedback

* Fix up export after rebase
2023-04-25 11:05:25 -07:00
Sam Seay 7cbc3811d8
Update monorepo to pnpm 8 and Node to 16.14 (#37915) 2023-04-25 18:49:30 +12:00
Maikel David Pérez Gómez fb7e68a83d
Track stock quantity for this product should be disabled when Enable stock management within settings is disabled, and enabled otherwise (#37957)
* Track stock quantity for this product should be disabled when Enable stock management within settings is disabled, and enabled otherwise.

* Add changelog files
2023-04-24 13:42:45 -04:00
Joel Thiessen 3c5a96712a
Adding Stock status to inventory tab and toggle block (#37906) 2023-04-21 14:49:34 -07:00
Maikel David Pérez Gómez 1f2d735d0c
Update current block names to reflect use case and avoid conflicts (#37851)
* Change woocommerce/product-name to woocommerce/product-name-field

* Change woocommerce/product-summary to woocommerce/product-summary-field

* Change woocommerce/product-pricing to woocommerce/product-pricing-field

* Change woocommerce/product-radio to woocommerce/product-radio-field

* Change woocommerce/product-images to woocommerce/product-images-field

* Fix product name block invalid class name

* Move woocommerce/product-section to blocks folder

* Move woocommerce/product-tab to blocks folder

* Move woocommerce/product-collapsible to blocks folder

* Organize block registration, imports and styles

* Add changelog files

* Change woocommerce/product-category to woocommerce/product-category-field

* Change woocommerce/product-checkbox to woocommerce/product-checkbox-field

* Change woocommerce/product-inventory-email to woocommerce/product-inventory-email-field

* Change woocommerce/product-sku to woocommerce/product-sku-field

* Register woocommerce/product-schedule-sale-fields in server side

* Register woocommerce/product-track-inventory-fields in server side

* Fix invalid reference in tabs tests
2023-04-21 16:26:53 -04:00
Joel Thiessen 87da63eb3a
Moving section icon svgs to assets folder and loading by URL (#37869) 2023-04-21 11:53:06 -07:00
Joshua T Flowers 343d4d9fdf
Record tracks on product edit/update (#37770)
* Add auto-draft to product statuses

* Record event on draft save

* Record event on product update

* Add changelog entry

* Add data changelog

* Refactor to use shared function for recording product events

* Handle PR feedback
2023-04-21 09:51:59 -07:00
Joshua T Flowers 1cc5d0dd15
Disable toolbars in all relevant product editor blocks (#37912)
* Disable toolbars in all relevant product editor blocks

* Add changelog entry
2023-04-21 09:51:40 -07:00
louwie17 e88152ff3c
Add category field block (#37295)
* Add initial category block

* Add changelogs

* Add label to font family for block editor and fix template

* Fix rebase conflict and add content role

* Some styling changes for the category field

* Move category block to blocks folder and fix merge conflict.

* Address some styling issues, and update keywords

* Fix css lint error
2023-04-21 05:10:35 -03:00
Jarda Snajdr 8b8cc93f85
Rewrite the useOptionsHydration hook to not dispatch inside useSelect (#37882)
* Rewrite the useOptionsHydration hook to not dispatch inside useSelect

* Fix types of Options store to allow startResolution etc actions

* fixed tests and added changelog

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-04-21 13:58:27 +08:00
Moon 4a52d6b82c
Rewrite withNavigationHydration to work with Gutenberg 15.5+ (#37901)
* Refactor withNavigationHydration to not dispatch inside useSelect

* Add changelog

* Remove unused import
2023-04-20 20:09:10 -07:00
Moon 83981c61b2
Rewrite the withPluginsHydration hook to not dispatch inside useSelect (#37896)
* Fix types to allow startResolutions etc actions

* Rewrite the usePluginsHydration hook to not dispatch inside useSelect

* Add changelog

* Remove unused import
2023-04-20 20:09:00 -07:00
Moon 85a71f8cee
Rewrite the withCurrentUserHydration hook to not dispatch inside useSelect (#37908)
* Rewrite withCurrentUserHydration hook to not dispatch inside useSelect

* Remove unused import

* Update comment
2023-04-20 20:08:48 -07:00
Joel Thiessen 7023a80937
Adding global product block editor styles (#37805)
* Removing unecessary class

* Organizing editor styles

* Tweaking global fonts

* Correcting section spacing and adding divider

* Adding header styles

* Refactoring block editor styles

* Tweaks to spacing

* Adding changelogs

* Removing uneeded styles

* Fixing colors and link decoration

* Unifying error styles
2023-04-20 05:21:23 -03:00
Maikel David Pérez Gómez 33798acd65
Add a11y support to collapsible content component (#37760)
* Improve a11y support to collapsible content component

* Add changelog file

* Change id pattern to
2023-04-19 18:04:05 -04:00
louwie17 b42da82e50
Update/34885 category field in product editor (#36869)
* Add initial custom meta box for product categories

* Make use of TreeSelectControl

* Update classnames

* Display selected items and sync with most used tab

* Always show placeholder and remove checklist container

* Reactify category metabox tabs

* Add create new category logic

* Remove unused markup

* Fix saving of empty category list

* Add callback when input is cleared as well

* Some small cleanup and refactoring.

* Add changelog

* Fix tree creation and style enqueue

* Auto fix lint errors

* Fix linting errors

* Fix css lint errors

* Add 100 limit, and address some PR feedback

* Fix some styling and warnings

* Remove unused code

* Address PR feedback

* Fix lint error

* Fix lint errors

* Address PR feedback

* Fix lint error

* Minor fixes and add tracking

* Add debounce

* Fix lint error

* Allow custom min filter amount and fix menu not showing after escaping input

* Allow single item to be cleared out of select control

* Fix bug where typed values did not show up

* Fix some styling issues

* Allow parents to be individually selected

* Address PR feedback and add error message

* Add changelogs

* Fix saving issue

* Add client side sorting and stop clearing field upon selection

* Update changelog

* Create feature flag for async product categories dropdown

* Fix lint errors

* Fix linting
2023-04-19 04:28:18 -03:00
Joshua T Flowers ebe879d5dd
Add IframeEditor component to product editor (#37570)
* Add initial modal editor

* Add in iframe editor styles

* Convert components to TS

* Sync dependencies

* Remove unused components and props

* Set min height to avoid jumpiness during resize

* Fix up private APIs dependency version

* Update ModalEditor name to IframeEditor

* Add changelog entry

* Remove IframeEditor from details block

* Update frozen lock file

* Add support for missing gutenberg assets function

* Fix lock file after rebase

* Use default editor settings when none are provided

* Remove currently unused editor styles

* Remove unused private apis package

* Fix php lint errors

* Remove unused import

* Pin keycodes version

* Remove another unused import from testing

* Add WC changelog entry
2023-04-18 10:52:28 -07:00
Maikel David Pérez Gómez 41545ec459
Invert the useValidation hook behavior to return an error instead of a boolean value (#37695)
* Invert the useValidation hook behavior to return an error instead of a boolean value

* Fix validation logic in schedule-sale and track-inventory blocks

* Add changelog file

* Add validations to product name block

* Fix shipping dimensions validations

* Fix shipping fee validations

* Add i18n error message example to readme.md

* Cover semantic issues
2023-04-17 23:54:15 -04:00
Joshua T Flowers ffcbaf5b3a
Move tabs to header and adjust title position (#37696)
* Move product editor tabs to header

* Update header styles to place tabs on bottom

* Center header title and adjust font size

* Style title and columns on mobile

* Add changelog entry

* Truncate longer titles

* Hide title on smaller viewports

* Truncate via css width instead of character count
2023-04-17 15:39:09 -07:00
Chi-Hsuan Huang a953904d84
Remove theme step from onboarding wizard (#37671)
* Remove theme step from onboarding wizard

* Remove theme step from e2e tests

* Deprecated "theme" prop from profileItem type

* Add changelog

* Remove theme product from dashboard

* Update packages/js/data/src/onboarding/types.ts

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

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-04-17 11:59:02 +08:00
Maikel David Pérez Gómez 42cc482ebc
Create shipping fee field block and initial shipping section (#37642)
* Setting up the Fees & dimensions section

* Create product shipping fee block

* Register product shipping fee block

* Add changelog files

* Fix php linter errors

* Add reusable radio field and move the radio block to the blocks folder

* Remove manually set block className because is autogenerated base on the block name
2023-04-14 22:44:28 -04:00
Maikel David Pérez Gómez 3f23301f3f
Create product shipping dimensions block (#37683)
* Move ShippingDimensionsImage component to @woocommerce/product-editor package

* Create woocommerce/product-shipping-dimensions-fields block

* Register woocommerce/product-shipping-dimensions-fields block

* Add changelog files

* Fix php linter error

* Change unused attr name to __contentEditable to better indicate the porpose

* Remove manually set block className because is autogenerated base on the block name
2023-04-14 14:08:57 -04:00
Joel Thiessen 83458a1dee
Adding inventory advanced section with radio and text fields (#37646) 2023-04-14 08:39:53 -07:00
louwie17 6e2c11f556
Select tree dropdown menu SlotFill support (#37574)
* Add initial select tree popover and modal story

* Add slot fill popover support

* Add changelog

* Remove unneeded use of combobox ref in select-tree

* Fix lint errors

* Address PR feedback and fix issue with parent select control

* Add changelog
2023-04-14 04:22:59 -03:00
Joel Thiessen 247787484a
Add inventory section and SKU blocks (#37623) 2023-04-13 15:33:25 -07:00
Joel Thiessen 038b97a318
Add edit product link modal under name field (#37612) 2023-04-13 08:56:47 -07:00
Joel Thiessen fb12ad20fd
Replacing rest_namespace modification with middleware due to blocks issues (#37621) 2023-04-13 08:45:50 -07:00
Ilyas Foo a02d0a8117
Fix invalid return callback ref warning (#37655)
* Fix invalid return in callback ref and add tests

* Changelog
2023-04-13 23:16:45 +08:00
Maikel David Pérez Gómez f5591b7c9a
Add track inventory field to inventory section (#37585) 2023-04-11 11:52:20 -07:00
Maikel David Pérez Gómez 8354ae2792
Create schedule sale pricing block (#37567)
* Create schedule sale pricing block

* Add auto show/hide and clean fields depending on the initial values

* Add validations to From and To dates fields

* Add changelog files

* Align block with the figma design

* Revert linter replacement in the editor global style.scss file

* Fix some words typos

* Move and rename schedule sale block to the blocks folder

* Load datetime format from @wordpress/date instead of using the woo options datastore

* Remove the min difference using by moment to compare dates from 'minute' to undefined

* Make sure the dates are normalized for comparison
2023-04-11 10:53:37 -04:00
Nathan Silveira fa4dd90401
Change link all variations label (#37632) 2023-04-11 11:44:27 -03:00
Darren Ethier 50593c5257
Fix issue that breaks the WooCommerce Home Page when Gutenberg 15.5 is active (#37641)
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2023-04-11 15:27:38 +08:00
Joshua T Flowers 7734027b4a
Add product radio block and tax class to product blocks editor (#37529)
* Add product radio block

* Wrap tax class radio in collapsible block

* Add link to description and sanitize HTML

* Add changelog entry

* Fix up php lint errors

* Add changelog entry

* Fix linting errors

* Remove unused import
2023-04-05 10:13:05 -07:00
Maikel David Pérez Gómez bb22fd5864
Prevent click event when buttons are aria-disabled (#37577)
* Prevent click event when buttons are aria-disabled

* Add changelog file
2023-04-05 12:55:22 -04:00
Maikel David Pérez Gómez f7572b4361
Move the Save draft and Preview buttons to the product editor header (#37461)
* Add preview button to the product editor header

* Publish the product on add or on save

* Add save draft button

* Save product changes before previewing it

* Add notice messages

* Fix linter errors

* Force the store page to be openned in a new tab after publishing the product

* Enable publish button when the status is not publish

* Add changelog files

* Fix some comment typos

* Address comment suggestions

* Move preview logic to its own component

* Move save draft logic to its own component

* Move publish logic to its own component
2023-04-04 11:30:39 -04:00
Nathan Silveira 6291d10112
Use SelectTree component in Category field (#37479)
* Migrate category field to TreeSelect

* Rename and refactor some props due to changes in SelectTree that were introduced afterwards

* add Changelog

* Rename type to a better name

* Add tests to select-tree and remove tests from category-field

* Restore ts change that broke build

* Run linter

* Fix broken tests

* Update test

* Import from wordpress instead of react
2023-04-04 09:28:19 -03:00
Ilyas Foo 502279dff1
Remove inbox notes exceeding characters warning (#37392)
* Removed inbox notes warning

* Changelog

* Removed dompurify dependency from data package

* Remove dompurify types
2023-04-03 19:13:36 +08:00
Maikel David Pérez Gómez 6df1cef307
Add Sale price and list price blocks to pricing tab with pricing section (#37513)
* Add pricing section to the pricing tab

* Add changelog file

* Fix php linter errors
2023-03-31 14:47:31 -03:00
Joshua T Flowers 85080f642b
Add block related assets entry points to product editor build (#37318)
* Add editorStyle properties to blocks

* Rename style.scss files to editor.scss

* Get block entry points for block related assets

* Copy block assets to core assets build folder

* Remove unusable dependency

* Add changelog entries

* Fix up RTL style builds for block assets

* Update copy-webpack-plugin dependency and lock file

* Fix up lock file after rebase

* Fix order of webpack rtl stylesheet builds to prevent additional stylsheets

* Fix up lock file after rebase

* Fix tsconfig
2023-03-31 10:36:40 -07:00
Joshua T Flowers 681391a50a
Add product images block to product editor (#37455)
* Add images block to the product editor

* Allow html in section block descriptions

* Add changelog entry

* Add client changelog entry

* Remove SVG related changes

* Fix up lock file after rebase

* Remove unused import

* Fix up php lint errors

* Move sanitize function to utils folder
2023-03-30 11:22:07 -07:00
Gan Eng Chin b2629c03db
Make Multichannel Marketing the default new UI for Marketing page (#37430) 2023-03-29 21:09:23 +08:00
Gan Eng Chin 34bd123448
Remove unused button-style mixins. 2023-03-29 19:06:40 +08:00
Chi-Hsuan Huang 19a119f0a8
Upstream changes from experimental-select-control back to @woocommerce/components (#36521)
* Add scrollIntoViewOnOpen and position props to menu

* Add ability to customize active item style

* Add menu toggle button

* Add changelog

* Fix changelog

* Rename toggle button classname

* Change default menu position

* Update toggle button story

* Add default value to getToggleButtonProps
2023-03-29 17:18:43 +08:00
Niels Lange 96a1e9cd7b
Update extend-cart-checkout-block dependency (#37191) 2023-03-29 09:39:46 +07:00
Joshua T Flowers 49cde4cad6
Content lock all blocks in the product editor (#37382)
* Lock all blocks in the product editor to content only

* Add changelog entry

* Add content role to summary field to allow editing

* Remove unused BlockControls
2023-03-28 15:18:00 -07:00
Christopher Allford 2f4f0bea54
Added Build File Caching (#37459)
Since these files can impact the build, we need to make sure to use
them as part of the cache key.
2023-03-28 12:48:20 -07:00
Matt Sherman 30ea6cfc71
Show spotlight when switching to variable product type (#37413)
* Show variable product tour
* Only show tour when product type is changed to variable
* Only show tour if it hasn't been shown before
* Add variable_product_tour_shown to UserPreferences type
* Store whether tour has been shown in user preferences
* Record Tracks events
* Add docblock for woocommerce_admin_get_user_data_fields filter
* Add test for tour
2023-03-28 13:49:40 -04:00
Matt Sherman eab7750208
Move product-editor CES-related components and utilities (#37131)
* Update package.json and lock file
* Move ProductMVPFeedbackModal to @woocommerce/product-editor
* Move ProductMVPFeedbackModalContainer to @woocommerce/product-editor
* Move ProductMVPCESFooter and useProductMVPCESFooter to @woocommerce/product-editor
* FIx mock of __experimentalUseProductMVPCESFooter in test
2023-03-28 13:38:08 -04:00
louwie17 bc42b853d8
Update product editor interpolate components (#37453)
* Remove use cases of `interpolateComponents`

* Remove from package json

* Add changelog
2023-03-28 04:15:17 -03:00
Niels Lange 9eeda1d853
Move .wp-env.json.mustache to root folder 2023-03-28 12:05:58 +07:00
Maikel David Pérez Gómez a5b104eaed
Add icon support to product section block (#37340)
* Add block icon component

* Use the block icon component within the section block

* Add changelog file

* Fix rebase conflicts

* Remove icon configuration from the client side

* Change the BlockIcon component to get the icon from the attributes first and then from the metadata

* Expose the BlockIcon to be used outside of the package

* Add the BlockIcon documentation

* Configure the block to support the new icon via attributes

* Set the icon to the block section in the server template definition

* Revert back index.tsx -> index.ts in the section block

* Fix php linter errors

* Add changelog file

* Fix php linter error

* Return null instead of a Fragment
2023-03-27 12:52:03 -03:00
Matt Sherman de111c1edb
Update TourKit README to correct primaryButton example and formatting (#37427) 2023-03-27 07:09:39 -04:00
Matt Sherman a77e4abffe
Emit error on webpack build when invalid export name used in import for JS (#37195) 2023-03-26 21:42:33 -04:00
Christopher Allford a8fff3175c
Fix TypeScript Incremental Build Regression (#37432) 2023-03-24 12:07:49 -07:00
Nathan Silveira 1f698d2583
Create experimental SelectTree component (#37319)
* Create a new experimental component TreeSelect
Add functionality to TreeControl to support additional scenarios

* Fix a bug where the shouldNotRecursivelySelect was not passed to Trees inside Tree Items

* Do not collapse nodes inside useEffect if they are already expanded

* Add storybook example for SelectTreeControl

* Move component to its own directory

* Remove wrong comment

* Fix CSS import path

* Remove getFilteredItems from select-tree

* Stop using getFilteredItems inside select tree
Create new shouldShowCreateButton prop to allow receiving only filtered items inside component
Remove support to show custom getItemLabel and getItemValue

* Change interface

* Rename back Item type names

* Rename back value

* Fix lint error and remove passing ref to treeProps

* Make id mandatory in SelectTree

* Refactor

* Improve selector to focus on create button
2023-03-24 14:49:45 -03:00
Christopher Allford 67cde87fd1
Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
Christopher Allford 3d614cd862
Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00
Joshua T Flowers 562749b60a
Prevent duplicate registration of core blocks in client (#37350)
* Prevent duplicate registration of core blocks

* Add components changelog entry
2023-03-22 16:56:35 -07:00
Joel Thiessen 4ae467af9e
Adding more menu with items using slot fill (#37255)
* Refactored, adding slot fill, basic working via common components

* Pinning plugins dep

* More menu style tweaks

* Fixing merge issues

* Adding product header item slotfill to support more menu modal

* Fixing moved imports

* Adding changelogs

* Adding hover state for more menu toggle btn

* Fixing typo

* Refactoring to use WooHeaderItem instead of adding new slot-fill

* Removing unneeded fragment

* Adding admin layout changelog

* PR feedback

* Fix up lock file after rebase

---------

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2023-03-22 07:30:06 -03:00
Joel Thiessen b8416d7948
Replacing multiple components on the product page with a single hook. (#37283)
* Replacing multiple componments on the product page with a single hook.

* Adding changelog

* Removed the conditional hook logic, because of React rule - Don’t call Hooks inside loops, conditions, or nested functions.

* Use promise for receiving entity, and reload template on product change

* Add changelog

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-22 04:48:55 -03:00
Matt Sherman b27f6023f8
Move remaining CES-related components to @woocommerce/customer-effort-score (#37316)
* Add @woocommerce/tracks to dev dependencies
* Move remaining CES-related components to @woocommerce/customer-effort-score
* Update imports in woocommerce/client/admin
2023-03-21 11:58:35 -04:00
Maikel David Pérez Gómez 62ca7a266b
Add the summary field to the product form (#37302)
* Add summary block

* Add changelog files

* Add text alignment

* Add RTL and type definitions

* Add justify text alignment

* Fix rebasing errors
2023-03-21 12:34:24 -03:00
Maikel David Pérez Gómez b9df0e09f0
Create a helper hook for field validation (#37196)
* Add custom hook to validate product fields within blocks

* Add changelog file

* Add unit tests

* Fix non working tests

* Fix linter errors

* Add changelog file

* Fix async validation rejection

* Solve conflicts after rebasing

* Revert false negative lint errors

* Move the hook to its own folder and add the readme.md file
2023-03-20 23:12:09 -03:00
Joel Thiessen edbe36d7ad
Adding collapsible content block with flexible rendering (#37305)
* Adding collapsible content block with flexible rendering

* Adding changelogs

* Move content inside display state to avoid backwards compat issues

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-20 18:18:44 -07:00
Chi-Hsuan Huang 7b10baff00
Add tracks for plugin installation and activation (#37261)
* Add @woocommerce/tracks to @woocommerce/data dependencies

* Add tracks for plugin actions and handle plugin error properly

* Add changelog

* Add doc

* Update doc
2023-03-20 10:38:30 +08:00
louwie17 345ad58919
Add product pricing block (#37211)
* Adding initial pricing block

* Have price block render in form

* Make sure price is loaded correctly and fix template rendering

* Make pricing block abstract and add list and sale price to template

* Add changelogs

* Revert changes in wc/data package

* Fix lint issues

* Fix type error

* Add styling

* Fix styling lint issues

* Revert config change missed in rebase

* Make use of base control help text for field info

* Allow additional callbacks for onFocus and onKeyUp
2023-03-17 14:03:10 -03:00
Maikel David Pérez Gómez e370f25c0c
Add a product header component to the blocks interface (#37152)
* Add button and saving logic

* Add comment suggestions

* Add changelog files

* Add comment suggestions

* Set header title to product name if the name field is dirty otherwise the default title value

* Navigate to EditProductPage after creating the product succesfully

* Add get-header-title util and expose edited product name from useSelect
2023-03-17 13:21:15 -03:00
Joshua T Flowers 5ed070d78a
Add tests around product block editor tabs (#37225)
* Add tests around tabs

* Add changelog entry

* Fix up frozen lock file

* Fix up frozen lock file

* Fix up lock file after rebase
2023-03-16 14:46:38 -07:00
Joshua T Flowers 90e7c66ba6
Remove the product block breadcrumbs and sidebar inspector (#37250)
* Remove the product block breadcrumbs and sidebar inspector

* Add changelog entry
2023-03-16 09:12:11 -07:00
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Joshua T Flowers 77937dd8cb
Move usePreventLeavingPage to navigation package (#36752)
* Move usePreventLeavingPage to navigation package

* Rename usePreventLeavingPage to useConfirmUnsavedChanges

* Move imports to external dependencies

* Fix up history push overrides

* Add changelog entries

* Fix up rebase issues

* Update i18n dependency to wp-6.0

* Fix up lock file

* Remove unused imports

* Update lock file

* Remove self import for navUtils
2023-03-16 05:33:22 -03:00
Chi-Hsuan Huang f50abc724f
Remove accordion from "Other payment providers" in WC Pay Task (#37205)
* Remove accordion from Other payment providers in WC Pay Task

* Add changelog

* Fix tests

* Update test

* Fix e2e test
2023-03-16 12:11:59 +08:00
Joshua T Flowers cb82998688
Improve accessibility around product editor tabs (#37217)
* Improve accessibility around product editor tabs

* Add changelog entry
2023-03-15 11:50:37 -07:00
louwie17 93506388e3
Update product rest config and template block usage (#37206)
* Update product post rest configs

* Update block usage

* Add changelogs

* Fix lint

* Make use of setupEditorState instead of setupEditor as we do not have a content block

* Simplify product condition

* Make use of core store only
2023-03-15 13:44:05 -03:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04:00
Niels Lange 42235d1f31
Update extend-cart-checkout-block dependency 2023-03-14 11:57:22 +07:00
Joshua T Flowers 31ec8d8352
Add tab blocks to the blocks product editor (#37174)
* Add initial tab block and tabs render

* Add tabs styling

* Set initially selected tab on render

* Set initial tab based on query param

* Add template placeholder with tabs

* Add changelog entry

* Allow multiple tab and section blocks

* Add changelog entry for wc

* Fix up arrow alignment

* Fix up block configuration type

* Add missing navigation dependency to product editor
2023-03-13 15:00:50 -07:00
Joshua T Flowers 2b4ed6fe03
Add section block for use in product editor (#37153)
* Allow json imports in product editor package

* Add section block

* Init all blocks in product editor

* Add section styles and base product editor font styles

* Add changelog entry

* Handle PR feedback
2023-03-13 11:38:16 -07:00
Joel Thiessen 4dff6db40f
Adding test name block with support for entity data store (#37132)
* Adding test name block with support for entity data store

* Adding changelog

* Changing block.ts to block.json and amending TS config to support

* Experiment in loading blocks from settings template

* Enable the use of templates with the block editor

* Fix dependency

* Add changelog

* Fix lint error and remove unused utils

* Fix tests by fixing mocks

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-13 11:45:25 -03:00
louwie17 329b0cbd07
Hydrate product editor settings (#37123) 2023-03-10 12:21:22 -08:00
Matt Sherman af24637439
Create @woocommerce/admin-layout package (#37094)
* Initial admin-layout package skeleton

* Changelog files

* Use createOrderedChildren and sortFillsByOrder from @woocommerce/components for WooFooterItem

* Move WooFooterItem to @woocommerce/admin-layout

* Use WooFooterItem from @woocommerce/admin-layout

* Suppress errant TS lint errors

* Exports for @woocommerce/admin-layout

* Fill updates and eslint suppression

* Changelogs

* Remove suppression of tslint errors

* Fix react and @types/react versions

* Load @woocommerce/admin-layout script and styles

* Move WooHeaderItem, WooHeaderNavigationItem, and WooHeaderPageTitle to @woocommerce/admin-layout

* Regenerate lock file post-rebase

* Remove duplicate import post-rebase

* Add wc-admin-layout to app style dependency

* Fix jest mock of @woocommerce/admin-layout

* Fix spacing.

* Export slot names

* Fix typo in .npmrc

* Update lock file

* Try updating lock file

* Update lock file

* Update lock file

* Update to latest lock file from trunk

* Update lock file

* Sync dependencies of @woocommerce/admin-layout

* Manually sync @wordpress dependencies
2023-03-10 09:58:02 -05:00
Sam Seay bec3ec18ac
Update Syncpack and use it to pin @wordpress packages to wp-6.0 (#37034) 2023-03-09 10:13:25 +13:00
Maikel David Pérez Gómez 3ded2b46e9
Create editor skeleton on add/edit product pages (#37023)
* Add required dependencies

* Create the block editor component

* Create the header component

* Create the sidebar component

* Create the editor component

* Remove comments

* Export the block editor from its package

* Enqueue wp-edit-site

* Create the new block mode product page

* Register the new ProductPage component in /add-product route

* Add temporal layout styles

* Fix rebasing conflicts

* Fix linter errors

* Redirect to the new product-editor page when edit

* Add changelog files

* Fixing dependencies conflicts and ignoring some non running test

* Add comment suggestions

* Fix conflicts after rebasing

* Add comment suggestions
2023-03-08 05:51:59 -04:00
Joel Thiessen 2332c7c813
Migrating details fields to product-editor package (#36945) 2023-03-06 14:33:10 -08:00
Joel Thiessen b825b51767
Moving useProductHelper and useVariationsOrder hooks to product editor package (#37006) 2023-03-06 09:11:54 -08:00
Maikel David Pérez Gómez 7dd379773b
Add a11y support for the tree-control (#36459)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add a11y landmarks

* Add keyboard interactions

* Add changelog file

* Fix linter errors

* Resolving rebase conflicts

* Add comment suggestions
2023-03-02 17:26:41 -03:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Maikel David Pérez Gómez e61211406f
Add hightlighter to the tree control (#36480)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add type definitions

* Add custom hook to manage highlight

* Add hightlighter to the tree control

* Add stories

* Add changelog file

* Fix rebase conflicts

* Add comment suggestions
2023-03-01 13:52:23 -03:00
louwie17 93af1c73e9
Update tree select control (#36932)
* Export tree select control and add 3 additional props

* Update storyboook

* Add unit tests for new props

* Fix duplicate parent selection
2023-03-01 03:54:53 -04:00
Maikel David Pérez Gómez 7d0669dcb1
Add selection to the tree control (#36435)
* Create tree-control component

* Remove items from treeItemProps

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Add the type definitions

* Add use selection hook

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add selection logic to the tree control

* Create stories

* Add changelog file

* Fix linter error

* Add styles to fit the disign

* Highlight selected item when it's a single selection tree

* Rebasing from trunk

* Add comment suggestions

* Fix unit test errors due to a new version of @wordpress/compose related to the ResizeObserve feat
2023-02-28 15:10:12 -03:00
Joel Thiessen 6a345ac7eb
Moving currencyContext to currency package and updating references (#36959) 2023-02-28 08:55:49 -08:00
Paul Sealock da1dce8f19
Package Release: handle initial release case (#36922) 2023-02-28 09:36:38 +13:00
Maikel David Pérez Gómez e5d8b61373
Add custom rendering logic to the item label (#36476)
* Add type definitions

* Add custom rendering logic to the item label

* Add stories

* Add changelog file

* Fix rebase merge issue

* Fix up stories after rebase

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-24 17:00:32 -03:00
louwie17 aec4dfd3bd
Update product editor package (#36830)
* Add missing dev packages to product-editor package

* Create components folder for organization

* Move product field, section and tab slots over to product-editor package

* Move use of product slot fills to product-editor package

* Sync dependencies

* Add changelogs

* Update README's and add constant for default values

* Update README's in product-editor package
2023-02-24 09:37:53 -04:00
Joshua T Flowers 87d79f15a3
Move product editor utils to product editor package (#36730)
* Move product editor utils to product editor package

* Add changelog entries

* Move remaining utils

* Move util import/exports to separate index file
2023-02-23 09:48:49 -08:00
RJ d26dd4c772
Add: shipping plugins in shipping task based on location (#36873)
Co-authored-by: moon <moon.kyong@automattic.com>
2023-02-20 21:32:14 +08:00
Chi-Hsuan Huang 3c113d1b79
Add `fills` prop to `useSlot` return object to fix task list bugs in WP 6.2 (#36887)
Add fills prop to useSlot return object for backwards compatibility
2023-02-20 17:07:58 +08:00
Moon e297821a9f
Support opening direction prop for ExperimentalCollapsibleList component (#36806)
* Support direction prop

* Update story with direction control

* Add changelog

* Change possible direction value to up or down
2023-02-17 14:11:33 -08:00
louwie17 23d5c4d074
Update product editor packages (#36815)
* Add product section components back to Components package

* Fix imports

* Add a deprecated message

* Add changelog.
2023-02-16 10:43:23 -04:00
louwie17 f615c58714
Fix create ordered children helper function (#36831)
* Still pass injectProps into child props for slot fill helper

* Add changelog
2023-02-16 10:42:41 -04:00
Matt Sherman 465b3d0dd5
Use createSelector for getPermalinkParts selector to cache result (#36848) 2023-02-16 09:13:00 -05:00
Matt Sherman e05a191156
Use products data store for getPermalinkParts selector (#36706)
* Add generated_slug and permalink_template to Product

* Update getPermalinkParts to use products data store instead of posts data store

* Remove ts-expect-error directive

* Changelog

* Add resolver for getPermalinkParts
2023-02-15 11:02:55 -05:00
Matt Sherman 993f1f4879
Fix SelectControl and TreeControl styles (#36718)
* Change TreeItem background hover/focus color to $gray-100

* Remove errand importing of native colors

* Changelog
2023-02-15 09:12:21 -03:00
Tomek Wytrębowicz c5cbc8d4ab
Update `config@3.3.7` (from `3.3.3`) (#33828)
* Update `config@3.3.7` (from `3.3.3`)

Add it to syncpack, to avoid `ReferenceError: node_env_var_name is not defined` when external extension imports and transforms the `admin-e2e-tests` directly from `node_modules`.

Include https://github.com/node-config/node-config/pull/642
2023-02-14 18:34:00 +13:00
github-actions[bot] a3e26fe9ea
Prepare Packages for Release (#36825)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2023-02-14 09:43:17 +08:00
github-actions[bot] fb3183d2c4
Prepare Packages for Release (#36814)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2023-02-14 04:12:09 +13:00
Fernando Marichal f6e325bfab
Refactor createOrderedChildren (#36707)
* Refactor createOrderedChildren

* Add changelog

* Add getChildrenAndProps method

* Change method comments

* Change comment

* Change comment `injectProps`

* Add comment to explain check

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-02-13 04:42:26 -04:00
Moon f1c2b28608
Add codistoconnect to pluginNames (#36766)
* Add codistoconnect to pluginNames

* Add changelog
2023-02-06 18:10:25 -08:00
Leif Singer d0a2b582fe
Consolidate eslint versions (#36700)
* pin eslint in .syncpackrc

run `pnpm run sync-dependencies` to ensure pinned version is used across projects, then run `pnpm install` to update `pnpm-lock.yaml`

* add changelog files

ran `pnpm run --no-bail --filter='[HEAD^1]' changelog add --significance=patch --type=dev --entry='Update eslint to 8.32.0 across the monorepo.'`

* re-run `pnpm install` to fix what broke while merging
2023-02-02 23:25:04 +13:00
Barry Hughes 463082fb28
Revert/36294 (#36714)
* Revert "Update spelling of Cancelled to Canceled for US English. (#36294)"

This reverts commit e588c560bf.

* Changelog note
2023-02-01 13:59:42 -06:00
Maikel David Pérez Gómez 5570f6a3e8
Add tree-control expand/collapse on click the expander button or by a custom logic (#36434)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Update changelog

* Clean up styles

* Update isItemExpanded code doc

* Rename expanded props

* Destructure expander

* Update shouldItemBeExpanded code doc

* Remove useCallback from story

* Remove useCallback from shouldItemBeExpanded code doc

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-01 12:04:50 -05:00
louwie17 5f0572664f
Add new `@woocommerce/product-editor` JS package (#36600)
* Bootstrap product-editor package

* Move product section components over to product editor package

* Add changelogs

* Remove unused import leftover from rebase
2023-01-31 09:38:28 -04:00
Joel Thiessen c080886262
Implementation of separate variant slots via refactored components (#36646)
* Adding contants, renaming files, wiring up shipping section with discrete slots for variants and non-variants

* Refactoring pricing section to give discrete slots for variant and non-variant forms

* Refactoring inventory fills to give discrete slots for variant and non-variant products

* Adding additional slot to pricing -> taxes -> advanced

* Renaming api fields component file

* Refactoring images, details and attributes to match others

* Ensure variant field IDs are distinct, organize all product field fill IDs

* Adding changelog

* Simplifying IDs used for slots

* Minor refactor of pricing taxes class field

* Give api fill exports their own registerPlugin scope

* Refactoring WooProductFieldItem to generate unique IDs

* Adding components changelog
2023-01-31 07:19:21 -04:00
Joel Thiessen 79c596cbd0
Updating section and field product fills to support multiple slots (#36592) 2023-01-27 08:42:51 -08:00
Matt Sherman 43a42eac27
Include CSS for experimental tree control (#36517)
* Add @wordpress/base-styles as dependency to @woocommerce/components

* Import experimental tree control styles

* Calc padding-left for tree item in CSS instead of JS

* Force resolution of 7.0.2 react and install base styles.

* Update lock file

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-01-26 14:45:14 -05:00
Nathan Silveira b7fd3d9e76
Move registerFill call to inside an useEffect (#36623)
That call was causing a React error (Cannot update a component while rendering a different component)
2023-01-26 13:59:52 -03:00
Nathan Silveira a274057a6e
Create PHP helper functions for adding new tabs (#36583)
* Update documentation on how to add a new field through FormFactory

* Add method to add_tab through FormFactory

* Update ProductForm definition and add Tabs

* Add changelog

* Add test to add_tab and get_tabs methods

* Add changelog for @woocommerce/data

* Add tabs to reducer actions and initial state

* Remove unused function

* Fix unit test

* Increment Tabs TypeScript definition

* Add required fields to Tab class and refactor to reduce lines of code

* Change from filter to action in doc example

* Update method documentation

* Add required fields to test

* Change productform_field test

* Fix form-factory unit test

* Update wrong comment
2023-01-25 18:21:41 -03:00
louwie17 bcdf2518e6
Refactor product tabs and add product tab slot fills (#36551) 2023-01-24 15:37:21 -08:00
Joel Thiessen 4341a53144
Migrating pricing section in product editor to slot fills (#36500)
* Adding changelogs

* Migrating pricing section in product editor to slot fills

* Adding slot and plugarea to variation form

* Removing obsolete pricing section files
2023-01-24 04:24:45 -04:00
Paul Sealock 0beb6b7503
Create woo extension: Update Woo version (#36567)
* Update woocommerce version

* changelog
2023-01-24 21:08:59 +13:00
Joshua T Flowers 372208be41
Always show comments for product feedback form (#36484)
* Always show comments for product feedback form

* Add changelog entry

* Add CES changelog entry

* Fix up lint errors

* Add default for shouldShowComments in CustomerFeedbackModal
2023-01-23 17:36:48 -08:00
Fernando Marichal f13564419b
Add feedback modal and product mvp feedback modal components (#36532)
* Add FeedbackModal component

* Add ProductMVPFeedbackModal package

* Add ref

* Fix `Send feedback` button type

* Add changelog

* Rename a few props

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 20:19:37 -03:00
Ilyas Foo 30a4bdefd8
Add Tasklist extensibility and WooOnboardingTaskListHeader SlotFill (#36519)
* Add experimental onboarding_tasklist PHP filter

* Add WooOnboardingTaskListHeader and woocommerce_onboarding_task_list_header Slot to task list

* Changelog

* Fix header task logic

* Remove React FC types

* Update changelog

* Fix comment
2023-01-21 15:19:20 +08:00
Moon 0d67a6aaf1
Migrate Table component to TS (#36370)
* Migrate table component to TS

* Revert pnpm-lock to orig

* Revert pnpm-lock to orig

* Fix eslint errors

* Update packages/js/components/src/table/empty.tsx

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

* Update packages/js/components/src/table/empty.tsx

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

* Remove unnecessary empty space and convert comment stlye

* Update packages/js/components/src/table/index.tsx

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

* Remove unnecessary type casting

* Type defaultOnQueryChange func correctly

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-19 13:05:12 -08:00
Maikel David Pérez Gómez eca891df09
Create tree-control component (#36432) 2023-01-19 13:59:08 -05:00
Joel Thiessen 2fae3537a7
Experimental SlotContext for managing slot fill interactions (#36333)
* Adding Slotcontext component and adding support to product slot fill components

* Passing inject props correctly to non-function components.
2023-01-19 05:52:45 -04:00
louwie17 fc1745b03b
Add/36075 render fields sections from php config (#36414)
* Add initial component to auto load fills from API config

* Add changelog

* Update logic to make use of new store and re-usable components

* Add changelog

* Add loading state for product form data to add/edit product pages
2023-01-19 04:52:02 -04:00
Joshua T Flowers 1337a6d36e
Add product tour to new product management experience (#36428)
* Add product tour container and modal

* Fix modal open class name

* Add product tour

* Add changelog entry

* Move product tour state logic into hook

* Fix tour selectors for pricing and actions

* Add tests around product tour container

* Add tests around useProductTour hook

* Make tour responsive

* Use tabs instead of spaces

* Fix more scss lint errors

* Remove extra whitespace
2023-01-18 11:11:02 -08:00
Chi-Hsuan Huang e9a4d6c9ba
Add an optional "InputProps" to experimental SelectControl component (#36470)
* Add inputProps to experimental SelectControl component so we can pass custom props to the input

* Add changelog
2023-01-18 11:56:33 +08:00
Joel Thiessen d9daad3e9c
Converting product details section to utilize slot fills (#36368)
* Working prototype of product details via slotfill

* Raising default order for product slot-fills

* Move logic to details field name component

* Adding order prop to all fills.

* Adding components changelog

* Adding changelog

* Deleting obsolete product details section files

* Reducing spacing between slot filled fields
2023-01-17 05:04:58 -04:00
louwie17 8fc9c5cc09
Add basic fields for rendering of Product MVP (#36392) 2023-01-16 12:50:30 -08:00
Joshua T Flowers 0d6af37a66
Add requesting state, actions, and selectors to CRUD data stores (#36297)
* Add requesting state, actions, and selectors to CRUD data stores

* Allow resource specific selectors for requesting status

* Use constants for action names in reducer

* Add tests around new utils

* Add changelog entry

* Use getResourceName instead of getRequestKey in reducer

* Rename and use getRequestIdentifier to avoid ambiguity with resource names

* Sanitize and replace ID query with key in resolution selectors

* Fix up crud action names and remove camel casing

* Fix missing ID in ID query check

* Fix up tests around request identifier

* Add additional tests around utils

* Clean up imports

* Add missing selectors to tests
2023-01-16 07:54:33 -08:00
Joel Thiessen 2dce575449
Adding ProductForm data store (#36430)
* Removing overriding functions in Section.php

* Adding changelog

* Adding product form data store

* Adding data package changelog
2023-01-16 08:13:55 -04:00
Moon c3d62f113a
Migrate product image component to TS (#36305)
* Convert product-image to ts

* Add changelog

* Remove unused ts-expect-error

* Allow arbitrary properties for product

* Remove propTypes

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Update packages/js/components/src/product-image/index.tsx

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

* Remove unused import

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 19:19:01 -08:00
Moon 4ff99a8555
Migrate Section component to TS (#36298)
* Convert to ts

* Add changelog

* Fix style

* Remove propTypes

* Remove unused import

* Only allow false

* Update packages/js/components/src/section/section.tsx

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

* Update packages/js/components/src/section/section.tsx

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

* Update packages/js/components/src/section/section.tsx

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 13:57:15 -08:00
louwie17 b8c25b49bf
Initial product form field store (#36362)
* Add initial product fields registry store and helper functions

* Add changelog

* Change edit to render and address PR feedback

* Make use of memoize-one instead of rememo as memoize-one is already installed
2023-01-12 04:02:35 -04:00
Matt Harrison e588c560bf
Update spelling of Cancelled to Canceled for US English. (#36294)
* Update spelling of Cancelled to Canceled for US English.

This only updates output display text that uses US English. All code that uses
the form Cancelled is unchanged and is perfectly fine to stay as Cancelled.
(since it is behind the scenes and would require changes in other plugins)

For languages where Cancelled is preferred such as UK English the approprate
form can be applied in the translation files.

Fixes https://github.com/woocommerce/woocommerce/issues/25847

* add changelog file

* Update plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js

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

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 12:13:36 +08:00
Joel Thiessen 6e428201c1
Adding WooProductSectionItem slotfill (#36331) 2023-01-11 10:00:20 -08:00
Maikel David Pérez Gómez 8bada412d4
Product variations should inherit parent product properties (#36234)
Remove manage_stock 'parent' value before saving the variation
2023-01-11 11:41:25 -03:00
Miguel Pérez Pellicer ef3d15fcd4
Make secondQuestion and title params optional in CES Prompt (#36270)
* Set secondQuestion and title as optional

* Update docs and changelog

* Fixes after review
2023-01-11 18:53:36 +07:00
Joel Thiessen f429b9444c
Adding WooProductFieldItem slotfill (#36315) 2023-01-10 10:13:02 -08:00
RJ 4927a2e412
dev: migrate @woocommerce/components/link to ts (#36285) 2023-01-10 19:12:22 +08:00
Roy Ho aca46fb7d1
Dev/woo ext/components (#36328)
* Add woo components and lock wp scripts dep

* Add some example usage of Woo components

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
2023-01-06 14:04:08 -08:00
Maikel David Pérez Gómez 1ab678c13f
Include tax options in pricing section (#36299)
* Add Charge sales tax on sub section to pricing section when enable taxes is set to yes

* Add tax classes datastore

* Load tax classes in pricing section

* Set empty value when tax class is standard rate

* Add changelog files

* Add custom resolver to use slug as id for tax classes

* Add helper text and learn more link to tax class radio group
2023-01-06 09:41:45 -03:00
Fernando Marichal a9005c58f0
Fix moving list item also moves image gallery item (#36262)
* Fix list id

# Conflicts:
#	pnpm-lock.yaml

* Add changelog

* Add package changelog

* Remove changelog

* Add `-` between the item `index` and `id`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-06 08:53:33 -03:00
Chi-Hsuan Huang 2d4f62be7a
Migrate Tag component to TS (#36265)
* Migrate Tag components's tests and stories to TS

* Migrate tag component to TS

* Add changelog

* Fix prop types

* Remove jsdoc, proptype and add inline ts comments

* Remove unused import
2023-01-06 10:48:03 +08:00
Joshua T Flowers 8b905b92c0
Allow product tab navigation without prompting for unsaved changes (#36235)
* Add callback to confirm whether or not the prevent leaving page prompt should trigger

* Move prevent leaving logic to util and add tests

* Add changelog entry

* Add navigation changelog entry

* Fix WooCommerce data mock

* Revert desctructuring of nav properties
2023-01-05 18:30:36 -08:00
Vedanshu Jain f36a16cd06
Update changelogger to 3.3.0 to support PR number capturing with merge (#36266)
* Update changelogger.

* Add changelog.

* Update changelogger for all packages.

* Add changelogs.

* Update changelog for remaining packages.
2023-01-05 14:42:51 +05:30
github-actions[bot] 216a7505df
Prepare Packages for Release (#36210)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: puntope <puntope@users.noreply.github.com>
2023-01-03 18:53:06 +07:00
Paul Sealock f557c44a0d
Create Woo Extension: Update Readme (#36156) 2023-01-03 07:03:44 +13:00
Chi-Hsuan Huang 9f0d718a33
Cleanup product task experiment (#35950)
* Cleanup product task experiment

* Rename experimental-products -> products

* Add changelog

* Clean up product task experiment in woo/onboarding

Remove product variant

* Rename experimental-import-products -> import-products

* Clean up OnboardingTasks.php

* Add changelog

* Remove experimental-products-task feature flag
2022-12-28 16:08:54 +08:00
Miguel Pérez Pellicer b133ad98c7
Add noDataLabel into Table component allowing to customise No Data Label message. (#36124)
* Add noDataLabel property to allow No Data Message customization

* Adding changelog

* Update variable name

* Add story book use case
2022-12-28 12:31:35 +07:00
Joshua T Flowers 5137973d91
Add product variation header actions and persistence (#36155)
* Fix up updateItem query in CRUD data store

* Add product variation form header

* Fix gaps for variation and parent product actions

* Hide preview button on mobile for product variations

* Add changelog entry

* Add data package changelog entry

* Fix lint errors
2022-12-27 10:21:32 -08:00
Roy Ho d0e143a8bc
Dev/create woo extension/php cleanup (#36017)
* Clean up

* Add changelog
2022-12-26 07:07:11 -08:00
Gan Eng Chin 6382b4997c
Make `Table` component accept `className` prop (#36151) 2022-12-26 20:31:40 +08:00
Maikel David Pérez Gómez dd94bb78ee
Add product variation image (#36133)
* Convert getCheckboxTracks into generic function because of a type mismatch

* Add image to product variation and export types

* Add single image field

* Integrate SingleImageField in variation details section

* Add changelog file

* Add comment suggestions

* Fix set image onFileUploadChange
2022-12-23 10:28:44 -08:00
Maikel David Pérez Gómez bfa2d4f3a7
Product variation order should be persisted on save (#36109)
* Persist product variation order on product save

* Add batchUpdate to product variations datastore

* Add useVariationOrders hook to manage the ordering logic

* Add local ordering logic to variations field

* Persist variation orders on product save

* Add changelog file

* Add comments suggestions

* Add more comment seggestions
2022-12-22 16:01:51 -03:00
Joshua T Flowers 4b4fe7c227
Add product variation title to page header (#36085)
* Add method to get product variation title from data

* Conditionally add variation to page header

* Fix CRUD data store id query on selector

* Make getProductVariation calls and data types consistent to prevent multiple calls

* Add changelog entries

* Update product link type to avoid page refresh

* Expose function to truncate title to 32 character limit
2022-12-22 09:23:44 -08:00
Fernando Marichal a9986fe75e
Product variations - Set fixed height for card (#36053)
* Add className prop to Sortable

* Add styles

* Add `rows` class

* Add changelogs

* Remove `row-#` class

* Fix min-height

* Set task list item min height

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-12-22 09:03:07 -03:00
github-actions[bot] 4823a284dc
Prepare Packages for Release (#36084)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2022-12-20 21:33:51 +13:00
Paul Sealock 378d5f525e
Create Extension: Fix install scripts (#36067)
* Update install scripts

* changelog
2022-12-20 13:53:59 +13:00
Joshua T Flowers 1d251f217c
Extend product variations data store with generate variations actions (#36058)
* Allow extending of CRUD data stores

* Add generate action to product variations data store

* Add controls to storeConfig

* Update readme with additional store config args

* Move key to catch

* Add changelog entry
2022-12-19 12:45:43 -08:00
Paul Sealock 23299dbafd
Create Extension: Prep for initial release (#36002)
* Add initial changelog

* run changelog release prep tool

* revert package.json version bump
2022-12-19 07:31:26 +13:00
Moon 62a957c75d
Add aria-label for simple select dropdown in select-control component (#35808)
* Add aria-label for simple select dropdown

* Add changelog

* Use placeholder value

* Allow aria label prop and use label as a fallback

* Update test snapshot

* Add changelog
2022-12-16 09:55:55 -08:00
Joshua T Flowers d46a1045e8
Add product variation form and routes (#36033)
* Add route for editing product variation

* Fix up ID selector for getItem in CRUD data store

* Add product variation form

* Add changelog entries
2022-12-16 11:20:10 -03:00
Matt Sherman c94a5c6f4b
Refactor AttributeField into sub-components (#35997)
* Add className support to ListItem
* Refactor to extract AttributeListItem component
* Use AttributeListItem component in AttributeField
* Extract AttributeEmptyState from AttributeField
* Use AttributeEmptyState in AttributeField
* Add default value for label prop on AddAttributeListItem
* Add props for labels in AddAttributeModal
* Add props for labels in EditAttributeModal
2022-12-15 21:49:02 -05:00
Joel Thiessen 54f22aa437
Adding delayed spotlight to feedback button on current product page (#35865) 2022-12-15 16:09:21 -08:00
Maikel David Pérez Gómez 393cc629d9
Add pagination to variations list (#35979)
* Add changelog

* Add pagination to variations list

* Apply styles for pagination paddings and to keep it at the bottom of the section card

* Returning back per page option from 2 to 25

* Fix pagination label text from uppercase to normal and font styles

* Update variation footer gap

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-12-15 10:13:29 -03:00
Chi-Hsuan Huang 736395ba3a
Fix wcpay benefits UI padding (#35946)
* Fix wcpay benefits padding

* Add changelog
2022-12-15 19:47:36 +08:00
Paul Sealock 3d0e8d500d
Rename package from create-extension to create-woo-extension (#35947)
* Rename package from create-extension to create-woo-extension

* update lock file
2022-12-15 17:45:28 +13:00
Roy Ho d0a464520d
Add WC active validation (#35891) 2022-12-14 07:35:22 -08:00
louwie17 c7132ec8f0
Add/35126 ces exit prompt settings (#35761)
* Add exit settings page tracker

* Add exception for when user hits the save button

* Update settings and add icon support

* Add changelog

* Add dismiss track for when user dismisses CES modal

* Add changelog

* Add tests for staticFormDataToObject function

* Fix imports of test file
2022-12-14 10:55:12 -04:00
Joshua T Flowers e1aabf2d9d
Add product variations list to new product management experience (#35889)
* Add product variations section

* Add variations list

* Add util to get product stock status

* Add variation specific attribute type

* Add currency code to header column

* Fix up variations header width

* Add variations loading state

* Add changelog entries

* Convert spaces to tabs

* Fix status typo

* Fix up return type for stock status
2022-12-13 15:29:05 -08:00
Joshua T Flowers 4eacc67501
Add product tabs to product layout (#35862)
* Add product form tabs to layout

* Move product sections to respective tabs

* Add tab styling

* Add changelog entry

* Scroll to top on tab change

* Update font weight on active or inactive tabs

* Add blank EOL
2022-12-13 08:13:12 -08:00
louwie17 613e58c061
CES exit prompt for product editing screens (#35728)
* Add exit page tracker logic and implement it for product pages

* Add changelog

* Fix lint errors and add comments

* Add ces_location prop

* Add mock to fix broken test

* Add CES exit page survey tests

* Fix a bug with React pages redirects and update actions

* Fix test

* Fix lint

* Add default inside location prop

* Remove exit prefix within action

* Address PR feedback and make sure its not triggered on save

* Update copy of exit feedback notice

* Add changelog

* Update name of param

* Fix lint error

* Use hasFinishedResolution vs isResolved in customerEffortScoreTracks
2022-12-12 09:56:28 -04:00
Maikel David Pérez Gómez 788b3ef59b
Add async filtering support to the select-control component (#35839)
* Add async filtering support to the select-control component

* Apply comment suggestions

* Apply more comment suggestions
2022-12-07 14:24:32 -03:00
Joshua T Flowers c5bb9a6879
Add product variations data store (#35838)
* Add product variations data store

* Add changelog entry

* Fix up lint errors

* Export product variation type
2022-12-06 13:17:49 -08:00
Paul Sealock d45d7dd64b
Add WooCommerce Extension environment scaffold (#35755) 2022-12-07 07:16:40 +13:00
Chi-Hsuan Huang 2a56407ba1
Migrate `@woocommerce/components/search` to TS (#35724)
* Migrate search component to TS

* Add @types/prop-types to @woocommerce/components

* Update search types

* Add changelog

* Update pnpm-lock.yaml

* Update ts doc comments
2022-12-06 13:21:10 +08:00
Matt Sherman 4b58bef897
Add __experimentalSelectControl suffix prop (#35809)
* SuffixIcon component
* Tests for SelectControl suffix prop
* Stories for SelectControl suffix prop
2022-12-02 11:53:53 -05:00
louwie17 0e8fbe083d
Add/35129 product mvp ces (#35652)
* Add product mvp ces footer

* Add changelog

* Reset action option name after CES action

* Make sure we make use of cesAction

* Add close button

* Fix formatting

* Fix css styling issues

* Add icon to success notice

* Add product mvp CES hook and modify logic a little bit

* Update the CES product action name

* Address PR feedback and fix styling for smaller screens

* Add second question to CES product footer and update options

* Add changelog

* Fix lint error

* Fix tests
2022-12-02 05:35:47 -04:00
Joshua T Flowers a6970f319c
Set editor mode on initialization to prevent initial text editor focus (#35701)
* Set editor mode on initialization to prevent initial text editor focus

* Add changelog entry

* Check for editor set method to prevent breaks in tests with older versions of block store

* Update argument name for initialization
2022-11-30 12:28:37 -08:00
Maikel David Pérez Gómez 25a7c35cf4
Improve element stacking in modals on tablet and mobile (#35733)
* Add updated versions of sr-only and not-sr-only mixins

* Improve element stacking in modals on tablet and mobile

* Add comment suggestion

* Change sr-only for screen-reader-only which is more descriptive
2022-11-30 13:28:00 -03:00
Fernando Marichal 1e9fff35c0
Allow the user to select multiple images in the Media Library (#35722)
* Add multiple selection to MediaUploader

# Conflicts:
#	packages/js/components/src/media-uploader/media-uploader.tsx

* Fix README.md

* Add multiple select to image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/images-section.tsx

* Add changelogs

* Fix repeated images addition

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-11-30 10:40:41 -03:00