Commit Graph

2007 Commits

Author SHA1 Message Date
Damián Suárez 1f20bc5af1
Data: update getKey helper function (#47548)
* build key conidering all url params

* add getKet test with multiple parents

* changelog
2024-05-16 07:06:41 -07:00
Damián Suárez ff4422aff9
Product Block Editor: improve the process when creating a new attribute (#47518)
* introduce onAddNew() combobox property

* use onAddNew prop to handle adding new attributes

* changelog

* update packs after mergining with trunk

* move changelog file location

* remove unneeded change
2024-05-16 10:54:21 +01:00
Fernando Marichal 8dd87820cf
Disable pre-publish panel (#47430)
* Disable pre-publish panel

* Add changelogs

* Fix e2e tests
2024-05-15 15:52:42 -03:00
Fernando Marichal f94d08a0db
Add Tracks events to Publish dropdown and Save draft button (#47320)
* Add product_switch_draft event

* Add "product_save_draft" tracks event

* Add schedule_publish and dropdown_open events

* Refactor saveDraft method

* Add changelog

* Rename const

* Add onToggle callback

* Refactor saveDraft method
2024-05-15 15:16:32 -03:00
Fernando Marichal aa6137128d
Move pricing features to General tab (#47435)
* Move pricing section

* Fix e2e tests

* Fix create-variable-product tests

* Add changelog

* Add changelog in WC
2024-05-15 14:53:27 -03:00
Sam Seay 3ef7a01840
Update blocks JS tests to React 18 (#47383) 2024-05-15 21:33:36 +12:00
Chi-Hsuan Huang 14a5628e78
Fix remote inbox layout overflows the page width (#47451)
* Fix remote inbox layout overflows the page width

* Add changelog

* Update changelog
2024-05-15 01:55:27 +00:00
Matt Sherman a6e1f67a47
Produc Editor API: Modal block editor more menu extensibility (description field) (#47436)
* Const for more menu action item slot name

* PluginMoreMenuItem implementation

* Changelog

* Use WP core MenuItem instead of WooCommerce MenuItem
2024-05-14 14:25:22 -04:00
Damián Suárez 6ce65cadf7
Data: improve reducer with optimisticQueryUpdate test (#47428)
* update when creating new Item

* improve optimisticQueryUpdate reducer test

* changelog

* minor
2024-05-14 15:03:10 +01:00
Fernando Marichal fdb4069566
Remove not used feature flags (#47150)
* Remove product-virtual-downloadable

* Remove product-variation-management

* Remove product-external-affiliate

* Remove product-grouped

* Remove product-linked

* Remove customer-effort-score-tracks

* Add beta tester changelog

* Add changelogs
2024-05-13 15:05:47 -03:00
Damián Suárez 7c1da8129d
Product Block Editor: tweak styles/layout of attribute modal implementation (#47374)
* align terms dropdown help box

* reduce spinner size

* set a min height for each table row

* tweak terms style component when disabled

* changelog
2024-05-13 19:02:26 +01:00
Fernando Marichal b3e76c41b4
Request attributes conditionally (#47361)
* Request terms conditionally

* Add changelog

* Add used context

* Transform fetchAttributes into a hook

* Call fetchAttributes inside Attributes component

* Fix tests

* Remove useless useEntityId and fix dependency

* Refactor attriburtes component

* Add AttributeControl to Attributes component

* Add warning comment to Attributes component
2024-05-13 14:00:31 -03:00
Sam Seay 2db29164f9
Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai

* temporarily disable swallowing build output to diagnose issue with perf workflow

* Ignore some type issues that commonly resurface when deps slightly change

* Fix persistent type issues that have recurred many times

* Add more ignores

* Fix lint issue

* Revert change to swallow build error

* Improve access of the config that needs updated build dir.

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-13 10:57:39 -03:00
Fernando Marichal 69fa74ef8d
Request variations conditionally (#47360)
* Get variations conditionally

* Make second call conditionally

* Add changelog

* Remove usesContext from JSON
2024-05-13 10:57:03 -03:00
Damián Suárez c31051385d
Product Block Editor: use FormTokenField component for the attribute terms (#47288)
* fisrt approach

* do not clear same selected term

* tweak token field component

* chage the attributes type

* filter attributes already taken

* set instanceNumber for each combobox instance

* implement remove attribute

* final first approach

* update onRemove type

* rename edit VariationItemsBlockEdit

* handle local attributes

* rollback unrelated issue

* changelog

* remove unused component

* remove test

* add border color when disabled
2024-05-10 15:45:58 +01:00
Nathan Silveira 7c7d9837a4
Add improvements to NumberControl (#47121)
* Use min and max values if provided when sanitizing values

* Pass min and max attributes to NumberControl

* Use 'min' and 'max' values when incrementing through + and - buttons

* Add changelog

* Handle increment when pressing buttons

* Show + and - buttons disabled when max/min has been reached

* Prevent suffix from being selected
2024-05-10 10:02:00 -03:00
Fernando Marichal d81ab3c9d3
Request categories conditionally (#47216)
* Request categories conditionally

* Add changelog
2024-05-09 08:29:55 -03:00
Chi-Hsuan Huang f2cf6b56aa
Update @automattic/tour-kit to 1.1.3 and @automattic/components to 2.1.1 (#47129)
* Use @automattic/tour-kit@1.1.3

* Update onPreviousStep and onNextStep callback

* Add changelog

* Add changelog

* Update @automattic/components

* Update package.json

* Fix pnpm-lock.yaml

* Update changelog

* Add changelog

* Enable autoScroll for shipping tour
2024-05-09 08:56:08 +08:00
Fernando Marichal 9ad1321c66
Request shipping classes conditionally (#47196)
* Request shipping classes conditionally

* Add changelog

* Fix getProdcutShippingClasses return

* Refactor useSelect
2024-05-08 08:19:32 -03:00
Sam Seay fbcdb78d18
Fix one more instance of unspecified include in tsconfig. (#47207) 2024-05-08 13:53:56 +12:00
Damián Suárez 5ab1241ac2
Product Block Editor: use `<AttributesComboboxControl />` in the Attributes modal (#47093)
* update combobox story

* first step replacing with attribute combobox

* introduce takenBy prop

* filter attributes when taken

* add and tweak combobox styles

* changelog

* tweak wrapped item

* update tests

* pass instanceNumber

* remove commented line
2024-05-07 16:56:14 +01:00
Matt Sherman b107cff519
Product Editor API: Modal block editor sidebar extensibility (description field) (#46597)
* iframe editor PluginSidebar

* iframe editor PluginArea and ComplementaryArea

* iframe editor PinnedItems

* Try ComplementaryArea slot

* Update scope name

* Only render ComplementaryArea.Slot when right sidebar is open

* Register interface store in sub registry

* Move block inspector to complementary area

* Remove hardcoded inspector toggle button from header

* Remove debug statement

* Remove unused isSidebarOpened context

* Set settings sidebar to be active by default

* Don't allow unpinning of settings sidebar

* Organize sidebar components under folder

* Add plugin more menu item

* Remove width for sidebar

* Update PluginArea scope name

* Pull out small viewport support for pinned items (incomplete)

* Move sidebar complementary area scope to a const

* Update sidebar complementary area scope name

* Update PluginSidebar export name

* Provide comments to clarify sidebar props settings

* Add comment about why this icon was copied

* Remove unnecessary wrapper div around complementary area

* Changelog
2024-05-07 11:43:34 -04:00
Maikel Perez 40486a0151
Remove duplicate code lines in css (#47122)
* Remove duplicate css code from any woo scss file

* Add changelog files
2024-05-07 08:35:25 -04:00
github-actions[bot] 9b042534d0
Prepare Packages for Release (#47208)
Automated change: Prep @woocommerce/dependency-extraction-webpack-plugin for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-05-07 20:33:45 +12:00
Paul Sealock 3cab2e6909
Dependency Extraction Webpack - add @woocommerce/price-format (#47099)
* add package

* remove log

* Add changefile(s) from automation for the following project(s): @woocommerce/dependency-extraction-webpack-plugin, woocommerce

* Add changefile(s) from automation for the following project(s): @woocommerce/dependency-extraction-webpack-plugin

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-05-07 08:20:54 +03:00
Sam Seay fbb553be0f
Update tsconfigs to explicitly include files to avoid TS build errors (#47156) 2024-05-07 13:18:56 +12:00
Fernando Marichal e5e78a33bf
Request tags only when we need them (#47068)
* Get Tags conditionally

* Create file types.ts

* Add changelog

* Fix tests
2024-05-06 15:54:18 -03:00
Matt Sherman 10a14bd179
Product Editor: Fix undo/redo in modal block editor (description field) (#47151)
* Set BlockEditorProvider's value to temporalBlocks

* Remove unnecessary code

* Set initial blocks in editor history, so that the first edit on an existing description can be undone

* Changelog
2024-05-06 12:53:44 -04:00
Damián Suárez 6a77c3458d
Product Block Editor: request initial linked-products request only when tab is selected (#47130)
* add optional isInSelectedTab context type

* clean type def

* only filter linked products when tab selected

* changelog
2024-05-06 14:07:30 +01:00
Nathan Silveira 5fbd502a17
Enable inline actions in the variations table for images (#47065)
* Increment ProductVariationImage type

* Allow adding images to variations from the main product screen through a button

* Add changelog

* Add changelog

* Change showSuccess parameter to optional
2024-05-03 15:26:22 -03:00
Nathan Silveira 08508dfecc
Add 'placeholder' attribute to taxonomy block and add 'placeholder' a… (#46938)
* Add 'placeholder' attribute to taxonomy block and add 'placeholder' attribute to category field in Simple Product Template

* Only show placeholder when nothing is selected

* Remove suffix from function parameters

* Add changelog for component

* fix unit tests
2024-05-03 15:26:08 -03:00
Fernando Marichal 163e579ac6
Avoid requesting product with id -1 while loading (#46769)
* Avoid requesting product with id -1

* Add changelog

* Move changelog

* Add options to useEntityRecord type

* Fix editedRecord

* Add comment

* Undo early return

* Avoid making a request for product if it isn't already loaded

* Avoid making a request for product if it isn't already loaded

* Add typing for useEntityId

* Rework header to avoid requesting product unless we have a product ID

* Avoid requesting product when getting productTemplateId and blocks

* Remove unused import (fix lint error)

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2024-05-03 11:52:57 -04:00
Fernando Marichal e21a78f8f0
Request variations only when the product has variations (#46963)
* Make variations api request conditional

* Add changelog
2024-05-03 11:37:22 -04:00
Damián Suárez f0765081fe
Product Block Editor: move logic to add new attributes to modal component (#47058)
* rename TS prop name

* save unsaved change

* onChange() value is required

* continue `value` is required

* move logic to add new attribute to modal component

* polish process to add attribute

* rename function argument

* improve jsdoc

* remove unused getProductAttributeObject helper

* jsdoc

* changelog

* remove unused import

* remove obsolete tests

* fix eslint issues
2024-05-03 12:25:35 +01:00
Gan Eng Chin 48f479fd67
Rename and sort filter options in "Add a filter" in Analytics (#46955)
* Rename filter options in Orders Analytics.

* Sort filter options in labels in Orders Analytics.

* Change filter labels to singular.

* Wider label column to accommodate label change.

* Rename filter options in Variations Analytics.

* Change filter options to Attribute, Category and Product in Variations Analytics.

* Revert "Change filter options to Attribute, Category and Product in Variations Analytics."

This reverts commit b3ca5d5807.

* Change "Add a Filter" to "Add a filter".

* Add changelog.

* Add changelog.

* Refactor getAvailableFilterKeys and getAvailableFilters into one function.

* Add code comment and remove unneeded code.

* Code refactor getAvailableFilters.

This is done by starting from allFilterKeys, and filtering with allowMultiple or not yet active.

With this, we don't need to have `inactiveFilterKeys` and "Ensure filters that allow multiples are always present."

* Fix tests and lint issues.

* Simplify code with Object.entries.
2024-05-02 18:34:17 +08:00
github-actions[bot] 05e166e0f1
Prepare Packages for Release (#46977)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: rrennick <rrennick@users.noreply.github.com>
2024-05-01 11:22:50 -05:00
github-actions[bot] ad2b170f1d
Prepare Packages for Release (#46976)
* Automated change: Prep @woocommerce/components for release.

* fix changelog linting

---------

Co-authored-by: rrennick <rrennick@users.noreply.github.com>
Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-05-01 11:21:29 -05:00
Damián Suárez 987d702335
Product Block Editor: move logic to pull product attributes from Selector to Modal component (#46655)
* rename type for item of attribuite input field

* options is not part of the input item

* update type of getProductAttributeObject

* update types

* changelog

* fix eslint issue

* fix test

* move the logic to pull attribute to modal cmp

* changelog

* remove options from item props

* rename TS prop name

* save unsaved change
2024-04-30 08:21:45 -04:00
Damián Suárez ee5f12f806
Product Block Editor: tidy product attribute TS types (#46998)
* rename type for item of attribuite input field

* options is not part of the input item

* update type of getProductAttributeObject

* update types

* changelog

* fix eslint issue

* fix test
2024-04-30 07:18:03 -04:00
Nathan Silveira 567a6b5c77
Show 'up' and 'down' chevron in SelectTree and remove suffix prop (#46939) 2024-04-29 10:23:48 -03:00
Fernando Marichal f437c538e7
Avoid duplicated product request (#46934)
* Add getPermalinkParts utility

* Use getPermalinkParts utility

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

* sort items optimistically

* update attributes list optimistically

* do not invalidate when creating a new attribute

* changelog

* changelog

* update tests

* update options param in test

* wait for the promise when creating new attribute

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

* update TS types

* rename

* add storybook story

* changelog

* update types

* onChange should return item

* rename css classes

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

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

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

* introduce ProductAttribute to define actions

* update importing attribute types

* fix select item type

* export ProductAttribute TS type

* update attribute-input-field component

* changelog

* update jsdoc block

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

* Add changelog

* Refactor WCPay banner and cleanup

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

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

* Add changelog

* Upgrade the WCPay payments settings banner

* test: Fix WCPay payments settings banner tests

* Update the WCPay welcome page to use the WCPayConnectCard component

* Update the Payments task page to use the WCPayConnectCard component

* Fix copy for payments settings methods CTA buttons label

* Add changelog

* Further cleanup of no-longer-used WCPay surfaces

* Consolidate onboarding component icons for single sources

* Minor cleanup

* test: Fix WCPay payments settings banner test

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

* Use productEditorHeaderApiFetchMiddleware

* Update name of header

* Utility function to check header

* Changelog

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

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-04-24 08:39:24 +12:00