Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

Part of #9785

Description

This PR adds a button to the top right of the My Store screen to let merchants share their stores.

Testing instructions

  • Log in to a store, notice that a new button for sharing store is displayed on the top right of the My Store screen.
  • Tap the share button the, the share sheet should be displayed. Notice in Xcode console: 🔵 Tracked dashboard_share_your_store_button_tapped.

Screenshots

IMG_CED2D39830E8-1


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

@itsmeichigo itsmeichigo added the type: task An internally driven task. label May 23, 2023
@itsmeichigo itsmeichigo added this to the 13.8 milestone May 23, 2023
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 23, 2023

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 pr9796-b9ddde8 on your iPhone

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

@selanthiraiyan selanthiraiyan self-assigned this May 23, 2023
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.

This works as expected. 🎉 🚢


func configureShareButton() {
// Only show share button if the site is public.
guard let site = ServiceLocator.stores.sessionManager.defaultSite, site.isPublic else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Moving this to view model will allow us to unit test this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this in 1ec15ac 👍

}

@objc
func shareStore() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This logic could be moved to view model as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also updated in 1ec15ac.

@itsmeichigo itsmeichigo enabled auto-merge May 23, 2023 10:30
@itsmeichigo itsmeichigo merged commit 610ce7d into trunk May 23, 2023
@itsmeichigo itsmeichigo deleted the feat/9785-share-store branch May 23, 2023 10:57
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