woocommerce-android
woocommerce-android copied to clipboard
[Login] List non-Woo stores in the site picker to allow installing Woo
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
- Make sure one or more sites connected to your account don't have Woo.
- Open the app, and sign in using your WordPress.com account.
- In the site, confirm that the list is grouped to two sections: one for Woo stores, and one for other sites.
- Click on one of the other sites.
- Confirm the app opens the "Woo not found" error screen.
- Click on "Install Woo"
- 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.txtif necessary.
You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:
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.
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.
| Warnings | |
|---|---|
| :warning: | PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible. |
Generated by :no_entry_sign: dangerJS