Commit Graph

59 Commits

Author SHA1 Message Date
rjchow 6ccef6d498 fix: stale error not cleared 2023-11-01 14:07:47 +08:00
rjchow 5468ce68b8 fix: core profiler email opt in validation 2023-11-01 12:42:16 +08:00
RJ e01e6f8b2a
add: core profiler email marketing opt in (#40869)
* add: core profiler email marketing opt in

* tests

* changed mailchimp feature flag

* fix: made experiment name static

* lint
2023-10-24 17:07:26 +02:00
Moon 8b32e47086
Redirect to Jetpack connect when jetpack-boost is selected (#40261)
* Redirect to Jetpack connect when jetpack-boost is selected

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-09-19 13:22:59 -07:00
Moon ea300ef761
Update store currency on store location update (#40142)
* Update store currency when location changes

* Remove incorrect import

* Add changefile(s) from automation for the following project(s): woocommerce

* Add space to trigger GH jobs

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-09-14 10:42:59 -07:00
Moon c45335b936
CYS - Add LookAndFeel and ToneOfVoice pages (#39979)
* Add ProgressBar component to @woocommerce/components

* Add changelog

* Remove html.wp-toolbar in fullscreen mode

* Add base style

* Add Tell us a bit more about your business page

* Fix merge conflict issues

* Send BUSINESS_INFO_DESCRIPTION_COMPLETE event when continue button is clicked

* Remove duplicated style import

* Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce

* Lint fix

* Add 'Look and Feel' and 'Tone of voice' pages';

* Use correct classname

* Minor changes

* Textearea color should be gray-900 after the user enter text
* guide font weight should be 500

* Fix layout shift when a choice is selected

* Fix choices width for tone of voice page

* Use context value for the default

* Revert button margin top

* Fix default selection

* Add X button

* Decrease the margin by 20px to accommodate the height of the close button

* Add close action

* Include @woocommerce/ai package

* Add AI service

* Use AI service

* Parse JSON from in function

* Fix assignLookAndTone event type

* Update plugins/woocommerce-admin/client/customize-store/design-with-ai/components/choice/choice.scss

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Log when AI API endpoint request fails

* Add spinner when user clicks the continue button

* streamlined unnecessary isRequesting context and forwarded close event

* pnpm-lock changes from trunk

* lint fixes

* ai package test passWithNoTests

* changelog

* reset pnpm-lock to trunk

* Dev: update pnpm-lock.yaml and jest preset config (#40045)

* Update pnpm-lock.yaml

* Update jest-preset config to fix unexpected token error

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2023-09-06 14:21:09 +08:00
RJ 0190f4adea
fix: applied lint autofixes (#39942)
* woocommerce-admin lint fixes

* @woocommerce/* lint fixes

* Add changefile(s) from automation for the following project(s): @woocommerce/date, @woocommerce/data, @woocommerce/components, @woocommerce/admin-layout, woocommerce

* lints

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-08-30 06:40:45 +08:00
Chris Runnells bd5fc03aae Add secondary container to fix layout shifts
Also added CSS so that the container is always aligned to the top of the wrapper
2023-08-24 14:01:55 -10:00
Chris Runnells fb506bf18f Update SVG files so they are all the same size 2023-08-24 13:57:50 -10:00
RJ cb2cf79342
dev: refactor core profiler loader (#39735)
* dev: refactor core profiler loader

* dev: added storybook example for loader

* lint

* Apply suggestions from code review

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* addressed review feedback

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-08-22 19:58:33 +10:00
Moon 6f1a84e435
Run A/B test on the core profiler plugins page with Jetpack and Jetpack Boost (#39799)
* Update Jetpack label and description

* Replace Jetpack with Jetpack Boost for treatment group

* Add changelog

* Append plugin_name param to Jetpack Connection page URL

* Use the correct experiment name
2023-08-21 12:43:15 -07:00
RJ d663c304c9
add: customize your store xstate scaffolding (#39619)
* add: customize your store xstate scaffolding

* Update plugins/woocommerce-admin/client/core-profiler/types.tsx

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* improved findComponentMeta

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-08-18 13:30:25 +08:00
Ilyas Foo 3e9c14d5fb
Add plugin installation request track for core profiler (#39533)
* Add track to plugin installation in core profiler

* Rename available to shown

* Add changelog

* Lint
2023-08-17 22:34:52 +08:00
RJ 99182c015c
dev: fix core profiler context ts type error (#39749) 2023-08-16 20:19:51 +08:00
RJ 964dd1f449
dev/refactor core profiler utils (#39581)
* dev: added useFullScreen hook

- foresee using this in more developments

* dev: made findComponentMeta generic

* changelog
2023-08-15 19:26:37 +08:00
RJ 106e15f74a
fix: core-profiler intro opt in page tracks ordering (#39508) 2023-08-10 14:25:44 +08:00
Sam Seay e8c3808527
Upgrade TypeScript to v5.1 (#39531) 2023-08-08 16:35:31 +12:00
Moon 3c07a03943
Update/79113 incorrect subheading style and copy on wc core profiler (#39526)
* Use -webkit-font-smoothing: antialiased for core profiler subheadings

* Remove subheading letter-spacing
2023-08-03 11:26:52 -07:00
Moon 53593061cf
Use the same checkbox styles on the platform selector (#39469)
* Use the same checkbox style

* Add changelog

* Update plugins/woocommerce-admin/client/core-profiler/components/multiple-selector/multiple-selector.scss

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Fix CSS lint issues

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-08-01 17:18:38 -07:00
Moon 46d83e3861
Redirect to Jetpack connect page on plugins page skip (#39109)
* Redirect users to Jetpack Auth when the users deselect all plugins, but Jetpack is already installed

* Add changelog
2023-07-31 09:07:10 -07:00
Moon c810960bff
Align checkbox, logo, and title on the plugins page (core profiler) (#39394)
* Reset checkbox position

* Center align chekbox, logo, and the title

* Add changelog

* Remove use of classnames -- no longer needed

* Fix CSS lint issues
2023-07-31 09:06:50 -07:00
Moon b8a8d48474
Update/39325 typo in core profiler data sharing copy (#39327)
* Fix grammar in data-sharing agreement copy

* Add changelog

* Put ,

* Add brackets

* Move learn more link inside the bracket

* Update test snapshot

* Fix grammar

* Update test snapshot
2023-07-24 12:13:13 -07:00
RJ 615393be39
dev: core profiler pages storybook (#39046)
* dev: core profiler pages storybook

* changed css path to pre-build zip path
2023-07-24 20:34:38 +08:00
Moon 68ff03063a
Core profiler -- fix the gap at the top on iPad and iPad Mini (#39108)
* Fix unexpected gap on iPad and iPad Mini

* Fix css lint
2023-07-07 10:51:48 -07:00
Moon 7bbffd3284
Update CSS styles for core profiler headers (#39059)
* Remove letter-spacing and use 500 for font-weight

* Add changelog

* Style updates for the header

* Set letter-spacing to normal
* Use 500 for font-weight
* Remove max-width

* Add changelog
2023-07-03 10:54:48 -07:00
Moon 87393e0ef1
Update CSS styles for core profiler headers (#39042)
* Remove letter-spacing and use 500 for font-weight

* Add changelog
2023-06-29 20:16:44 -07:00
Moon ac1b5f0b14
Restore plugins selection when there is an error (#38922)
Restore plugins selection when there is installatio error
2023-06-26 17:31:16 -07:00
Moon acfd7dc53f
Prefetch Jetpack connection and auth info (#38929)
* prefetch Jetpack connection and auth info when Jetpack is selected

* Add changelog

* Use pre-exisiting hasJetpackSelected cond
2023-06-26 17:30:46 -07:00
Chi-Hsuan Huang 5fb8183682
Fix Core Profiler UI issues (#38872)
* Fix overlapping button position when the height is less than 667px (iphone SE)

* Fix misaligned check icon on mobile

* Prevent the menu from closing when clicking on a selected item

* Add changelog

* Fix lint

---------

Co-authored-by: moon <moon.kyong@automattic.com>
2023-06-22 20:54:14 -07:00
Moon 30ea01c047
Refresh onboarding profile values on the Homescreen (#38861)
* Use window.location.href for redirection to refresh the page to get the latest onboarding profile values

* Add changelog

* Remove unused import
2023-06-21 22:40:42 -07:00
Moon bc827cf16b
Update/38743 loading changes in core profiler (#38750)
* Skip teh plugin page when all the plugins are activated

* Fix the if statement so that stageIndex becomes 2 when progress is over 60

* Add a 2nd loader stage for the skipped guided setup

* Add changelog

* Lint fix -- css

* fix: banished core profiler page spinners

* addressed pr comments

* update jest snapshot

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-06-19 13:33:28 +08:00
Moon cea0bc143c
Decode HTML entities from store name (#38791)
* Decode store name with HTML entities

* Add changelog
2023-06-18 21:58:16 -07:00
Moon 00e4e94c89
Change select option hover color on core profiler pages (#38724)
* Use theme color for the option hover

* Add Changelog

* Remvoe absolute position -- can't predict correct value for bottom

* Fix css lint error

* Fix button width

* Use gray-0 for dropdown item hover color

* Fix border style for Give your store a name field

* Fix hover color for the platform options

* Remove light color on hover

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-19 11:03:55 +08:00
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
Ilyas Foo 1e72bb0401
Allow `plugins_page_skipped` parameter in Onboarding API endpoint (#38764)
* Append plugins_page_skipped parameter to onboarding API

* Changelog

* Rename property to is_plugins_page_skipped and fixed tests

* Changelog

* Fix lint
2023-06-16 18:06:58 +08:00
Moon 1a42094e5e
Fix Jetpack redirection issue when the auth endpoint returns an invalid url (#38760)
* Return full response from getJetpackAuth

* Add success and errors

* Redirect to Home in case of an error from getJetpackAuth endpoint

* Add changelog

* Use redirectToJetpackAuthPage

* Replace window.location.href with navigateTo

* Fix type issue with getJetpackAuthUrl

* Update plugins/woocommerce-admin/client/core-profiler/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-06-16 00:56:30 -07:00
Moon 630faadb81
Update/implement connect to jetpack (#38674)
* Add install-and-activate-plugins-async action to onboarding

* Add label and learn_more_link types

* Use label and learn_more_link

* Remove unused imports

* ts fixes

* Visual changes on the plugin page

* Change CTA font size from 13px to 14px
* Change spacing between the chebox and logo to 24px
* Change heading font-weight to 500

* Fix css lint error

* Add back learn more link that was removed from rebase

* Add required packages

* Load Jetpack Config

* Add getJetpackAuthUrl to data/onboarding

* Add Connection Rest Auth -- seems like this is required for Jetpack to communicate back to the connected site

* Add jetpack-authorization-url REST API

* Redirect to Jetpack Auth page after the installatino process if jetpack was selected

* Require can_install_plugins permission for jetpack auth url endpoint

* Update packages/js/data/src/onboarding/resolvers.ts

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce/src/Admin/API/OnboardingPlugins.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Remove automattic/jetpack-sync and its config

* Support redirect_url and from params

* Do not redirect to Jetpack auth if it is already connected

* Add installed_ext_success=1

* Use woocommerce-core-profiler for from value

* Revert unrelated lock file changes

* Minor refactor

* Extracted out isJetpackConnected cond to a guard

* Added meta data for isJetpackConnected to prevent unwanted spinner

* Add Changelog

* Lint fix

* Move Jetpack Connection config init to class-woocommerce

* Add changelog

* Remove unnecessary require

* Note jetpack-authorization-url endpoint is experimental

* Fix broken test

* Add component to sendToJetPackAuthPage state

* Fix lint error

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-15 20:28:18 -07:00
Moon d51f69d2d7
Update track name prefix for core profiler (#38710)
* Use coreprofiler_ prefix

* Add Changelog

* Track name changes

* Rename intro_optin to intro_opt_in

* Extracted out recordFailedPluginInstallations and recordSuccessfulPluginInstallation to tracks

* Fix js lint error -- remove unused import
2023-06-15 13:37:14 -07:00
RJ 723c68e240
fix: core profiler plugins list race condition (#38732) 2023-06-15 12:45:54 -07:00
Moon e50fb51b26
Set skipped flag when guided setup is skipped (#38730)
* Set woocommerce_onboarding_profile.skipped when guided setup is skipped

* Add Changelog
2023-06-14 21:12:03 -07: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
Moon 620ff93e5a
Additional changes for the core profiler plugins page (#38616)
* Add install-and-activate-plugins-async action to onboarding

* Add label and learn_more_link types

* Use label and learn_more_link

* Fix type

* Add changelog

* Add changelog

* Add install_priority -- this will be used in the core profiler

* Sort selected plugins by install_priority for installation

* Remove unused imports

* dev: refactor installAndActivatePlugins to xstate

* ts fixes

* Sort plugins by install_priority

* Make sure WooCommerce Shipping is always visible

* Update free extension list content

* Updated WC payment description
* Updated logo images

* Visual changes on the plugin page

* Change CTA font size from 13px to 14px
* Change spacing between the chebox and logo to 24px
* Change heading font-weight to 500

* Fix css lint error

* Fix gray-900 variable name

* Hide learn more link on mobile view

* Add back learn more link that was removed from rebase

* Send pluginsAvailable to pluginInstallermachine

* Use is_activated to determine plugin availability and install status

* Update packages/js/data/src/onboarding/types.ts

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Add back recordTracksPluginsLearnMoreLinkClicked

* Use install-and-activate-plugins-async when timer is up

* Record plugin and link with learn more linked clicked event

* Fix failign tests

* Add comment for install_priority

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-13 15:03:03 -07:00
RJ 622711c48b
dev: refactor installAndActivatePlugins to xstate (#38577)
* dev: refactor installAndActivatePlugins to xstate

* ts fixes

* fixed first plugin install progress bar reset issue

* clean up todo comments

* fixed bug where errors were not reported if past 30s timeout

* fix lint
2023-06-09 15:08:45 +08:00
RJ 5c4746cefc
add: core profiler url routing (#38620)
* added url routing

* fixed tests and changelog
2023-06-08 12:52:22 +08:00
RJ 1b1f86066f
dev: refactor core profiler pages (#38606)
* dev: refactor core-profiler - modularise each page

- wrapped each page's pre, post, and main states into their top level states for tidiness
- tagged them with id so that we can easily jump to them when doing routing
- generalised component finder code such that it recursively traverses the state meta object until it finds a component key
- fixed css label to use top level state key

* moved initializing into introOptIn so it's not a special case by itself
2023-06-07 11:39:38 +08:00
RJ e1bdd2f73b
dev: refactor core profiler tracks actions (#38603)
* dev: refactor core-profiler - consolidate tracks

* dev: refactor core-profiler - moved tracks out

* dev: moved tracks up one level

* dev: fixed spawn warning

- caused by this xstate bug https://github.com/statelyai/xstate/issues/1429

* dev: standardised ctx -> context
2023-06-06 15:20:34 +08:00
Chris Runnells 3ae3a0df8d Lint fixes 2023-06-02 15:08:33 -10:00
Chris Runnells 3082b21b1e Added ProfileSpinner component to display when Core Profiler assets are loading 2023-06-02 14:27:17 -10:00
Sam Seay b076a7b521
Fix linter issues and update Syncpack (#38523) 2023-05-31 11:45:10 +12:00
RJ ab18828e84
add: core profiler business info page (#38412)
* add: core profiler business info page
2023-05-30 15:05:38 +08:00