Skip to content

Conversation

@0nko
Copy link
Contributor

@0nko 0nko commented May 23, 2023

Fixes #9088, a subtask of #8999.

This PR schedules a notification 24 hours after a store name is entered during store creation and then it's abandoned without completion. When the notification is tapped, the store creation is restarted with the original name pre-filled.

device-2023-05-24-010103.webm

To test:

Test 1

  1. From a logged-out state, tap on Get Started CTA and begin the store creation process
  2. When you enter the store name and tap Continue, minimize the app
  3. Wait for 24 hours
  4. Verify that a notification is displayed
  5. Tap on it
  6. Verify that the store name picker is shown with the original name pre-filled
  7. Tap on the back button and make sure the back stack is looking normal (no duplicates or anything weird)

Test 2

  1. Log in
  2. Go to More menu -> Settings -> Site picker
  3. Repeat steps 1-7 from Test 1
  4. Verify that everything is working

Note
If you want to make the testing go quicker, you can change the notification units to seconds here. 🙂

@0nko 0nko added the feature: notifications Related to notifications or notifs. label May 23, 2023
@0nko 0nko added this to the 13.8 milestone May 23, 2023
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 23, 2023

You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:

@hafizrahman hafizrahman self-assigned this May 24, 2023
}

// No need to display a notification to complete store creation anymore
localNotificationScheduler.cancelScheduledNotification(STORE_CREATION_INCOMPLETE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome that you realized this use case!

observeBottomBarState()
}

private fun shortcutOpenStoreCreation(storeName: String?) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: maybe rename to openShortcutToStoreCreation() to follow "use verb for function name".

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed that there's already existing functions that use the same shortcutXXX() pattern, so feel free to ignore the above to keep with the pattern instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I just copied what was already there, otherwise I'd agree 💯

Copy link
Contributor

@hafizrahman hafizrahman 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 well in my test. Awesome work! I checked the commit one by one to get a better understanding how setting up a scheduled local notification will work, and things look good to me.

I left a non-blocking comment so feel free to merge after reading that and fixing conflicts.

Base automatically changed from issue/9060-store-ready-notification to trunk May 24, 2023 10:15
@0nko
Copy link
Contributor Author

0nko commented May 24, 2023

Thanks @hafizrahman!

@0nko 0nko enabled auto-merge May 24, 2023 10:39
@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
Messages
📖

This PR contains changes to Tracks-related logic. Please ensure the following are completed:
PR Author

  • The PR must be assigned the Tracks label
    PR Reviewer
  • The tracks events must be validated in the Tracks system.
  • Verify the internal tracks spreadsheet has also been updated.

Generated by 🚫 dangerJS

@0nko 0nko merged commit 3554d14 into trunk May 24, 2023
@0nko 0nko deleted the issue/9088-store-creation-incomplete branch May 24, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: notifications Related to notifications or notifs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send a scheduled notification after 24hrs to those users that entered store name but did not subscribe to the free trial.

4 participants