-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix unread marker disappearing when the report action is deleted #45797
Conversation
Simplifies logic and fixes the unread marker disappearing when someone else in the chat deletes the currentUnreadMarker report action
1. user opens read report 2. views newest messages 3. new messages are received and shown as read 4. user scrolls up above the threshold 5. new messages are received and marked as unread
This reverts commit 6804e2c.
There are some issues with marking the report as read
|
This reverts commit 7686b78.
fixes an issue where userActiveSince is set to null and then never set again
Alright I've fixed the last issue I mentioned. This is testing pretty well however a jest test is failing:
This scenario (opening an unread chat and the report being marked read in the LHN) is working correctly in my testing so I think we just need to update/rewrite this test |
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@allroundexperts can you review and test? If everything looks good on your end, I'll go ahead and rewrite the jest test to get it fixed since it doesn't seem to be accurate anymore. Please be thorough with your test too. Let's try to get this one through without any regressions 🙏 |
Hi @arosiclair! |
@ikevin127 will take this one over. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Reviewer Checklist
Screenshots/VideosAndroid: Native1. Actively reading new messages android.mov2. Viewing the chat above the new messages threshold android.mov3. Receiving new messages while viewing another chat android.mov4. Unread marker still shows after deleting the message below it android.movAndroid: mWeb ChromeiOS: Native1. Actively reading new messages ios.mov2. Viewing the chat above the new messages threshold ios.mov3. Receiving new messages while viewing another chat ios.mov4. Unread marker still shows after deleting the message below it ios.moviOS: mWeb Safari1. Actively reading new messages ios-mweb.mov2. Viewing the chat above the new messages threshold ios-mweb.mov3. Receiving new messages while viewing another chat ios-mweb.mov4. Unread marker still shows after deleting the message below it ios-mweb.movMacOS: Chrome / Safari1. Actively reading new messages web-1.mov2. Viewing the chat above the new messages threshold web-2.mov3. Receiving new messages while viewing another chat web-3.mov4. Unread marker still shows after deleting the message below it web-4.movMacOS: Desktop1. Actively reading new messages desktop.mov2. Viewing the chat above the new messages threshold desktop.mov3. Receiving new messages while viewing another chat desktop.mov4. Unread marker still shows after deleting the message below it desktop.mov |
@arosiclair LGTM 🎉 Tests well and code is clean! 🟢 I tested this thoroughly and all tests are passing, I even tested a previous regression from issue #44204 to ensure that it won't happen here! Not sure how much you tested this, as I noticed you only posted 1 screenshot for each platform which does not actually illustrate the behaviour of each test - but if you tested this thoroughly as well then we shouldn't have any issues 🤞 ✅ PR Reviewer Checklist is completed, will Approve as soon as I'm assigned as reviewer here. |
Thanks for testing @ikevin127. I added you as reviewer and I'll go ahead and update the jest test soon. |
Thanks! Let me know once the tests are fixed so I can Approve 👍 |
Alright after a second look, fixing the test required just a one line change 😄. I also had to resolve some conflicts from #46569 which included simplifying the |
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 🚀
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.
Looks great! Thanks for making the code a lot more concise/simple! 👍
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/blimpich in version: 9.0.20-0 🚀
|
FYI I believe this was deployed to prod yesterday, from this checklist - #47356 |
Details
Simplifies unread marker logic and fixes the marker disappearing when someone else in the chat deletes the report action below the unread marker.
unreadMarkerTime
unreadMarkerReportActionID
unreadMarkerTime
or report actions changeFixed Issues
$ #41935
Tests
Actively reading new messages
Viewing the chat above the new messages threshold
Receiving new messages while viewing another chat
Unread marker still shows after deleting the message below it
Offline tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop