Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Dec 28, 2022

Part of #8377

Description

This PR only includes the UI part, as the API is still WIP (p1670825052838929/1670823717.177509-slack-C01SFMVEYAK). The profiler question is only shown behind a new feature flag storeCreationM3Profiler, and the selected option isn't shown in the store summary screen so the value doesn't need to be passed to subsequent view controllers.

After the main question about the selling status in #8481, this PR implemented the follow-up question on the eCommerce platforms for merchants who indicate that they're already selling online. A new SwiftUI StoreCreationSellingPlatformsQuestionView was created for the platforms question. The first selling status question view StoreCreationSellingStatusQuestionView was refactored to just contain the selling status question content, and a new container view StoreCreationSellingStatusQuestionContainerView was created to show either the platforms question or the selling status question based on the view model's isAlreadySellingOnline boolean.

Another navigation implementation I tried

First I tried navigating to the platforms question view from the main selling status question view using LazyNavigationLink/NavigationLink, but a new issue on the navigation bar background appeared. The background color of the navigation bar is set to the default color instead of the custom transparent color set in the hosting controller. The API to configure the navigation bar color in SwiftUI is only available in iOS 16+, while our app still supports iOS 15.

Testing instructions

  • Log in if needed
  • Go to the Menu tab, and tap Switch store
  • On the store picker, tap + Add a store
  • Tap Create a new store --> the store name form should be shown
  • Enter a store name and continue
  • On the store category screen, choose an option and continue or skip --> the selling status profiler question should be shown
  • Tap Skip --> the domain selector should be shown
  • Go back to the previous screen
  • Select an option that's not "I'm already selling online" and tap Continue --> the domain selector should be shown
  • Go back to the previous screen
  • Select the option "I'm already selling online" --> a list of eCommerce platforms should be shown for selection
  • Select one or multiple platforms --> the platforms should be in the selected state
  • Select the same platform again --> the platform should be deselected
  • Tap Continue --> the domain selector should be shown

Screenshots

dark light
Simulator Screen Shot - iPhone 14 Pro - 2022-12-28 at 13 43 12 Simulator Screen Shot - iPhone 14 Pro - 2022-12-28 at 13 43 33

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@jaclync jaclync added the type: task An internally driven task. label Dec 28, 2022
@jaclync jaclync added this to the 11.8 milestone Dec 28, 2022
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Dec 28, 2022

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8497-153cb15 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@selanthiraiyan selanthiraiyan self-assigned this Dec 28, 2022
Copy link
Contributor

@selanthiraiyan selanthiraiyan left a comment

Choose a reason for hiding this comment

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

LGTM 🚢


/// Question content.
/// TODO: 8376 - update values when API is ready.
let platforms: [Platform] = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: If we will always use all the cases from Platform we could make Platform confirm to CaseIterable and use let platforms = Platform.allCases here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great suggestion! it looks like allCases follows the order of the case declarations so that's good for the use case. updated in 153cb15

@jaclync jaclync enabled auto-merge December 29, 2022 02:29
@jaclync jaclync merged commit 43c667d into trunk Dec 29, 2022
@jaclync jaclync deleted the feat/8377-sc-selling-status-platforms branch December 29, 2022 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants