Commit Graph

37 Commits

Author SHA1 Message Date
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04:00
Matt Sherman af24637439
Create @woocommerce/admin-layout package (#37094)
* Initial admin-layout package skeleton

* Changelog files

* Use createOrderedChildren and sortFillsByOrder from @woocommerce/components for WooFooterItem

* Move WooFooterItem to @woocommerce/admin-layout

* Use WooFooterItem from @woocommerce/admin-layout

* Suppress errant TS lint errors

* Exports for @woocommerce/admin-layout

* Fill updates and eslint suppression

* Changelogs

* Remove suppression of tslint errors

* Fix react and @types/react versions

* Load @woocommerce/admin-layout script and styles

* Move WooHeaderItem, WooHeaderNavigationItem, and WooHeaderPageTitle to @woocommerce/admin-layout

* Regenerate lock file post-rebase

* Remove duplicate import post-rebase

* Add wc-admin-layout to app style dependency

* Fix jest mock of @woocommerce/admin-layout

* Fix spacing.

* Export slot names

* Fix typo in .npmrc

* Update lock file

* Try updating lock file

* Update lock file

* Update lock file

* Update to latest lock file from trunk

* Update lock file

* Sync dependencies of @woocommerce/admin-layout

* Manually sync @wordpress dependencies
2023-03-10 09:58:02 -05:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Joel Thiessen 9be843422d
Fixing issue preventing import productes CES exit page from firing (#36656) 2023-01-27 12:14:59 -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
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
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
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
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
louwie17 613e58c061
CES exit prompt for product editing screens (#35728)
* Add exit page tracker logic and implement it for product pages

* Add changelog

* Fix lint errors and add comments

* Add ces_location prop

* Add mock to fix broken test

* Add CES exit page survey tests

* Fix a bug with React pages redirects and update actions

* Fix test

* Fix lint

* Add default inside location prop

* Remove exit prefix within action

* Address PR feedback and make sure its not triggered on save

* Update copy of exit feedback notice

* Add changelog

* Update name of param

* Fix lint error

* Use hasFinishedResolution vs isResolved in customerEffortScoreTracks
2022-12-12 09:56:28 -04:00
louwie17 e7dd1a0be9
Add/35300 ces feedback product mvp (#35690)
* Add ability to show CES modal through share Feedback button

* Make use of showCesModal in footer

* Update CES action for share feedback

* Update changes to support second CES question

* Add changelog

* Address some PR feedback
2022-12-02 11:59:42 -04:00
louwie17 0e8fbe083d
Add/35129 product mvp ces (#35652)
* Add product mvp ces footer

* Add changelog

* Reset action option name after CES action

* Make sure we make use of cesAction

* Add close button

* Fix formatting

* Fix css styling issues

* Add icon to success notice

* Add product mvp CES hook and modify logic a little bit

* Update the CES product action name

* Address PR feedback and fix styling for smaller screens

* Add second question to CES product footer and update options

* Add changelog

* Fix lint error

* Fix tests
2022-12-02 05:35:47 -04:00
Joel Thiessen 4db5c0d8cd
Add additional question to CES modal (#35680) 2022-11-29 08:15:58 -08:00
Fernando 88c7cfb628
Fix Customer Effort Score Tracks (#34209)
* Rename sent prop (CustomerEffortScore)

* Add changelog

* Fix changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-05 15:40:01 -03:00
Lourens Schep d1bf5c5719 Address the majority of the PR feedback 2022-05-16 10:03:46 -03:00
Lourens Schep 4b27f831f7 Add CES submission 2022-05-13 10:29:21 -03:00
RJChow 1ba60ee69d Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
Chi-Hsuan Huang c05605fddf Update linting, testing, `@types/*` dependencies (https://github.com/woocommerce/woocommerce-admin/pull/8475)
* Update husky from 4 to 7

* Update @types/jest from 26 to 27

* Update lint-staged from 10 to 12

* Update babel-jest from 26 to 27

* Update @typescript-eslint/eslint-plugin from 4 to 5

* Update @typescript-eslint/parser from 4 to 5

* Update chalk from 4 to 5

* Update concurrently from 5 to 7

* Update stylelint from 9 to 14 and stylelint-config-wordpress from 13 to 17

* Update @wordpress/prettier-config from 0.4 to 1.1

* Update eslint from 7 to 8, @wordpress/eslint-plugin from 8 to 10, eslint-plugin-testing-library to 5

* Fix lint errors after updating eslint-plugin-testing-library

* Fix style lint

* Rename .stylelintrc.json -> stylelint.config.js & add todo comment

Fix stylelint.config.js

* Remove @wordpress/e2e-test-utils

* Add changelogs for eslint-plugin

* Update storybook/preview.js since addDecorator has been deprecated

Remove parameters

* Import directly from @storybook/addon-docs

* Migrate some stories to use @storybook/addon-controls

Add a comment for @storybook/addon-knobs

* Update changelogs

* Update preview.js to fix lint warning

* Update pnpm-lock.yaml

* Fix eslint layout errors (https://github.com/woocommerce/woocommerce-admin/pull/8484)
2022-03-18 19:45:14 +08:00
Ilyas Foo 6c097d7745 Add CES survey for search product, order, customer (https://github.com/woocommerce/woocommerce-admin/pull/6420)
* Add CES survey for search product, order, customer

* Update readme and testing instructions

* Add line feed

* Utilize get_current_screen
2021-03-11 17:35:57 +08:00
Bec Scott 88b64b6980 Fix regression where store age is 0 while isResolving for the option is returning false (https://github.com/woocommerce/woocommerce-admin/pull/5858)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-12-10 17:26:31 +10:00
Bec Scott baaac28228 Send store age in weeks to tracks (https://github.com/woocommerce/woocommerce-admin/pull/5817)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-12-04 11:12:28 +10:00
Bec Scott 7a2e23b695 Add action to shown options when the snackbar is dismissed (https://github.com/woocommerce/woocommerce-admin/pull/5779)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-12-02 11:17:42 +10:00
Bec Scott cc5e500085 Fix/some outstanding CES bugs (https://github.com/woocommerce/woocommerce-admin/pull/5739)
* fix settings change enqueue params

* Include comments in score record callback

* send empty string for comments

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-26 10:25:09 +10:00
Moon eb7a779e1f Add/5349 trigger ces on filtering analytics (https://github.com/woocommerce/woocommerce-admin/pull/5649)
* Use a store to render CES tracks

* Use the CES store to trigger CES survey when users change date range or single product filters.

* Support onClick event for the Compare button

* Trigger CES survey when a user clicks the Compare button on products, variations, categories, coupon, and taxes pages

* Set default text for onSubmitLabel in js and remove its requirement

* Add addCesSurveyTrackForAnalytics action so that it can be shared in other components in analytics pages -- remove duplicates

* Call addCesSurveyTrack from addCesSurveyTrackForAnalytics to avoid duplicate

* Remove 'tracks' from the method name
2020-11-24 15:18:50 -08:00
Matt Sherman ad78576cf4 Record Tracks events when CES notice/snackbar and modal is viewed (https://github.com/woocommerce/woocommerce-admin/pull/5648) 2020-11-18 15:53:52 -05:00
Bec Scott 0b721d4461 Add icon to snackbar (https://github.com/woocommerce/woocommerce-admin/pull/5563)
* Add an icon to the snackbar displayed for CES

* Change icon from SVG to a unicode emoji pencil

* formatting changes to satisfy CI

* bump ci

* Fix prop types and jsdocs for the customer effort score component

* whitespace >:-(

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-13 10:53:28 +10:00
Moon ad4a0371c3 Add onsubmit_label string that can be used to create a snackbar upon … (https://github.com/woocommerce/woocommerce-admin/pull/5544)
* Add onsubmit_label string that can be used to create a snackbar upon survey submission

* Make onSubmitLabel required
2020-11-09 11:09:04 -08:00
Bec Scott 2bdab078e0 Use snackbar before CES modal (https://github.com/woocommerce/woocommerce-admin/pull/5406)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Use an interstitial snackbar to trigger the CES modal

* Moved notice (snackbar) into @woocommerce/customer-effort-score

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* drop initiallyVisible from container

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-04 10:48:56 +10:00
Bec Scott 17c149f66e Only allow Customer Effort Score gathering if tracking is allowed (https://github.com/woocommerce/woocommerce-admin/pull/5365)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Display CES modal once per event per store

* Remove TODO

* appease the formatting gods

* Use Loader::load_features instead of DIY

* Drop CustomerEffortScoreTracks singleton

* Fix tracks event name

* Only add the CES JS if tracking is allowed

* Only display the CES modal if tracking is allowed

* bump ci

* Pull package-lock.json from main

* Refactor to remove some duplication

* Revert to keep toggleVisible etc

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-04 10:30:34 +10:00
Bec Scott 00eeede732 Display CES modal once per action per store (https://github.com/woocommerce/woocommerce-admin/pull/5352)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Display CES modal once per event per store

* Remove TODO

* appease the formatting gods

* Use Loader::load_features instead of DIY

* Drop CustomerEffortScoreTracks singleton

* Fix tracks event name

* bump ci

* Pull package-lock.json from main

* Refactor to remove some duplication

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-03 11:57:47 +10:00
Bec Scott 0a1cec3d4e Only show CES survey on correct page (https://github.com/woocommerce/woocommerce-admin/pull/5511)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* Only show the CES survey in the correct screen

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-02 16:08:17 +10:00
Bec Scott 1e1e428354 Add store age to CES tracked data (https://github.com/woocommerce/woocommerce-admin/pull/5373)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* Only display the CES modal if tracking is allowed

* Move MONTH constant into @woocommerce/data

* Remove unused const

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-02 13:47:15 +10:00
Bec Scott f29995124c Basic customer effort score survey functionality (https://github.com/woocommerce/woocommerce-admin/pull/5324)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-10-30 16:52:52 +10:00