woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
257 stars 108 forks source link

Add experimental toggle for temporary point of sale entry point #12653

Closed iamgabrielma closed 1 week ago

iamgabrielma commented 1 week ago

Description

This PR adds a temporary entry point in the app for the POS feature. At the moment is simply a SwiftUI view with no content, and no ability to navigate back to the woo app via top or bottom navigation. It just to acts as a canvas for further work while further decisions are being made.

The entry point is located under Menu > Settings, and will only appear for debug builds that have the experimental toggle Point Of Sale enabled. This will also check if the current device is an iPad or iPhone and present a conditional view in each case.

Simulator Screen Recording - iPad Pro (12 9-inch) (6th generation) - 2024-05-06 at 14 01 49

Testing instructions

Release

  1. Run the app in Release configuration:
  2. Go to Menu > Settings > Experimental features > Observe that there is no toggle for Point Of Sale

Debug

  1. Run the app in Debug configuration:
  2. Go to Menu > Settings > Experimental features > Toggle Point Of Sale On
  3. Go back to menu and switch stores (switch back or not), so the settings state reloads
  4. Scroll to the Point Of Sale row. Tap.
    • On iPhone: You'll see a "Please use iPad" message that dismisses the view on tap.
    • On iPad: You'll see a WooCommerce Point Of Sale text. No navigation view or app main tab bars.
wpmobilebot commented 1 week ago

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr12653-94ce669
Version18.5
Bundle IDcom.automattic.alpha.woocommerce
Commit94ce669b8df1bea71c61818459f39c9db5fb616d
App Center BuildWooCommerce - Prototype Builds #8966

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

iamgabrielma commented 1 week ago

Thanks for the review!

During testing, I noticed that the POS menu item didn't appear right after turning on the feature switch and going back to the Menu tab. I had to switch to another tab then back to the Menu tab to see it

Yes, I found the same as well when testing, sorry I should have been clearer in the testing instructions:

  1. Go back to menu and switch stores (switch back or not), so the settings state reloads

This seems to happen for all experimental beta features that should show a new row within settings, in this case both IAP and POS toggle rows. I haven't look into it but perhaps because the app state is not refreshed properly and the rows not re-rendered with the new data just navigating to the settings view?

If we keep this entry point we can aim to resolve it sooner, for the moment I've logged it here: https://github.com/woocommerce/woocommerce-ios/issues/12660 🙇