woocommerce/plugins/woocommerce-admin
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
..
bin Update woocommerce admin scripts to align more with turborepo (#33982) 2022-07-22 08:32:03 -03:00
client Add core profiler "Welcome to Woo!" page (#37952) 2023-05-03 15:54:28 +08:00
docs Rename @woocommerce/admin-library (#33460) 2022-06-17 13:28:34 -07:00
.browserslistrc Add CSS autoprefixer (https://github.com/woocommerce/woocommerce-admin/pull/244) 2018-07-30 10:05:22 -04:00
.distignore Create E2E package (https://github.com/woocommerce/woocommerce-admin/pull/7084) 2021-07-13 16:38:05 -03:00
.eslintignore Ignore core js packages from woo admin's eslint 2022-03-29 16:07:09 +08:00
.eslintrc.js dev: added xstate inspector toggling (#38022) 2023-04-28 15:30:52 +08:00
.gitattributes Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349) 2022-03-04 12:01:16 +08:00
.gitignore Enable Typescript checking on ./client folder (https://github.com/woocommerce/woocommerce-admin/pull/8372) 2022-03-01 12:19:07 +08:00
.npmrc Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349) 2022-03-04 12:01:16 +08:00
.prettierrc.js Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856) 2021-01-26 13:24:28 +13:00
.stylelintignore CSS Linting: Exclude Storybook CSS (https://github.com/woocommerce/woocommerce-admin/pull/6785) 2021-04-13 10:03:44 +12:00
README.md Update woocommerce-admin README.md 2022-04-14 13:49:51 +08:00
babel.config.js Add @babel/plugin-proposal-class-properties to run storybook (#35867) 2022-12-07 22:26:02 +08:00
package.json dev: added xstate inspector toggling (#38022) 2023-04-28 15:30:52 +08:00
stylelint.config.js Update linting, testing, `@types/*` dependencies (https://github.com/woocommerce/woocommerce-admin/pull/8475) 2022-03-18 19:45:14 +08:00
tsconfig.json Move product-editor CES-related components and utilities (#37131) 2023-03-28 13:38:08 -04:00
unminify.js Changed unminify plugin to hook into step before optimization 2022-04-11 21:54:48 +08:00
webpack.config.js Adding attributes block to product block editor. (#38051) 2023-05-02 21:13:48 -07:00

README.md

WooCommerce Admin

This is a javascript-driven, React-based admin interface for WooCommerce.

Development

Please refer to the WooCommerce Admin Development

End-to-end tests

Please refer to the WooCommerce End to End Tests

Common Issues

If you're encountering any issue setting things up, chances are we have been there too. Please have a look at our wiki for a list of common problems.