Commit Graph

1270 Commits

Author SHA1 Message Date
Fernando Marichal 1c497f3066
Update copy in the add variation options modal (#40280)
* Change add variation options modal copy

* Add changelog

* Clean component
2023-09-20 09:12:48 -03:00
Fernando Marichal f058e04046
Fix styling errors in variation actions in blocks product editor (#40220)
* Fix actions style

# Conflicts:
#	packages/js/product-editor/src/components/variations-table/styles.scss

* Add changelog

* Fix checkbox

* Refactor fix
2023-09-20 09:05:51 -03:00
louwie17 f9705a531b
Redirect to product editing page when product was still in auto draft (#40225)
* Redirect to product editing page when product was still in auto draft

* Make sure the prevent page does not show up when creating variations

* Add changelog and fix tests
2023-09-19 17:33:15 -03:00
louwie17 6337abc3c5
Add notice when variation prices are not set yet (#40281)
* Add notice dismissal and re-show upon validation

* Add support for notice actions

* Add changelogs

* Add set prices

* Fix build issues

* Add comment

* Replace additionalData with newData
2023-09-19 17:01:54 -03:00
Nathan Silveira 6dc109c3d8
Search for taxonomy with special characters (#40217)
* Decode html escaped characters in SelectTree

* Escape special characters when searching for taxonomies

* Add changelogs

* Remove unneeded decodeEntities

* Increment escapeHTML function to comply with what is happening in the legacy taxonomy editor

* Extract escapeHTML to @woocommerce/components
2023-09-19 14:49:19 -03:00
Fernando Marichal d72316490d
Fix error displaying block after removing variation (#40255)
* Fix error displaying block after removing variation

* Disable Add button

* Add changelog
2023-09-19 13:31:32 -03:00
Adrian Duffell 389dd1ac46
Remove link to outdated information in Components package documentation (#40015)
* Remove link to outdated information

* Add changelog
2023-09-18 16:14:08 +08:00
Fernando Marichal c661186499
Fix issue with deleting variations in new product editor (#40219)
* Fix onDelete param

* Add changelog
2023-09-15 17:20:47 -03:00
louwie17 9ea83d6382
Fix description styling and remove use of `woocommerce-page` in admin pages (#40218)
* Move the header data to the body as the header prop does not exist anymore

* Remove explicit setting of __unstableResolvedAssets given get_block_editor_settings already does this

* Remove use of woocommerce-page class in admin to avoid theme conflicts

* Add changelogs

* Revert change for quick test

* Two additional tweaks for admin related styling
2023-09-15 17:06:42 -03:00
louwie17 26f5cd5a9c
Update variation visibility icon in variations table (#40150)
* Create re-usuable hidden icon and re-use in variations table

* Add changelog
2023-09-15 15:51:28 -03:00
Nathan Silveira 95d7a6b86d
Improve Categories (Taxonomy) field UX (#40059)
* Add 'dialogNameHelpText' attribute to show on create taxonomy dialog

* Tweak CSS margins

* Add changelogs

* Rename "Save" to "Create" and set cancel button to Tertiary

* Add gray color to (optional)

* Create attribute to personalize label for parent
2023-09-14 16:02:16 -03:00
Nathan Silveira 2b5e3f2cb8
Decode HTML escaped string for tree-item and selected-items components (#40047) 2023-09-11 09:41:17 -03:00
Fernando Marichal 48016efaa6
Fix infinite category loading state (#40073)
* Fix loading state

* Add changelog

* Replace catch with finally
2023-09-08 08:58:34 -03:00
Ismael Martín Alabarce 80173a640e
Update TaskItem and WooPayments task (#40034)
* Custom WooPayments task header content

when action incentive is available.

* Add badge prop to experimental TaskItem component

, update task list components, docs, storybook, and tests

* Add badge property to OnboardingTasks/Task abstract class

* Add `woocommerce_admin_woopayments_onboarding_task_badge` filter

* Use the filter to display the badge from server

* Add changelog entries

* Update filter to use return existing badge

instead of an empty string

* Update task header to also check for the incentive in wcpaySettings
2023-09-07 15:43:18 +02:00
Fernando Marichal ad1920ca2e
Add Tags to product editor (#39966)
* Add block

* Add component tags-field

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

* Add changelog

* Clean code

* Add style

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

* Trim styles

* Delete input when creating tag

* Clean input after creating tag

* import Query type

* Add changelogs

* Add tests

* Rename newInputValue

* Remove lodash use

* Add useInstanceId instead of using a fixed id

* Remove pagination related code

* Remove isAsync const

* Fix list filtering

* Abstract useSelect

* Fix tests

* Refactor use-tag-search

* Fix lint
2023-09-06 15:51:22 -03:00
Maikel David Pérez Gómez 5e301f5a6f
Show sale price and list price in each variation row when the variation is on sale (#40048)
* Show sale price and list price in each variation row when the variation is on sale

* Add changelog file
2023-09-06 15:20:34 -03:00
Maikel David Pérez Gómez 9e812dd5da
Show in product details feature under Edit attribute modal (#40006)
* Change the Visible to customers checkbox label and tooltip

* Set default visibility to true if the atribute is non used for variations, false otherwise

* Add changelog file
2023-09-06 15:20:24 -03:00
Nathan Silveira e9aad24125
Migrate Category field to woocommerce/taxonomy-field block (#40021)
* Migrate category field to woocommerce/taxonomy-field block

* Remove details-categories-field

* Add changelogs

* Remove more references

* Rename block and add it to blockregistry

* Add missing setIsCreating calls

* Undo changelog change

* Add changelog
2023-09-06 10:21:37 -03:00
Matt Sherman a66a48108f
Update woocommerce/create-product-editor-block to use template API (#39993) 2023-09-06 06:30:59 -04:00
Moon c45335b936
CYS - Add LookAndFeel and ToneOfVoice pages (#39979)
* Add ProgressBar component to @woocommerce/components

* Add changelog

* Remove html.wp-toolbar in fullscreen mode

* Add base style

* Add Tell us a bit more about your business page

* Fix merge conflict issues

* Send BUSINESS_INFO_DESCRIPTION_COMPLETE event when continue button is clicked

* Remove duplicated style import

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

* Lint fix

* Add 'Look and Feel' and 'Tone of voice' pages';

* Use correct classname

* Minor changes

* Textearea color should be gray-900 after the user enter text
* guide font weight should be 500

* Fix layout shift when a choice is selected

* Fix choices width for tone of voice page

* Use context value for the default

* Revert button margin top

* Fix default selection

* Add X button

* Decrease the margin by 20px to accommodate the height of the close button

* Add close action

* Include @woocommerce/ai package

* Add AI service

* Use AI service

* Parse JSON from in function

* Fix assignLookAndTone event type

* Update plugins/woocommerce-admin/client/customize-store/design-with-ai/components/choice/choice.scss

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

* Update plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts

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

* Log when AI API endpoint request fails

* Add spinner when user clicks the continue button

* streamlined unnecessary isRequesting context and forwarded close event

* pnpm-lock changes from trunk

* lint fixes

* ai package test passWithNoTests

* changelog

* reset pnpm-lock to trunk

* Dev: update pnpm-lock.yaml and jest preset config (#40045)

* Update pnpm-lock.yaml

* Update jest-preset config to fix unexpected token error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2023-09-06 14:21:09 +08:00
Maikel David Pérez Gómez f3d1526f71
Auto select one or more attribute terms when selecting an attribute (#40004)
* Add auto select first or all terms when an attribute is selected

* Set auto select all terms in variations tab

* Set auto select the first term in Organization tab

* Add changelog file

* Change termsAutoselection to be camel case

* Remove error suppersion when retreiving attribute terms
2023-09-05 16:29:57 -03:00
Fernando Marichal ccb72125e0
Add a notice to "track inventory" toggle (#40011)
* Add notice to "track inventory" toggle

* Add changelogs

* Remove console.logs

* Fix link URL
2023-09-05 08:35:38 -03:00
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
Matt Sherman fb9857f22f Changelog 2023-08-31 17:08:39 -04:00
Matt Sherman ea4e257d65 Fix id and blockName in the add_block call 2023-08-31 17:07:14 -04:00
Matt Sherman 76c66aaee9 Update to use template API to add block 2023-08-31 16:05:43 -04: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