Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Nov 14, 2022

Part of #8106
⚠️ Please only review this PR when the base PR #8107 is approved without critical suggestions

Description

After domain selection and before IAP, we need to create a free site and then pass the site ID for purchasing the eCommerce plan via IAP. This PR integrates the site creation backend and UI, where the tap to continue a selected domain triggers the site creation API request and shows a spinner in the CTA at the same time. After site creation success, StoreCreationCoordinator navigates to a new screen added in this PR, StoreCreationSummaryView, wrapped in a hosting controller. In case of site creation failure, an error alert is shown (we can polish the error state later).

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 domain selector should be shown
  • Enter some valid query for domain suggestions
  • Select a domain and tap Continue --> after a bit, the store summary screen should be shown as in the screenshots

Screenshots

I tested the domain error path by hard-coding the domain to be an empty string in the site creation request.

domain selector creating store store summary domain error
Simulator Screen Shot - iPhone 14 - 2022-11-14 at 15 03 52 Simulator Screen Shot - iPhone 14 - 2022-11-14 at 15 03 54 Simulator Screen Shot - iPhone 14 - 2022-11-14 at 15 03 59 Simulator Screen Shot - iPhone 14 - 2022-11-14 at 14 35 31

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

@jaclync jaclync added this to the 11.3 milestone Nov 14, 2022
@jaclync jaclync added type: enhancement A request for an enhancement. status: feature-flagged Behind a feature flag. Milestone is not strongly held. labels Nov 14, 2022
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 14, 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 pr8109-b0b8bf9 on your iPhone

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

Base automatically changed from feat/site-creation-foundation to trunk November 15, 2022 01:09
@itsmeichigo itsmeichigo self-assigned this Nov 15, 2022
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

}
}

required dynamic init?(coder aDecoder: NSCoder) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we can also add an @available attribute here to signal the compiler in compile-time that this initializer is not ready for use:

Suggested change
required dynamic init?(coder aDecoder: NSCoder) {
@available(*, unavailable)
required dynamic init?(coder aDecoder: NSCoder) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice, updated in b0b8bf9

@jaclync jaclync merged commit 8af7cdd into trunk Nov 15, 2022
@jaclync jaclync deleted the feat/8106-store-creation-summary branch November 15, 2022 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: feature-flagged Behind a feature flag. Milestone is not strongly held. type: enhancement A request for an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants