woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

[Login] List non-Woo stores in the site picker to allow installing Woo

Open hichamboushaba opened this issue 3 years ago • 4 comments

Closes: #7129

Description

This PR updates the site picker during login to list non-woo sites, and allow installing Woo from the app, when tapping a non-woo site, the flow continues to the flow implemented in #7090.

Testing instructions

  1. Make sure one or more sites connected to your account don't have Woo.
  2. Open the app, and sign in using your WordPress.com account.
  3. In the site, confirm that the list is grouped to two sections: one for Woo stores, and one for other sites.
  4. Click on one of the other sites.
  5. Confirm the app opens the "Woo not found" error screen.
  6. Click on "Install Woo"
  7. Confirm the login continues successfully after installing Woo.

Feel free to repeat the test steps with different combinations of sites to confirm the flow works for all of them.

Images/gif

Installation Flow

https://user-images.githubusercontent.com/1657201/183702903-8cbb7677-96cf-48c3-bfc7-a8f52b2ffaa4.mov

Single connected site is non-woo
Site picker for switching store
  • [x] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

hichamboushaba avatar Aug 09 '22 16:08 hichamboushaba

You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:

wpmobilebot avatar Aug 09 '22 16:08 wpmobilebot

Great job @hichamboushaba, works well and code is super easy to follow 👏🏼

I only found one minor issue. When clicking on a "non-Woo" site we are updating the Fragment's state to show "Install WooCommerce" screen but we don't provide "onBack pressed" navigation from this state. There's an option to do that by clicking on "View connected stores" link but it would be nice to have "back navigation" too.

https://user-images.githubusercontent.com/2663464/183943598-674be675-6dc1-4522-ace5-33339e98d485.mp4

I'll approve the PR anyway as it is a minor thing and we already provide an option to go back for that UI state.

JorgeMucientes avatar Aug 10 '22 15:08 JorgeMucientes

Thanks for the review @JorgeMucientes

I only found one minor issue. When clicking on a "non-Woo" site we are updating the Fragment's state to show "Install WooCommerce" screen but we don't provide "onBack pressed" navigation from this state. There's an option to do that by clicking on "View connected stores" link but it would be nice to have "back navigation" too.

I agree, it would be a nice improvement, but I think this is not straightforward to implement in the current state of the code, but I'll investigate it next week.

hichamboushaba avatar Aug 10 '22 19:08 hichamboushaba

Warnings
:warning: PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by :no_entry_sign: dangerJS

peril-woocommerce[bot] avatar Aug 10 '22 20:08 peril-woocommerce[bot]