Commit Graph

5 Commits

Author SHA1 Message Date
Ilyas Foo b490e56a40
Various UI fixes in Core profiler steps (#38759)
* Fix font heading font style and adjust main component max width to match design

* Remove redundant #FunWooFact

* Reset button font color to follow admin theme

* Fix Installed label vertical alignment

* Changelog

* Remove permanent borders from consent checkbox, lint fix

* Remove box shadow on checkboxes in plugins page

* Standardize checkbox styling across core profiler

* Fix heading font styling

* Lint

* More lint

* Update snapshot
2023-06-17 13:14:13 +08:00
Moon 604132391a
Visual changes for Intro, guided setup, and skipped guided setup pages (#38709)
* Change Skip this setup to Skip this step

* Visual changes on intro, user profile, and skip guided page

* Always check tracking agreement

* Change border to 2px

* Change Give yoru store a name font-size to 13

* Add Changelog

* Update test to reflect the text change

* Remove !important

* Update test snapshot

* Update test snapshot

* Remove test that is no longer necessary
2023-06-13 22:10:43 -07:00
RJ 38dc82b4b1
dev: add core profiler state machine tests (#38154)
dev: added tests for core profiler state machine

- added tests to demonstrate model based testing with @xstate/test
2023-05-16 08:56:39 +08:00
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
RJ f0109e89ac
add: new core profiler scaffolding in xstate (#37628)
* add: core profiler scaffolding using xstate

* address review feedback and questions

* changed path to use setup-wizard

* default new core-profiler feature flag to false
2023-04-24 10:08:24 +08:00