-
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
🤖 Bring the user straight to the comments reader view #20186
🤖 Bring the user straight to the comments reader view #20186
Conversation
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feature/notifications_refresh_p1 #20186 +/- ##
====================================================================
+ Coverage 40.11% 40.14% +0.02%
====================================================================
Files 1469 1469
Lines 67755 67782 +27
Branches 11226 11230 +4
====================================================================
+ Hits 27179 27209 +30
+ Misses 38082 38078 -4
- Partials 2494 2495 +1 ☔ View full report in Codecov by Sentry. |
...Press/src/test/java/org/wordpress/android/ui/notifications/NotificationsListViewModelTest.kt
Outdated
Show resolved
Hide resolved
…CommentInTheReader # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListFragmentPage.kt # WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListViewModel.kt
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 for making the change! Code looks good.
A. Non-admin user
I found the behavior is different when I clicked on the system notification and the item in the notification tab.
From system notification | From notification tab |
---|---|
B. Admin user
The behaviors are the same as expected.
From system notification | From notification tab |
---|---|
WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListViewModel.kt
Show resolved
Hide resolved
Thank you both for testing 🙇
Good catch @jarvislin 👍
Thank you for reporting @mkevins 🙇 |
NotificationsListFragment | ||
.openNoteForReply(this, noteId, shouldShowKeyboard, null, | ||
NotesAdapter.FILTERS.FILTER_ALL, true); | ||
if (mNotificationsViewModel == null) { |
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.
I've added the initialisation here since the initViewModel()
has not been called in this flow
Thanks again for catching this @jarvislin 🙇
I've cover this case with d089b05 |
@mkevins I've run into the loading state (with flow B) but wasn't able to reproduce the stuck state. I also tried disabling the network after receiving the notification but in this case the notifications disappear on my device and I'm not able to continue the flow. Screen_recording_20240216_101936.mp4
What Android version are you running? Any special setup in your network? |
…CommentInTheReader # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/notifications/NotificationsListViewModel.kt
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.
I've cover this case with d089b05
I don't like the way this is structured much and I'll examine a possible refactoring in a follow up PR.
The test result is as expected, LGTM!
Fixes #20096
Description
This PR navigates non-admin users that cannot moderate a comment directly to the comments reader view
To Test:
A. Non-admin user
B. Admin user ( Regression )
C. Push notifications
Repeat (A) and (B) above by tapping on the system push notification
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
NotificationsListViewModelTest
with the logic for opening the comment in the readerPR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist: