Commit Graph

3006 Commits

Author SHA1 Message Date
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
Gan Eng Chin 449da4e91c
Merge branch 'trunk' into feature/34906-marketing-channels-card 2023-01-29 01:29:31 +08:00
Gan Eng Chin e700232415
Simplify Channels component. 2023-01-29 01:28:14 +08:00
Joel Thiessen 9be843422d
Fixing issue preventing import productes CES exit page from firing (#36656) 2023-01-27 12:14:59 -08:00
Joshua T Flowers c12ae8033d
Tweak product link description and display (#36591)
* Tweak product link description and display

* Add changelog entry

* Fix up edit product link modal tests

* Update changelog entry
2023-01-27 10:59:39 -08:00
Gan Eng Chin 15200103cc
Simplify Channels CSS. 2023-01-28 01:16:31 +08:00
Gan Eng Chin 0eb318c1f5
Simplify and remove RecommendedChannels and RecommendedChannelsList components. 2023-01-28 01:12:36 +08:00
Joel Thiessen 79c596cbd0
Updating section and field product fills to support multiple slots (#36592) 2023-01-27 08:42:51 -08:00
Gan Eng Chin 14511ae4d6
Code refactor with SyncStatus and IssueStatus components. 2023-01-28 00:14:50 +08:00
Nathan Silveira d5e2ae0474
Move clearQueue call to inside an useEffect (#36626)
* Move clearQueue call to inside an useEffect

That call was causing a React error (Cannot update a component while rendering a different component)

* Move queueForPage declaration to before it's use
2023-01-27 12:33:48 -03:00
Gan Eng Chin 49032b98db
Make data undefined on first load in useRecommendedChannels. 2023-01-27 21:38:38 +08:00
Gan Eng Chin 316aad8b2e
Simplify RegisteredChannelCardBody CSS. 2023-01-27 21:15:40 +08:00
Gan Eng Chin 0061e34a00
Code refactor on marketing components (#36540) 2023-01-27 16:00:35 +08:00
Gan Eng Chin c2aad26473
Simplify CardHeaderTitle CSS.
- Use `@include font-size ( 20 )` to generate relative size in rem.
- Use unitless number value for line-height; this is the preferred way according to MDN.
- `font-weight` and `letter-spacing` are not needed.

The UI looks the same before and after this change.
2023-01-27 01:26:37 +08:00
Joshua T Flowers dfe2780e6a
Add default value for backorders (#36607)
* Add default value for backorders

* Add changelog entry
2023-01-26 09:20:10 -08: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
Fernando Marichal c030b7dcd5
Add survey when disabling new experience (#36544)
* Add customer-score-tracks data

* Add callback after disabling new exp

* Add TransientNotice after filling out the survey

# Conflicts:
#	plugins/woocommerce/src/Admin/Features/NewProductManagementExperience.php

* Remove comments

* Remove NEW_PRODUCT_MANAGEMENT_FEEDBACK

* Add changelog

* Rename const

* Remove queryParam after showing notice

* Fix lint

* Fix lint 2.0

* Remove empty line

* Refactor `maybe_show_disabled_notice`

* Fix lint 3.0

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 22:43:17 -03: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 db2343cfed
Enable new experience when new user selects "Physical product" (#36406)
* Enable new experience for simple products

* Add changelog

* Fix `updateOptions`

* Fix redirect when new-exp is enabled

* Redirect when new-exp is enabled

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 20:18:43 -03:00
Joshua T Flowers 4a2180f442
Show product CES footer on product tour close (#36516)
* Show product CES footer on product tour close

* Add changelog entry

* Remove unused code
2023-01-23 11:55:35 -08:00
Nathan Silveira 732fd7dba7
Fix typo in product tour in new product management experience (#36561) 2023-01-23 16:23:03 -03:00
Joshua T Flowers 7e27cffdb3
Fix overlapping header elements on product page (#36495)
* Place product tabs beneath header elements

* Observe header height changes and adjust tabs position

* Move header height into reusable hook

* Add changelog entry
2023-01-23 10:14:58 -08:00
Joel Thiessen 447379a424
Migrating product editor inventory section to use slot fills (#36509)
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-01-23 08:11:41 -08:00
Joel Thiessen cb0105efd9
Migrate shipping shipping in product editor to slot fill (#36534)
* Migrate shipping shipping in product editor to slot fill

* Adding changelog

* Removing obsolete shipping section files, adding support to variations form
2023-01-23 10:44:29 -04:00
Adrian Duffell b87df2fd4a
Add SlotFill for Task List Footer (#36527)
* Add footer slot

* Add ExperimentalWooTaskListFooter slot to task list

* Update inline documentation

* Add changelog
2023-01-23 13:48:42 +08:00
Gan Eng Chin d70fb07f31
Modify PluginCardBody to accept className, and change description type. 2023-01-21 23:13:13 +08:00
Gan Eng Chin 6baa403071
Move and rename type Plugin to RecommendedPlugin. 2023-01-21 23:12:04 +08:00
Gan Eng Chin d252922110
Rename file Plugin to InstalledPlugin.
(cherry picked from commit 0229354da0)
2023-01-21 23:11:47 +08:00
Gan Eng Chin 8873252c45
Rename type Plugin to InstalledPlugin.
(cherry picked from commit 56dbf53a35)
2023-01-21 23:11:36 +08:00
Gan Eng Chin 0fe028d8c2
Code refactor with CardHeaderTitle component.
This component will be used in other components later.

(cherry picked from commit 995fb7e02d)
2023-01-21 23:10:31 +08:00
Gan Eng Chin 3f56382cf1
Code refactor with CenteredSpinner.
(cherry picked from commit 5216643465)
2023-01-21 23:09:06 +08: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
RJ 39cd780e18
add: slot for tasklist completion component slotfill (#36487)
* add: slot for tasklist completion component slotfill

* added fillprops and changed to experimental slotfill name
2023-01-21 11:05:45 +08:00
Gan Eng Chin 1af1524b83
Rename CSS installed-channel to registered-channel. 2023-01-21 02:38:00 +08:00
Gan Eng Chin ef669d8ca2
Rename InstalledChannel to RegisteredChannel. 2023-01-21 02:36:39 +08:00
Gan Eng Chin 8754003fb0
Add mapping for sync-failed product listings status. 2023-01-21 02:26:19 +08:00
Gan Eng Chin 2a15f09514
Remove TODO comments. 2023-01-21 02:22:30 +08:00
Gan Eng Chin 3cc568b4ed
Remove duplicated RecommendedChannel type. 2023-01-21 02:20:06 +08:00
Gan Eng Chin 0b1ab21836
Rename types. 2023-01-21 02:14:36 +08:00
Joel Thiessen 67d811a67d
Migrating attributes section in product editor to slot fills (#36483) 2023-01-20 08:56:56 -08:00
Gan Eng Chin a511054a3e
Merge branch 'feature/34903-multichannel-marketing-frontend/main' into feature/34903-multichannel-marketing-frontend/34906-channels-card 2023-01-21 00:10:00 +08:00
RJ 7d8f7ad57c
add: slot for header banner slotfill (#36467) 2023-01-20 22:01:20 +08:00
Nathan Silveira 1123f9991f
Scroll newly added attribute into view (#36447)
* Scroll newly added attribute into view

* Increment changelog

* Add smooth scrolling when adding new attributes
2023-01-19 19:43:36 -03:00
Moon 395f3b3eb5
Add slot for ProgressHeader and ProgressTitle (#36482)
* Add slot for ProgressTitle

* Add slot for ProgressHeader

* Add changelog

* Add experimental prefix
2023-01-19 13:21:54 -08:00
Joel Thiessen 687dd6fdfe
Migrating product editor images section to slot-fill (#36461) 2023-01-19 09:45:30 -08:00
Gan Eng Chin d69f078fd5
Replace useIsPluginInstalled with useIsPluginInstalledNotActivated. 2023-01-20 01:36:39 +08:00
Gan Eng Chin cd0402a10c
Refetch registered channels after install and activate recommended channels. 2023-01-20 01:02:41 +08:00
Gan Eng Chin 9fa6ea4a25
Display activate button for channels that are not yet activated. 2023-01-20 00:36:34 +08:00
Gan Eng Chin 223ea4d712
Filter recommended channels to get "not installed" or "not activated" channels. 2023-01-19 22:23:00 +08:00
Gan Eng Chin cf4c62e707
Fix loading bug in useRecommendedChannels. 2023-01-19 19:50:56 +08:00
Gan Eng Chin b708cc18ff
Get recommended channels from API. 2023-01-19 19:33:51 +08: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
Chi-Hsuan Huang 025c6aab17
Fix tax task showing as not completed after setting up tax (#36468)
* Wait for requests to finish before redirecting

* Add changelog
2023-01-19 13:01:31 +08: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
Gan Eng Chin 2d7c8db2e5
Map product_listings_status to syncStatus. 2023-01-19 01:32:38 +08:00
Gan Eng Chin 0a36d7a4fe
Map errors_count to issueType and issueText. 2023-01-19 01:12:50 +08:00
Gan Eng Chin 07b8b98702
Merge branch 'feature/34903-multichannel-marketing-frontend/main' into feature/34903-multichannel-marketing-frontend/34906-channels-card 2023-01-18 17:35:50 +08:00
Gan Eng Chin f616d688d8
Call marketing channels API with wp.data. 2023-01-18 02:04:42 +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
Joshua T Flowers ea64a98f54
Extract attribute filtering and fetching logic out of attribute components (#36354)
* Move attribution fetching to separate hook

* Add changelog entry

* Set all attributes on update of subset of attributes

* Move filtering logic to hook

* Remove tests that filter attribute by type inside the component

* Rename AttributeField to AttributeControl and props from attributes to value
2023-01-17 04:34:08 -04:00
Matt Sherman 69e7fd1b42
Analytics: Decode HTML entities in CategoryBreadcrumbs (#36321)
* Decode HTML entities in CategoryBreadcrumbs

* Changelog
2023-01-13 11:14:40 -05:00
Fernando Marichal 78002eac9c
Hide `Variations` section when it is empty (#36202)
* Add changelog

* Hide Variations section when it is empty

* Fix hiding variations

* Remove `totalCount const

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-12 16:32:40 -03:00
Joshua T Flowers 891ecb7efb
Redirect to new product experience when in experiment group (#36381)
* Redirect to new product experience when in experiment group

* Add changelog entry
2023-01-12 16:02:40 -03:00
Joshua T Flowers ad59769f25
Remove persisted query on return to parent product from variation (#36365)
* Remove persisted query on return to parent product from variation

* Add changelog entry
2023-01-12 09:20:46 -08:00
Matt Sherman 54c0acf8cd
Decode HTML entities in CategoryFieldItem (#36367)
* Decode HTML entities in CategoryFieldItem.

* Changelog
2023-01-12 10:21:43 -05: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
Joel Thiessen f429b9444c
Adding WooProductFieldItem slotfill (#36315) 2023-01-10 10:13:02 -08:00
Gan Eng Chin b326ba1204
Merge branch 'feature/34903-multichannel-marketing-frontend/main' into feature/34903-multichannel-marketing-frontend/34906-channels-card 2023-01-09 23:38:03 +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 230e79fbdf
Fix reordering items logic in attributes/options lists (#36296)
* Fix reordering list items bug

* Add tests

* Remove orphan comment

* Add changelog

* Rename const

* Update plugins/woocommerce-admin/client/products/fields/attribute-field/utils.ts

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Rename `objectKey` to `attributeKey`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2023-01-06 08:53:03 -03: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
Joshua T Flowers 04089f37e6
Add product variation flag to hide WIP (#36311)
* Add product variations feature flag

* Add changelog entry
2023-01-05 18:30:23 -08:00
Joshua T Flowers e73fb9f23f
Derive product type from product attributes (#36243)
* Derive product type from product attributes

* Add tests around derive product type

* Add changelog entry
2023-01-03 16:25:21 -08:00
Joshua T Flowers 421fc3e30b
Convert HTML to blocks in product variation description (#36241)
* Convert HTML to blocks in product variation description

* Add changelog entry
2023-01-03 16:25:12 -08:00
Joshua T Flowers df0ddb2dff
Fix navigation between variations and tab selection (#36239)
* Fix navigation between variations and tab selection

* Add changelog entry
2023-01-03 08:59:49 -08:00
Fernando Marichal af9f493c43
Fix attributes/options lists corrupt render (#36236)
* Fix attributes/options lists reordering

* Add changelog

* Fix element key

* Remove comment

* Add tests

* Fix changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-03 10:33:29 -03:00
Joshua T Flowers 3fe3710c51
Automatically generate product variations on option changes (#36188)
* Auto generate variations on option changes

* Add changelog entry

* Move product variation generation to hook

* Create product auto draft if not yet created

* Allow auto-draft and trash statuses for products

* Update form context with product ID to allow fetching variations

* Fix product ID usage in variations

* Reset form after initial product creation

* Use form value name for display instead of persisted name for auto drafts

* Add additional test around auto draft title
2022-12-30 13:12:09 -08:00
Chi-Hsuan Huang 8c3f06c452
Fix "Save changes?" modal saves the options after selecting the 'Discard' option (#36160)
* Tweak save change modal padding

* Fix obw save change and add e2e tests

* Add changelog

* Fix product_types step
2022-12-28 16:23:16 +08: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
Fernando Marichal f5e23c329c
Fix edit attribute modal terms list (#36186)
* Fix `EditAttributeModalProps` terms list

* Add changelog

* Fix `AttributeField` continuos hydration

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-12-27 15:38:08 -03:00
Maikel David Pérez Gómez 8fc2818e28
Add edit button to variations list items (#36079)
* Add edit button to variations list items

* Add comment feedbacks
2022-12-27 15:22:52 -03: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
Matt Sherman a9b46d51b5
Add Options section to new product experience (#35910)
* Support passing in filter and new attribute properties to AttributeField

* Changelog

* Pass addButtonLabel as prop

* Add OptionsSection to options tab

* Refactor more to create Attributes and Options fields

* Refactor a couple of things

* Refactor globalAttributeHelperMessage

* Remove `Used for filters` checkbox

* Remove `hydrationComplete`

* Add subtitle to empty state component

* Fix 'Add option' button

* Fix tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-12-23 11:57:28 -08:00
Maikel David Pérez Gómez 5b3b5dab59
Truncate attribute option name to a max of 32 chars in variations list (#36134)
* Truncate attribute option name to a max of 32 chars in variations list

* Use PRODUCT_VARIATION_TITLE_LIMIT to truncate attribute option names

* Fix up lint error

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-12-23 11:29:44 -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
Gan Eng Chin c89b28157d
Merge branch 'feature/34903-multichannel-marketing-frontend/34905-campaigns-card' into feature/34903-multichannel-marketing-frontend/34909-create-campaign-modal
Conflicts:
	plugins/woocommerce-admin/client/marketing/hooks/index.ts
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/RecommendedChannels.tsx
	plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useChannels.ts
2022-12-24 02:07:15 +08:00
Gan Eng Chin 1d7b663186
Remove the unneeded "Create new campaign" button for now. 2022-12-24 01:45:59 +08:00
Gan Eng Chin 8e39098256
Show Campaigns card only when there is at least one registered channel. 2022-12-24 01:43:09 +08:00
Gan Eng Chin ee6fa9508e
Merge branch 'feature/34903-multichannel-marketing-frontend/34906-channels-card' into feature/34903-multichannel-marketing-frontend/34905-campaigns-card
Conflicts:
	plugins/woocommerce-admin/client/marketing/overview-multichannel/MarketingOverviewMultichannel.tsx
2022-12-24 01:39:57 +08:00
Gan Eng Chin 52dd8845cc
Load registered and recommended channels in MarketingOverviewMultichannel.
The data will be used to conditionally display Campaigns card later.
2022-12-24 01:14:02 +08:00
Gan Eng Chin e950417542
Move useRegisteredChannels and useRecommendedChannels into shared hooks directory. 2022-12-24 00:48:03 +08:00
Gan Eng Chin 7bd32ba638
Remove useChannels and use useRegisteredChannels and useRecommendedChannels directly. 2022-12-24 00:32:23 +08:00
Gan Eng Chin 9e0b71ff1c
Rename CollapsibleRecommendedChannels to RecommendedChannels. 2022-12-23 22:12:16 +08:00
Gan Eng Chin af2f4eb904
CSS for "Add channels" button. 2022-12-23 22:08:50 +08:00
Gan Eng Chin 31b635b888
Code refactor: move CSS code to corresponding SCSS file. 2022-12-23 21:53:42 +08:00
Gan Eng Chin 06a303fc33
Types for useRegisteredChannels. 2022-12-23 21:21:52 +08:00
Gan Eng Chin 4fa4f802e9
Check for empty recommended channels. 2022-12-23 21:19:00 +08:00
Moon 52640de58a
Update country select control regex (#36159)
* Update regex to match country name or " - region "

* Add changelog

* Fix style
2022-12-22 21:30:50 -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
Gan Eng Chin d0de1b5c21
Add border and change padding for recommended channels in create campaign modal. 2022-12-23 02:00:45 +08: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
Maikel David Pérez Gómez 1ab7a851cb
Reset variation form if a new variation is given (#36078) 2022-12-21 15:00:35 -03:00
Gan Eng Chin 07894d42e3
Code refactor for Campaigns component, remove unneeded CampaignsCardHeader. 2022-12-22 01:52:24 +08:00
Maikel David Pérez Gómez c7c0322163
Persist active tab on refresh (#36112) 2022-12-21 14:47:13 -03:00
Gan Eng Chin a3c8680789
Use perPage variable instead of duplicated number. 2022-12-22 01:34:46 +08:00
Gan Eng Chin 321145eb2e
Better code clarity with woocommerce-marketing-campaigns-table class name. 2022-12-21 23:12:10 +08:00
Gan Eng Chin 894b77dc96
Code refactor with CreateNewCampaignModal. 2022-12-21 22:56:22 +08:00
Gan Eng Chin 5caffb6c63
Make create campaign button open in new tab depending on createUrl origin. 2022-12-21 21:26:57 +08:00
Maikel David Pérez Gómez 60e3adabd9
Add product variation navigation component (#36076)
* Add simple navigation component

* Add useProductVariationNavigation hook to manage navigation logic

* Integrate navigation component and hook in product variation form

* Add changelog file

* Add comment feedbacks
2022-12-20 18:02:25 -03:00
Gan Eng Chin 6b3fbdf16b
Display new campaign types in create campaign modal. 2022-12-21 02:38:56 +08:00
Joshua T Flowers 92496e3578
Add product variation General section (#36081)
* Add product variation general section

* Add changelog entry
2022-12-20 09:03:51 -08:00
Gan Eng Chin 24d59f7316
Hide the recommended channels section if it is empty. 2022-12-20 22:39:00 +08:00
Gan Eng Chin 17f2072d9f
Display recommended channels in create campaign modal. 2022-12-20 02:37:02 +08:00
Gan Eng Chin 5f50e63a1e
Move useRecommendedChannels to shared hooks directory. 2022-12-20 02:35:37 +08:00
Gan Eng Chin 6de95c78a1
Move RecommendedChannelsList to shared components directory. 2022-12-20 02:33:35 +08:00
Gan Eng Chin 33998743d6
Remove unneeded imports in RecommendedChannelsList. 2022-12-20 02:29:42 +08:00
Gan Eng Chin 08661353eb
Add CampaignsCardHeader component with modal. 2022-12-20 01:17:30 +08:00
Gan Eng Chin 558ddf2609
Use Campaign type in useCampaigns. 2022-12-19 20:54:01 +08:00
Gan Eng Chin c67e479162
Add Campaign type. 2022-12-19 20:53:31 +08:00
Gan Eng Chin cbc616a9f3
Set cost column as numeric in Campaigns card.
This makes the column right-aligned.
2022-12-18 20:38:07 +08:00
Gan Eng Chin 32cf8d1341
Add pagination to Campaigns card. 2022-12-18 20:37:25 +08:00
Gan Eng Chin c444dbd126
CSS for campaign rows in Campaigns card. 2022-12-18 20:08:21 +08:00
Gan Eng Chin f5799c8721
Display campaign data in table in Campaigns card. 2022-12-18 19:34:16 +08:00
Gan Eng Chin af4f79ab28
Add loading state for Campaigns card. 2022-12-17 21:08:14 +08: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
Maikel David Pérez Gómez d768307e69
Add single product variation sections (#36051) 2022-12-16 14:44:54 -03:00
Maikel David Pérez Gómez a6fa0e71bf
Add product variation visibility toggle (#36020)
* Add svg icons and show them in variations list

* The visibility icon should reflect the current visibility status

* Clicking the visibility icon should toggle on or off the variation visibility and persist these settings on refresh

* Price and quantity should be fade when the variant is not visible

* Add changelog

* Hovering the visibility icon should display a tooltip indicating what clicking this button will do

* Fix linter error

* Fix spinner opacity if button is disabled
2022-12-16 14:44:06 -03: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
Adrian Duffell 915256b709
Add Missing Tracks Events to Tax Settings Conflict Warning (#36042)
* Import Tracks package

* Add tracks event tax_settings_conflict_recommended_settings_clicked

* Add tracks event tax_settings_conflict

* Add tracks event tax_settings_conflict_dismissed

* Add changelog
2022-12-16 16:57:09 +08: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
Joel Thiessen 6e20f66966
Adding the feedback button on activity panel for the classic product page (#35810) 2022-12-15 14:31:47 -08:00
Joel Thiessen 8405974674
Adding ces exit prompt when product importer abandoned (#35996) 2022-12-15 13:18:35 -08:00
louwie17 895cb1561c
Add/35126 ces exit prompt orders (#35762)
* Add exit tracking for orders

* Update exit page CES action

* Fix order hook name

* Add changelog

* Address PR feedback
2022-12-15 15:50:34 -04:00
Joshua T Flowers 266b61cd4c
Disable irrelevant product tabs when variations exist (#35939)
* Add disabled prop to product form tabs

* Add tooltips to disabled tabs

* Add styling for tooltips when disabled

* Add changelog entry

* Update disabled styles for experimental focus buttons
2022-12-15 11:20:10 -08:00
Fernando Marichal 44cf396be6
Product variation quantity status indicator (#35982)
* Add variation status indicator

* Add changelog

* Add tests

* Fix style

* Rename enum

* Fix lint

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-12-15 15:20:21 -03:00
Gan Eng Chin 30d316886c
Add empty state Campaigns card. 2022-12-16 01:13:32 +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
RJ cc9f4b65fc
Enhancement: Tax settings conflict warning (#36010)
* Add WIP error handling when conflicting settings chosen

* add: enhance tax settings conflict warning

* Fix WC_Settings_Tax_Test::test_get_settings_for_default_section

* Wrap texts in i18n method

* Add snackbar

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-12-15 21:04:28 +08:00
Adrian Duffell dbbe78c8ae
Add Codisto Extension to Onboarding (#36009)
* WIP

* Update codistoconnect

* Update selective-extensions-bundle for free trial badge

* Add codisto onboarding logo

* Add changelog

* Fix lint issues

* Fix lint issues with necassary spacing this time

* Add link to codisto product page

* Fix lint formatting

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-12-15 20:34:34 +08:00
Maikel David Pérez Gómez 31e6f90e74
Fix product tab to be shown on production build (#35976) 2022-12-14 18:07:55 -03: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
Gan Eng Chin 2e8b5227e4
Move RecommendedChannel type. 2022-12-14 20:54:29 +08:00
Gan Eng Chin 6f4e05945b
Add dummy data for testing in useRecommendedChannels. 2022-12-14 20:19:20 +08:00
Gan Eng Chin 6c127d70c8
Add dummy data for testing. 2022-12-14 20:11:40 +08:00