Commit Graph

1564 Commits

Author SHA1 Message Date
Matt Sherman 94c7112c00 Only select on focus in currency and number fields if still has focus 2023-11-01 15:54:03 -04:00
Maikel David Pérez Gómez 6b44a969d0
Add filters to Variation table (#40978)
* Create product variations filter component

* Add slug to the product and variation attributes
This is needed to be able to filter variations by specific attribute slugs

* Add support to filter variations by many attribute options

* Integrate attribute options filter in variations table

* Fix rebase conflicts

* Set initial filter values

* Improve intial filter values and cache invalidation

* Add changelog files

* Fix linter errors

* Fix unit tests

* Change the min amount of options to show the search input

* Fix invalid cache key generation for the datastore

* Fix unit tests

* Fix linter errors

* Fix js tests

* Add terms pagination for varition filters

* Load terms on demand plus pagination

* Show selected option names as the dropdown button toggle text

* Fix invalida state when reset and on close the popover

* Revert adding selected options as part of the dropdown toggle text

---------

Co-authored-by: Fernando Marichal <ultimoround@gmail.com>
2023-10-31 13:29:48 -04:00
Fernando Marichal bae33f34de
Fix attributes modal incorrect notice (#40976)
* Remove modal copy

* Fix styles

* Add changelog

* Fix build error
2023-10-31 13:18:32 -03:00
Matt Sherman 17ed81c24f
Order menu items in product editor's more menu (kebab menu) (#41104) 2023-10-31 10:45:20 -04:00
Nathan Silveira 1037d9a8b0
Add __experimentalRole: 'content' to block properties (#41045)
* Add __experimentalRole: 'content' to block properties

* Revert change in versions
2023-10-31 11:29:10 -03:00
Nathan Silveira 164ae0984c
Fix double scroll in General tab and image upload overlapping (#40977)
Fix double scroll in General tab and image upload overlapping with other blocks
2023-10-31 11:10:40 -03:00
github-actions[bot] 3a265c3afd
Prepare Packages for Release (#41065)
Co-authored-by: opr <opr@users.noreply.github.com>
2023-10-31 02:02:59 -07:00
Matt Sherman 16d8215119 Changelog 2023-10-30 15:00:18 -04:00
Matt Sherman c83f581932 Add support for ordering product more menu items 2023-10-30 14:59:37 -04:00
Matt Sherman affbb01136 Changelog 2023-10-30 14:44:08 -04:00
Matt Sherman a921863e40 Remove SlotFillProvider from editor 2023-10-30 14:39:01 -04:00
Maikel David Pérez Gómez 65408410fb
Unable to select the values from the dropdown menu on the "Products > Add New > Product Catalog" page (#41093)
* Fix unable to select the values from the select tree control

* Add changelog file
2023-10-30 12:06:59 -04:00
Thomas Roberts 0baec4e003
Add `@woocommerce/blocks-components` to `dependency-extraction-webpack-plugin` packages list (#41042)
Co-authored-by: github-actions <github-actions@github.com>
2023-10-27 02:21:46 -07:00
Leif Singer 1ed69451a5
integrate-plugin: remove superfluous test scripts (#41053)
* remove superfluous test scripts

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

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-10-27 00:16:31 +02:00
Nathan Silveira 81cb9e9458
Add tooltip next to label for text and number blocks (#40908)
* Create initial version of TextControl

* Extract 'label' component for reusability

* Reduce gap

* Add label component to number control and add tooltip and required attributes

* Add changelog

* Remove unused CSS

* Add tooltip to type definitions

* Update doc for number block

* Add text block documentation

* Update parameters definition

* Set label to 'mandatory' in TypeScript

* Set label to mandatory

* Organize to alphabetical order

* Refactor required validation to be more consistent with name field

* Generify documentation

* Use createInterpolateElement for label with required indicator
2023-10-26 15:35:39 -03:00
Fernando Marichal 898eb30f7e
[Single Variation] Add missing tracks events (#40996)
* Add note prop

* Add note for single variation

* Add event recording for generic toggle

* Add changelog

* Add parent_id to toggle event

* move logic inside recordProductEvent

* Modify postType
2023-10-26 00:45:53 -03:00
Nathan Silveira a8e4b27df2
Fix 'Hide in product catalog' being unchecked for variations (#41007)
* Don't touch status attribute in variations

* Add missing validate for variations
2023-10-25 16:52:23 -03:00
Wacław Jacek 3d5b58b7d6
Remove dependency on Jetpack from Shipping and Tax task list items (#39992)
* Remove dependency on Jetpack from WCS&T's task list item

- Remove installing Jetpack-the-plugin from WooCommerce Shipping &
Tax WC Home task list and recommended extensions area.

- Update Jetpack auth link generation to use getJetpackAuthUrl().

- Remove references of Jetpack-the-plugin from WCS&T onboarding
as the extension will now use the Jetpack Connection package
for establishing a connection between WPCOM infrastructure
and a Woo site.

* Update WooCommerce Tax flow in WC Home task list

* Inline the agreementText variable

* Add missing pluginSlugs prop to <Plugins> instance for WC Tax

* Fix WC Tax extension name in API response

* Remove Jetpack from copy in Tax task header

* Fix MD034/no-bare-urls MD linting violation

* Fix experimental shipping recommendation tests

* Add changelogs requested by linter

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

* Remove mention of Jetpack from ExperimentalShippingRecommendation

* Fix text wrapping bug in WC Tax onboarding task

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

* Use isResolving() to detect pending auth URL fetch

* Replace unused hasErrors with ref to error

* Fix lint

* Jetpack auth URL prefetching

* Revert "Jetpack auth URL prefetching"

This reverts commit 2b79000e20.

* Add PrefetchJetpackAuthUrl component to remove Connect button load time

* Replace URL prefetching in component with useEffect

* Fix: Accept redirect URL as param instead of prop

* Fix lint

* Remove prefetching. Make Connect button always available

* Fix ExperimentalShippingRecommendation incompatibility with new Connect behavior

* Handle empty object errors in Connect

* Display TOS above WooCommerce Shipping & Tax installation buttons (#40863)

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-10-25 22:39:43 +08:00
louwie17 3f7eb0ce31
Invalidate variations upon generation and fix formatted name (#40905)
* Invalidate variations upon generation and fix formatted name

* Add aditional invalidates to keep cache up to date

* Update formatted name to always return attribute term name list
2023-10-25 08:45:58 -04:00
Nathan Silveira bc04234732
Fix checkbox not working when checkedValue is provided (#40979) 2023-10-25 00:29:53 -03:00
RJ e01e6f8b2a
add: core profiler email marketing opt in (#40869)
* add: core profiler email marketing opt in

* tests

* changed mailchimp feature flag

* fix: made experiment name static

* lint
2023-10-24 17:07:26 +02:00
Maikel David Pérez Gómez 791af33e95
Empty state for uncreated/empty variations (#40940)
* Move empty-variations-image to the images folder so it can be used in other components

* Create TableEmptyState component

* Add TableEmptyState to the Variations table component

* Add changelog file

* Fix linter error
2023-10-23 15:21:42 -04:00
Fernando Marichal 469a76a82f
Show error message when single variation price is empty (#40885)
* Show notice when price is empty

* Add changelog

* Add variation check

* Allow multiple errors

* Show unique errors

* Change error text

* Rename wpError to wpErrors

* Show single error

* Add error type

* Refactor catch
2023-10-23 16:19:00 -03:00
Maikel David Pérez Gómez eff2b8cca3
Update default visibility settings for variation options (#40949)
* Replace hidden icon by seen icon

* The 'visible' icon is only shown when the Show in product details box in the variation option is checked

* The tooltip displayed when the user hovers over the 'hidden' icon is updated to: Visible in product details

* On hover, the cursor changes to help

* Add changelog file
2023-10-23 14:19:33 -03:00
Maikel David Pérez Gómez 16ce05109f
Add a loading state for the new product form (#40939)
* Create product page skeleton

* Load skeleton in product and variation pages

* Let each page to define own loading/skeleton when the router is resolving the page.

* Add changelog files

* Fix linter error

* Fix unit test
2023-10-23 12:47:26 -04:00
Maikel David Pérez Gómez 50ff379f25
Delete variations from the single page does not reflect correctly in the parent product (#40900)
* Invalidate resolution for paginated variations after removing any from the single variation page

* Add changelog file

* Invalidate resolution also for getProductVariationsTotalCount
2023-10-20 13:06:02 -03:00
louwie17 fbac42aafc
Update variation switcher logic to not loop (#40901) 2023-10-20 11:17:30 -04:00
Matt Sherman 3fa5573706
Template API: Deprecate woocommerce/conditional block (#40883) 2023-10-20 09:53:06 -04:00
Nathan Silveira 3d182f342f
Create React component wrappers for the checkbox and number blocks (#40828)
* Add @woocommerce/number to @woocommerce/components

* Create a component for checkbox and use it on the block

* Create a component for number and use it on the block

* Add changelogs

* Remove scss import

* Rename Numbercontrol prop

* Expose useProductEntityProp

* Move components to product-editor package and fix UI bug created in checkbox component

* Revert unnecessary changes in components and update changelogs

* Revert changes in use-number-input-props

* Fix issue in checkbox

* Revert css change
2023-10-20 10:52:56 -03:00
Fernando Marichal 3426692606
Hide `Switch to draft` button on single variation page (#40856)
* Hide Switch to draft when variable product

* Add changelog

* Change changelog
2023-10-20 09:32:06 -04:00
Matt Sherman 61ef8a9fa2 Changelog 2023-10-19 15:34:32 -04:00
Matt Sherman 60fde2be96 Deprecate woocommerce/conditional block 2023-10-19 15:32:40 -04:00
Maikel David Pérez Gómez 8827e42bd7
Set prices button from the variations notice is not updating the right amount of variations (#40876)
* Improve has_price filter so it can matches when the price record does not exist or it's empty/null

* Get the exact variation ids of those ones that do not have price

* Add changelog files

* Fix linter errors
2023-10-19 13:14:08 -04:00
Matt Sherman 613a63b0ef
Template API: Conditional visibility support (#40722) 2023-10-19 12:02:05 -04:00
Matt Sherman df2a0eb337 Remove productType from ProductEditorContext interface 2023-10-19 11:20:20 -04:00
Fernando Marichal b0113ee555
Add edit downloads modal (#40599)
* Create edit downloads modal

* Add modal to downloads

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

* Refactor removeHandler

* Fix EditDownloadsModal

* Refactor onSave

* Add changelog

* Fix onRemove

* Fix styles

* Fix lint

* Fix lint

* Fix modal closing when copyToClipboard
2023-10-19 11:09:04 -04:00
Daniel Mallory e4b1657f98
Remove references to Sofort (#40745)
* Removing all references to Sofort in the various locations we show payment method information.

* Adding changelogs.
2023-10-19 13:45:48 +01:00
Matt Sherman 7fd28367d8 Remove order attribute from tab block 2023-10-19 08:28:14 -04:00
Matt Sherman 4605f7ee57 Set tab order based on block's order 2023-10-19 08:23:44 -04:00
Matt Sherman 97dc41e2aa Remove productType from context (it was really just postType, which is already in context) 2023-10-19 07:43:09 -04:00
Matt Sherman abd71af40a Switch conditional block to use postType from context instead of productType 2023-10-19 07:33:29 -04:00
Matt Sherman b40f9d2035 Switch productType to postType in context augmentation 2023-10-19 07:30:53 -04:00
Matt Sherman f399196b39 Changelog 2023-10-18 18:57:27 -04:00
Matt Sherman 4a49683a69 Changelog 2023-10-18 18:57:22 -04:00
Matt Sherman 6b6ffd184e Remove unused imports 2023-10-18 18:44:32 -04:00
Matt Sherman 8a1709a275 Make useEvaluationContext param optional 2023-10-18 18:41:40 -04:00
Matt Sherman d14124c513 Fix up registerWooBlockType unit test 2023-10-18 18:41:22 -04:00
Matt Sherman 076939f2e4 Ignore ts error about lack of types for @wordpress/data 2023-10-18 15:43:26 -04:00
Matt Sherman 48d5cca0b8 Fix block registration for downloads 2023-10-18 15:16:17 -04:00
Matt Sherman 6b55e7c096 Refactor client-side usesContext augmentation 2023-10-18 15:16:17 -04:00
Matt Sherman a4002105a4 Refactor client-side attribute augmentation 2023-10-18 15:16:17 -04:00
Matt Sherman 23b2953934 Fix block registration on notice-edit-single-variation 2023-10-18 15:16:17 -04:00
Matt Sherman 2981f14a5b Fix block registration for downloads 2023-10-18 15:16:17 -04:00
Matt Sherman b256841135 Use getEditedEntityRecord to get product 2023-10-18 15:16:17 -04:00
Matt Sherman f466d84bf5 Remove editedProduct from usesContext 2023-10-18 15:16:17 -04:00
Matt Sherman 67e3d72095 Add productType to ProductEditorContext interface 2023-10-18 15:16:17 -04:00
Matt Sherman 6f53697df2 Remove console.log 2023-10-18 15:16:17 -04:00
Matt Sherman aa942771e5 Fix up TS errors 2023-10-18 15:16:17 -04:00
Matt Sherman ea6dc94897 Move useEvaluationContext implementation to product-editor 2023-10-18 15:16:17 -04:00
Matt Sherman 334a10a9a4 useEvaluationContext hook 2023-10-18 15:16:17 -04:00
Matt Sherman e244c8e025 Improve useSelect implementation 2023-10-18 15:16:17 -04:00
Matt Sherman 09b0cdcef7 Memoize block context 2023-10-18 15:16:17 -04:00
Matt Sherman 86a0a15588 Include productType in context; don't include editedProduct 2023-10-18 15:16:17 -04:00
Matt Sherman 7161534f96 Conditional visibility implementation with useSelect 2023-10-18 15:16:17 -04:00
Matt Sherman 5845bcb768 Conditional visibility implementation with context 2023-10-18 15:16:17 -04:00
Matt Sherman 6f2e89adcb Use registerProductEditorBlockType for variations 2023-10-18 15:16:17 -04:00
Matt Sherman cb15fbcd34 Use registerProductEditorBlockType for variation-options 2023-10-18 15:16:17 -04:00
Matt Sherman dbc3c7a77b Use registerProductEditorBlockType for variation-items 2023-10-18 15:16:17 -04:00
Matt Sherman 9d492800f3 Use registerProductEditorBlockType for tag 2023-10-18 15:16:17 -04:00
Matt Sherman 271258a0c4 Use registerProductEditorBlockType for summary 2023-10-18 15:16:16 -04:00
Matt Sherman ca9b5c3dd9 Use registerProductEditorBlockType for shipping-dimensions 2023-10-18 15:16:16 -04:00
Matt Sherman 686ad5c026 Use registerProductEditorBlockType for shipping-class 2023-10-18 15:16:16 -04:00
Matt Sherman e366809711 Use registerProductEditorBlockType for schedule-sale 2023-10-18 15:16:16 -04:00
Matt Sherman d92d34f9fe Use registerProductEditorBlockType for sale-price 2023-10-18 15:16:16 -04:00
Matt Sherman c937b3eea9 Use registerProductEditorBlockType for regular-price 2023-10-18 15:16:16 -04:00
Matt Sherman c4bd765eb6 Use registerProductEditorBlockType for password 2023-10-18 15:16:16 -04:00
Matt Sherman 6596e9c05c Use registerProductEditorBlockType for notice 2023-10-18 15:16:16 -04:00
Matt Sherman b3e0b2af93 Use registerProductEditorBlockType for name 2023-10-18 15:16:16 -04:00
Matt Sherman 8574fdec36 Use registerProductEditorBlockType for inventory-sku 2023-10-18 15:16:16 -04:00
Matt Sherman 9b161c6667 Use registerProductEditorBlockType for inventory-quantity 2023-10-18 15:16:16 -04:00
Matt Sherman 0d03ad93b3 Use registerProductEditorBlockType for inventory-email 2023-10-18 15:16:16 -04:00
Matt Sherman ccdccc2de3 Use registerProductEditorBlockType for images 2023-10-18 15:16:16 -04:00
Matt Sherman 3324fe2787 Use registerProductEditorBlockType for description 2023-10-18 15:16:16 -04:00
Matt Sherman f9aa73c7d3 Use registerProductEditorBlockType for catalog-visibility 2023-10-18 15:16:16 -04:00
Matt Sherman 8fee2c1669 Use registerProductEditorBlockType for attributes 2023-10-18 15:16:16 -04:00
Matt Sherman 2296f910c9 Use registerProductEditorBlockType for toggle 2023-10-18 15:16:16 -04:00
Matt Sherman f2feaa7d55 Use registerProductEditorBlockType for text 2023-10-18 15:16:16 -04:00
Matt Sherman d082491e1d Use registerProductEditorBlockType for taxonomy 2023-10-18 15:16:16 -04:00
Matt Sherman 7a04b3909e Use registerProductEditorBlockType for tab 2023-10-18 15:16:16 -04:00
Matt Sherman 3afe5d8233 Use registerProductEditorBlockType for section 2023-10-18 15:16:16 -04:00
Matt Sherman aa9ed2d88a Use registerProductEditorBlockType for radio 2023-10-18 15:16:16 -04:00
Matt Sherman 9bb83c1745 Use registerProductEditorBlockType for pricing 2023-10-18 15:16:16 -04:00
Matt Sherman 63d18234f8 Use registerProductEditorBlockType for number 2023-10-18 15:16:16 -04:00
Matt Sherman 57d1c4a0a7 Use registerProductEditorBlockType for conditional 2023-10-18 15:16:16 -04:00
Matt Sherman f3eea29421 Use registerProductEditorBlockType for collapsible 2023-10-18 15:16:16 -04:00
Matt Sherman bf8ea9a016 Use registerProductEditorBlockType for checkbox 2023-10-18 15:16:16 -04:00
Matt Sherman 7448e78aa7 Implement registerProductEditorBlockType 2023-10-18 15:16:16 -04:00
Matt Sherman c616e0c7c9
Add @woocommerce/block-templates dependencies (#40849) 2023-10-18 14:41:23 -04:00
Matt Sherman 51dec2db53 Add @wordpress/data to dependencies 2023-10-18 13:31:46 -04:00
Maikel David Pérez Gómez 40a410ae1f
Product Shipping: New class should automatically create a slug (#40847)
* Remove empty values from the shipping class request so slug can be generated server side

* Add changelog file
2023-10-18 13:04:14 -04:00