Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mobile app onboarding modal to be two steps #40613

Merged
merged 22 commits into from
Oct 18, 2023

Conversation

jaclync
Copy link
Contributor

@jaclync jaclync commented Oct 5, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes https://github.com/woocommerce/woomobile-private/issues/315

Example screenshots

login-link-non-jetpack-site.mov

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

TC1

Prerequisite: the site has the the full Jetpack plugin (WPCOM sites have Jetpack by default), and hasn't completed all onboarding tasks. The connected WPCOM user is not linked to an A8C email (magic links don't work for A8C emails)

  • Apply the PR changes to the site's WC plugin
  • Go to the site wp-admin
  • Go to the WooCommerce homescreen with the onboarding tasks, and tap on Get the free WooCommerce mobile app under Things to do next (wp-admin/admin.php?page=wc-admin&mobileAppModal=true)
  • Check that the modal now includes a two steps control
  • Check that the step 1 modal includes a QR code that goes to https://woocommerce.com/mobile/?utm_source=wc_onboarding_mobile_task.
  • Click on App is installed button
  • Check that step 2 contains a CTA to send a magic link email
  • Tap Send the sign-in link --> an email should be sent, and the modal should show that the email has been sent as in the screenshot

TC2

Non-Jetpack sites
Prerequisite: the site doesn't have the Jetpack plugin

  • Apply the PR changes to the site's WC plugin
  • Go to the site wp-admin
  • Go to the WooCommerce homescreen with the onboarding tasks, and tap on Get the free WooCommerce mobile app under Things to do next (wp-admin/admin.php?page=wc-admin&mobileAppModal=true)
  • Check that the modal should include a QR code that goes to https://woocommerce.com/mobile/?utm_source=wc_onboarding_mobile_task
  • Click on App is installed button
  • Check that a new QR is displayed that goes to woocommerce://app-login?siteUrl=[your url]&username=[your user name]

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Test Results Summary

Commit SHA: 21094a9

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 58s
E2E Tests212004021621m 55s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

…ing-task-iteration-2

* wcios/mobile-onboarding-task:
  Fit mobile app modal height to content with a max height that's taller than the default modal guide.
  Replace mobile static QR code SVG with `QRCodeSVG`.
  Add `qrcode.react` for a React component that displays a QR code also used in Calypso.
Base automatically changed from wcios/mobile-onboarding-task to trunk October 9, 2023 23:00
@atorresveiga atorresveiga marked this pull request as ready for review October 11, 2023 16:00
@atorresveiga atorresveiga changed the title [WIP] Update mobile app onboarding modal to be two steps Update mobile app onboarding modal to be two steps Oct 11, 2023
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Oct 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2023

Hi @rjchow,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@ThomazFB
Copy link

@rjchow @coreymckrill This is the follow-up of the previous PR regarding the onboarding banner. It's a bigger one but quite important to achieve our objectives with the app login flow. So I'm requesting the review from you both since you folks reviewed the last one. Thank you in advance 🙏

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some feedback!

}: {
loginUrl: string | undefined;
} ) => {
// TODO: update the minimum app version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😬

} else {
const siteUrl: string = getAdminSetting( 'siteUrl' );
const username = getAdminSetting( 'currentUserData' ).username;
const loginUrl = `woocommerce://app-login?siteUrl=${ encodeURIComponent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was implemented a bit differently than I had imagined, I was thinking that we could add some code to wc core that can generate the application password, which would be triggered by the user opening this task.

When this modal opens, the QR should already include the application password so that there's no further need for any credentials to be provided by the user.

Furthermore, I was thinking that there should be a deeplink that immediately brings the user to install woocommerce mobile app if they don't already have it, and then when it is installed the app should also have the application password forwarded to it. This would lead to a true seamless experience

Are these part of the future roadmap?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rjchow 👋

This was implemented a bit differently than I had imagined, I was thinking that we could add some code to wc core that can generate the application password, which would be triggered by the user opening this task.

This is iteration 2 of the improvements. We have on our radar iteration 3 https://github.com/woocommerce/woocommerce/pull/40628/files, which will include the application password and is closer to what we already discussed.

Furthermore, I was thinking that there should be a deeplink that immediately brings the user to install woocommerce mobile app if they don't already have it, and then when it is installed the app should also have the application password forwarded to it. This would lead to a true seamless experience

💯 agree with you! We are still looking at how to support deferred deep links in the app, but I agree this is the way to go

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok great to know that! Thanks!

<QRCodeSVG value={ loginUrl } size={ 140 } />
<p>
{ __(
'The app version needs to be 15.7 or above to sign in with this link.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised that I can't test this flow because the latest version I can install is 15.6

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realised that I can't test this flow because the latest version I can install is 15.6

@rjchow Can you try installing the apps from these PR? :

If you need any help, please ping me. I'll be more than happy to support you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went on with it for a bit then realised that I need to install app center device profile on my personal phone so I noped outta there 😅 I'll take it that it works!

@atorresveiga
Copy link

#40613 (comment)

😬

Fixed here a4c3834

#40613 (comment)

The height needs to be adjusted so that we don't have a scrollbar, I feel the vertical scrolling on this gives it an unpolished feel

Fixed here 2d1dec8

#40613 (comment)

if you have variant="primary" on the button props you won't have to handle the colouring - the color will automatically match the theme for the WP installation

Fixed here 6f9f49a

Thanks for your review @rjchow! I fixed all the issues. I think we are ready for a second round 😄

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, pre-emptively approving! If you need me to merge it just ping me

} else {
const siteUrl: string = getAdminSetting( 'siteUrl' );
const username = getAdminSetting( 'currentUserData' ).username;
const loginUrl = `woocommerce://app-login?siteUrl=${ encodeURIComponent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok great to know that! Thanks!

<QRCodeSVG value={ loginUrl } size={ 140 } />
<p>
{ __(
'The app version needs to be 15.7 or above to sign in with this link.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went on with it for a bit then realised that I need to install app center device profile on my personal phone so I noped outta there 😅 I'll take it that it works!

…tyle.scss

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
@atorresveiga
Copy link

Thanks for your review @rjchow!! 🙏

If you need me to merge it just ping me

Yes, that would be great. We have no permission to merge to trunk.
Could you or @coreymckrill help us merge this PR?
Thanks in advance!

@rjchow
Copy link
Contributor

rjchow commented Oct 18, 2023

This isn't one of the critical flows so I'm merging this without additional QA review

@rjchow rjchow merged commit 2c557f6 into trunk Oct 18, 2023
26 checks passed
@rjchow rjchow deleted the wcios/mobile-onboarding-task-iteration-2 branch October 18, 2023 07:22
@github-actions github-actions bot added this to the 8.3.0 milestone Oct 18, 2023
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Oct 18, 2023
@nigeljamesstevenson nigeljamesstevenson added needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants