Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Nov 17, 2022

Part of #8118

Description

This PR included just a new screen, StoreCreationSuccessView and its hosting controller, which is shown once the site becomes Atomic after a successful purchase of an eCommerce plan. I was hoping to integrate with IAP before this PR, but there is a backend issue and I haven't been able to make a successful IAP yet. In the next PR, I'm going to make a mock IAP implementation so that we can test the whole flow more easily.

The preview view is using WebView to show the given site URL, with interactions disabled. The preview CTA brings up a Safari sheet to see the site in fullscreen.

Testing instructions

Please feel free to check the SwiftUI previews, or modify the code to see this screen in action wherever there's a Site available. For example, you can replace the code in the store picker with:

        guard let url = URL(string: site.url) else {
            return
        }
        let successView = StoreCreationSuccessHostingController(siteURL: url) {}
        navigationController?.pushViewController(successView, animated: true)

Screenshots

light dark preview
Simulator Screen Shot - iPhone 13 Pro - 2022-11-17 at 14 27 48 Simulator Screen Shot - iPhone 13 Pro - 2022-11-17 at 14 28 07 Simulator Screen Shot - iPhone 13 Pro - 2022-11-17 at 14 28 20

  • 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: enhancement A request for an enhancement. label Nov 17, 2022
@jaclync jaclync added this to the 11.3 milestone Nov 17, 2022
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 17, 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 pr8141-a696db6 on your iPhone

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

@itsmeichigo itsmeichigo self-assigned this Nov 17, 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! :shipit:

@State private var isPresentingWebview: Bool = false

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Instead of using this extra VStack to wrap the ScrollView and the bottom view, you can also pin the bottom view to the bottom of the safe area like so:

ScrollView {
    // some content here...
}
.safeAreaInset(edge: .bottom) {
    // bottom view 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.

I was going to try this after reviewing your PR 😄 this works like a charm, updated in a696db6

* trunk:
  Clear products onboarding banner and resync announcements when a product is added
  Trigger add product flow for products onboarding without switching tabs
  Remove not needed functions.
  Cleanup tests for removed auth tools
  Remove unused wp-com auth tools from WebKitVC
…view by using `safeAreaInset` from CR suggestion.
@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@jaclync jaclync enabled auto-merge November 18, 2022 00:37
@jaclync jaclync merged commit 256dfe4 into trunk Nov 18, 2022
@jaclync jaclync deleted the feat/8118-store-creation-success branch November 18, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A request for an enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants