-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable notifications on WP app in migration flow on JP app #17513
Disable notifications on WP app in migration flow on JP app #17513
Conversation
Disable notifications on WP app while in the migration flow to JP app
📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17513-36a6fd2.apk
|
📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17513-36a6fd2.apk
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for adding a notice for reappearing migration screens and saving me from investigating it. 😅
We disable WP notifs after tapping the continue button on the Notifications screen. But the message is telling "We've disabled notifications for the WordPress app."
I think the better place to trigger disabling WP notifs would be tryMigration()
, just before postNotificationsState()
. Wdyt?
...s/src/main/java/org/wordpress/android/ui/main/jetpack/migration/JetpackMigrationViewModel.kt
Outdated
Show resolved
Hide resolved
Good point! However, probably better to update the copy on Notifications screen to read "We're going to disable notifications for the WordPress app." @ovitrif Wdyt? |
Hey @ravishanker & @irfano 👋 @osullivanchris Wdyt? The question was raised since we actually disable the WP notifications from the JP app on the moment users tap
Personally I don't have a strong opinion about this, for the reason mentioned above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @ravishanker!
I've left a comment for updating the changes to be aligned with the PR integrating the data layer with the UI.
After applying this change and using the setup steps from that PR, the migration flow works as expected and the notifications are disabled in the WP app. The migration flow is also showing only once now.
The setup is a bit different:
- These flags should be enabled in
build.gradle
for both apps:
buildConfigField "boolean", "JETPACK_POWERED_BOTTOM_SHEET", "true"
buildConfigField "boolean", "JETPACK_SHARED_LOGIN", "true"
buildConfigField "boolean", "JETPACK_LOCAL_USER_FLAGS", "true"
buildConfigField "boolean", "JETPACK_BLOGGING_REMINDERS_SYNC", "true"
buildConfigField "boolean", "JETPACK_READER_SAVED_POSTS", "true"
buildConfigField "boolean", "JETPACK_PROVIDER_SYNC", "true"
buildConfigField "boolean", "JETPACK_MIGRATION_FLOW", "true"
as well as the one for this PR:
buildConfigField "boolean", "PREVENT_DUPLICATE_NOTIFS_REMOTE_FIELD", "true"
⬆️ This one is also mentioned in the testing steps.
- ➕ very important also, local changes should be done in the WP app (edit a post and go back)
P.S. Imho the messaging for disabling notifications is acceptable (see other comment).
...s/src/main/java/org/wordpress/android/ui/main/jetpack/migration/JetpackMigrationViewModel.kt
Outdated
Show resolved
Hide resolved
I share your opinion, @ovitrif. I see the Notifications screen as an informative screen. It doesn't make a difference from the user's perspective. Because notifications will be disabled in any way and they can't control it. But I think disabling notifications should be a part of the migration process, on the screen with a loading indicator over the site list. I can think the only way could be killing the app on the Notifications screen and relaunching it. Can users skip the Notifications screen in that case, @ovitrif? |
That's a valid point @irfano , especially considering the next remark, which would work as you described.
You're right about this, if the user kills the app on the Notifications screen, they'll end up on the Considering this I agree your suggested change should be applied in this PR. @ravishanker Does that sounds good? |
As you say @ovitrif I don't think it makes a big difference. But I'd lean towards this. Its accurate information about the current state and what is about to happen. It's possible the user could kill the app or lose network connection before hitting 'Continue'. And then the notifications would not have already been disabled as we stated. I might tweak the copy to say:
I know there was more discussion after your question. So I hope the question I've answered is still relevant/ up-to-date! |
Generated by 🚫 dangerJS |
Thank you all for jumping into this. I've made the following updates
I noticed that setting buildConfigField to true is not working, I had to manually set all these flags to true through debug settings. |
My comment was misleading, really sorry for that @ravishanker. If ok I'll do some small changes to be able to merge this PR today:
|
Interesting note, thank you for mentioning this @ravishanker 🙇 . Definitely worth double checking in preparation for launching the Jetpack Content Migration flow 🙇 , we've added a task for this. |
…tpack-app # Conflicts: # WordPress/src/test/java/org/wordpress/android/ui/main/jetpack/migration/JetpackMigrationViewModelTest.kt
4a06cc9
to
36a6fd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your changes LGTM, @ovitrif! Thank you for helping us to merge this today.
The message on the notifications screen is also updated. All looks good. 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the change for the notifications continue
event 🎉
Disable notifications on WP app while in the migration flow to JP app
References:
To test:
Test 1:
Test 2:
On Jetpack app
Me
→App Settings
→Debug Settings
JetpackMigrationFlowFeatureConfig
prevent_duplicate_notifs_remote_field
Continue
button on the "Welcome to Jetpack!" screenIntent { act=org.wordpress.android.broadcast.DISABLE_NOTIFICATIONS pkg=org.wordpress.android.prealpha }
is fired in Logcat in ASOn WordPress app
Test 3
Regression Notes
Potential unintended areas of impact
None
What I did to test those areas of impact (or what existing automated tests I relied on)
Tested manually
What automated tests I added (or what prevented me from doing so)
Existing unit tests
PR submission checklist:
RELEASE-NOTES.txt
if necessary.