Commit Graph

1245 Commits

Author SHA1 Message Date
Chi-Hsuan Huang c9b8236f53
Add customize store assembler hub onboarding tour (#39981)
* Update tour-kit to have a optional skip button and custom secondary button label

* Add changelog

* Add onboarding tour

* Update layout and resiable-frame for onboarding tour

* Update onboarding tour style

* Update resizable handler

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-09-05 15:12:04 +08:00
Maikel David Pérez Gómez 4f867c6736
Components: Select Control dropdown styling issues (#39989)
* Fix select control dropdown menu width, double scroll and item aligment

* Fix attributes dropdown jumping on focus and slot position

* Add changelog files

* Fix double scroll and label margin on Category Select
2023-09-04 14:25:03 -03:00
Maikel David Pérez Gómez cdaae1caac
Add Shipping item to the global Quick Update dropdown (#39973)
* Add Shipping item to the global Quick Update dropdown

* Add changelog file

* Fix Quick update dropdown menu position to bottom left
2023-08-31 15:00:19 -04:00
Nathan Silveira 501abc47b5
Add taxonomy block using SelectTree (#39947)
* Create Hierarchical Taxonomy block

* Add changelog

* Update CSS and remove more references to 'brands'

* Improve error message UX

* Use css variables

* Name block attribute

* Add support for non-hierarchical taxonomies

* Rename attributes

* Fetch "hierarchical" from taxonomy data

* Update changelog

* Remove 'hierarchical' attribute

* Update description

* Fix issue where hierarchy was not displayed in create modal

* Refactor taxonomy details select

* Add README to taxonomy block
2023-08-31 15:19:28 -03:00
Maikel David Pérez Gómez 6673ebecd2
Add Inventory item to the global Quick Update dropdown (#39972)
* Add Inventory item to the global Quick Update dropdown

* Add changelog file
2023-08-31 13:52:06 -04:00
louwie17 785d45fbc3
Update variation pagination table (#39967)
* Add className to sortable and perPageOptions to Pagination

* Refactor pagination into seperate components

* Add PageArrowsWithPicker pagination component and usePagination hook

* Add hook to Pagination story

* Update Pagination readme

* Add changelogs

* Make sure input is updated if currentPage updates outside of PageArrowsWithPicker component

* Only show pagination if total count exceeds the minimum page size

* Add missing doc

* Fix lint errors

* Move totalCount to seperate useSelect to avoid multiple calls on page switch

* Fix merge conflict

* Fix lint error
2023-08-31 09:28:10 -03:00
Maikel David Pérez Gómez 350f758529
Add global quick actions dropdown menu to the Variations table header (#39950)
* Create variations actions menu

* Disable Quick update dropdown menu when no variations are selected

* Add onDelete all selected variations

* Add update stock menu item to the quick updates global menu

* Add changelog file

* Fix linter error

* Add Pricing item to Quick update menu

* Add Set list price to the Quick update menu

* Fix some unit tests
2023-08-30 16:16:47 -04:00
louwie17 6582445e71
Make sure we also save default attributes prior to variation generation (#39938)
* Make sure we also save default attributes prior to variation generation

* Add changelog

* Remove unused code

* Add changelog

* Fix lint errors

* Update and consolidate isDefault logic

* Remove unused function

* Fix tests and add a few more for testing default attributes

* Fix lint error
2023-08-30 17:04:54 -03:00
Maikel David Pérez Gómez a425a62fb8
Product Block Editor: add tracks to the Variations tab (#39914)
* Add product_options_add tracking event to add variation options

* Add product_options_edit tracking event to variation options

* Add product_options_update tracking event to variation options

* Fix set default attribute when editing it

* Add changelog file

* Add product_options_add_button_click tracking event

* Get attribute options from the terms prop instead of options, this ensures to get the updated values when the user edits the options

* Add Variation options section back

* Add changelog file
2023-08-30 14:36:44 -04:00
RJ 0190f4adea
fix: applied lint autofixes (#39942)
* woocommerce-admin lint fixes

* @woocommerce/* lint fixes

* Add changefile(s) from automation for the following project(s): @woocommerce/date, @woocommerce/data, @woocommerce/components, @woocommerce/admin-layout, woocommerce

* lints

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-08-30 06:40:45 +08:00
louwie17 db9cb4db4b
Add variation inventory quick actions (#39935)
* Add new inventory submenu to variations actions

* Move pricing submenu up to its own function

* Add tests

* Move inventory markup to seperate component

* Remove menu group label

* Add changelog

* Move pricing menu to own component

* Fix lint errors

* Update use of handlePrompt to make return more flexible
2023-08-29 11:46:48 -03:00
Maikel David Pérez Gómez 1356f76f7b
Add multiselection to the Variations table under Variations tab (#39937)
* Add a checkbox to each variation row to select the current variation

* Add an indeterminate checkbox to the header of the variations table

* Add Select all and Clear selection buttons to the variations table

* Disable Select all if all items are selected and disable Clear selection when there is no items selected

* Add changelog file

* Fix linter error
2023-08-29 08:52:54 -04:00
Chris Runnells 3c25538f35
Fix Core Profiler layout shifts during plugin install step (#39898) 2023-08-28 16:05:23 -10:00
Maikel David Pérez Gómez 1708b854f7
Add Shipping item to the Quick Actions menu per Variation item (#39925)
* Add Shipping submenu to the quick actions menu

* Set dimensions correctly

* Add changelog file
2023-08-28 14:49:39 -04:00
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