woocommerce/packages/js/explat/changelog
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
..
.gitkeep changelog 2022-04-28 10:00:29 +12:00
add-33331-wcadmin-install-timestamp-explat-default Add/33331 wcadmin install timestamp explat default (#33574) 2022-07-11 11:59:41 -03:00
add-core-profiler-welcome-woo Add core profiler "Welcome to Woo!" page (#37952) 2023-05-03 15:54:28 +08:00
dev-adjust-sync Fix some bugs in syncpack configuration (#35651) 2022-11-22 12:06:47 +13:00
dev-bump-pnpm-version-restraint Update pnpm once again to fix issues with auto-install-peers (#35007) 2022-10-10 16:59:51 +13:00
dev-consolidate-eslint-versions Consolidate eslint versions (#36700) 2023-02-02 23:25:04 +13:00
dev-fix-admin-tests-pnpm7 Update dependencies and jest config to pass admin tests for pnpm 7 (#34428) 2022-08-31 12:06:51 +08:00
dev-fix-pnpm-version-engines Fix pnpm version to 7.11.0 in engines and in CI (#34773) 2022-09-27 11:30:52 +13:00
dev-pin-wp-deps-6 Update Syncpack and use it to pin @wordpress packages to wp-6.0 (#37034) 2023-03-09 10:13:25 +13:00
dev-simplify-turbo Simplify turbo commands (#34055) 2022-08-05 12:03:17 +12:00
dev-update-pnpm8 Update monorepo to pnpm 8 and Node to 16.14 (#37915) 2023-04-25 18:49:30 +12:00
fix-missing-type-definitions-dependencies fix: type definition issues related to pnpm hoisting rules in preparation for pnpm 7 upgrade (#34154) 2022-08-05 15:19:08 +08:00
fix-plugin-installer-ts Update plugins installer component to TS, Fix TS bugs and Syncpack TypeScript (#34787) 2022-09-30 10:59:07 +13:00
fix-typescript-incremental-builds Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00
fix-typescript-package-isolation Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
update-changelogger Update changelogger to 3.3.0 to support PR number capturing with merge (#36266) 2023-01-05 14:42:51 +05:30
upgrade-pnpm-7 Upgrade to pnpm 7 (#34661) 2022-09-16 09:21:42 +12:00