woocommerce/plugins/woocommerce-admin/client
Chi-Hsuan Huang ea58ae339a
Add core profiler "Welcome to Woo!" page (#37952)
* Add core profiler - welcome to woo page

* Add changelog

* Update checkbox styles

* Update copies

* Add test

* Add enable prop to window.wcTracks type

* Add tracks

* Add explat changelog

* Fix import

* Update default tracking value

* Update copies

* Fix test

* using invoked promise instead of useState

- take advantage of xstate's built ins for side effects instead of  useEffect/hooks
- discovered that error result wasn't really handled in original useEffect
- use text labels instead of inline functions so that we can decouple the implementation from the machine model
- todo: can move the invoked function out elsewhere and also tests if needed (not necessary here because it's a simple call)

* use actions.choose instead of branching inside action 

- https://stately.ai/docs/xstate/transitions-and-choices/guarded-actions#the-choose-action
- makes it so that the machine model is serializeable
- todo: in the distant future i wonder if it might be tidier to have tracks be its own actor that just receives the same events that this machine does, that way it's just standalone instead of mixing up tracks with the implementation

* use dispatch instead of useDispatch

- decouples the implementation of the handler from the react component
- makes the handler testable on its own if needed
- makes the state machine testable without relying on external dependencies

* decoupled remaining function calls

* Fix lint error

* Fix style lint

* address xstate console warnings

- .withConfig() is a function call that returns a new object every invocation so we need to wrap it in useMemo to keep it stable

* Add optInDataSharing is false test

* Fix lint

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-05-03 15:54:28 +08:00
..
activity-panel Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
analytics Update AdvancedFilters to use createInterpolateElement instead of interpolateComponents (#37967) 2023-04-26 06:58:14 -04:00
core-profiler Add core profiler "Welcome to Woo!" page (#37952) 2023-05-03 15:54:28 +08:00
dashboard Remove theme step from onboarding wizard (#37671) 2023-04-17 11:59:02 +08:00
embedded-body-layout Add components to @woocommerce/customer-effort-score (#37112) 2023-03-14 12:16:19 -04:00
guided-tours Show spotlight when switching to variable product type (#37413) 2023-03-28 13:49:40 -04:00
header Create @woocommerce/admin-layout package (#37094) 2023-03-10 09:58:02 -05:00
homescreen Fix N/A displayed on re-enabling toggles for "Stats overview" panel after refreshing "Woocommerce > Home" page. (#38030) 2023-04-28 16:15:10 -03:00
hooks Move usePreventLeavingPage to navigation package (#36752) 2023-03-16 05:33:22 -03:00
inbox-panel Fix unread notes count in inbox panel (#35396) 2022-11-23 08:52:46 -08:00
layout Await triggerNoteAction before navigating when action is clicked (#38047) 2023-05-02 11:17:50 -03:00
lib Moving currencyContext to currency package and updating references (#36959) 2023-02-28 08:55:49 -08:00
marketing Simplify boolean expression before && in Marketing page. 2023-03-27 21:55:42 +08:00
mobile-banner Create @woocommerce/admin-layout package (#37094) 2023-03-10 09:58:02 -05:00
navigation Set up i18n-text-domain rule and fix missing text domain (#33780) 2022-07-08 18:37:30 +08:00
payments fix: payments recommendations pane wrong image size (#37259) 2023-03-17 12:29:19 +08:00
payments-welcome Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
products Adding attributes block to product block editor. (#38051) 2023-05-02 21:13:48 -07:00
profile-wizard Add Onboarding Heuristics Tracks Event (#37767) 2023-04-18 04:47:24 +08:00
settings Add Missing Tracks Events to Tax Settings Conflict Warning (#36042) 2022-12-16 16:57:09 +08:00
settings-recommendations Fix JS lint errors (#33484) 2022-06-21 16:37:34 +08:00
shipping Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
store-management-links Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
stylesheets Move the Save draft and Preview buttons to the product editor header (#37461) 2023-04-04 11:30:39 -04:00
task-lists Solved issue of Ellipsis menu overlaps on small screen (#37583) 2023-04-17 13:22:34 +08:00
tasks Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
two-column-tasks Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
typings Update/34885 category field in product editor (#36869) 2023-04-19 04:28:18 -03:00
utils Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
wp-admin-scripts Add product type options to product tracking (#38017) 2023-05-02 13:42:57 -04:00
index.js dev: added xstate inspector toggling (#38022) 2023-04-28 15:30:52 +08:00
jest.config.js Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
tsconfig.test.json Update admin tsconfig to isolated from other projects 2022-04-15 13:50:18 +08:00
xstate.js dev: added xstate inspector toggling (#38022) 2023-04-28 15:30:52 +08:00