-
Notifications
You must be signed in to change notification settings - Fork 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
[$250] Web - Chat - Message marked as new after reading it and scrolling up and down the conversation #50318
Comments
Triggered auto assignment to @lschurr ( |
@lschurr FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Job added to Upwork: https://www.upwork.com/jobs/~021843398922657090244 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Message remains marked as new after reading it by clicking on "New messages" floating button and scrolling up and down the chat conversation. What is the root cause of that problem?The first bug which is the "New messages" floating button not marking the new message as read was caused by
As for scrolling to the bottom of the message list not marking the message as read, currently, there is no logic tied to handling new messages as read in What changes do you think we should make in order to solve the problem?Explicitly dispatching Report.readNewestAction(report.reportID, true); fixes our issue for the floating button. Also, we can add a new logic to mark the unread message as read when there is an unread message and we are scrolled to the bottom of the chat. const handleUnreadReportWhenScrolledToTheBottom = () => {
if (scrollingVerticalOffset.current <= 0 && !!unreadMarkerReportActionID) {
Report.readNewestAction(report.reportID, true);
}
}
const trackVerticalScrolling = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
scrollingVerticalOffset.current = event.nativeEvent.contentOffset.y;
handleUnreadFloatingButton();
handleUnreadReportWhenScrolledToTheBottom();
onScroll?.(event);
}; test branch: shijir0927@6e13ded fixed state video: after.movWhat alternative solutions did you explore? (Optional)With more debugging, we can try to find out what state and where exactly we are ending up in this buggy situation but with bunch of different useEffects happening at the same time in this component making the event cycle pretty complex, I decided to focus on fixing the outcome rather than preventing the code to never reach this state. |
@MonilBhavsar I see you supervised #42568, which changed this floating pill behavior. Could you please double-check and confirm: do we want to reset the unread green line marker when clicking the "New messages" floating button? |
Hey! Also, in video a new marker line is created when user sends the message, which appears like a bug and could be handled in a new report and issue |
Thanks, so this one is not a bug and can be closed. cc: @lschurr |
👍 |
@MonilBhavsar I can reproduce, but you have to be quick 😄 2024-10-08.-.14.19.-.Screen.Recording.2024-10-08.at.14.18.44.mp4 |
Gotcha, thanks! |
I will 👌 |
@lschurr / @MonilBhavsar please close this issue. |
Yes, we created a new issue. So closing this one out. Thanks all! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.0.45-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5050520
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The "New" mark for the message is dismissed after reading the message and scrolling up and down the conversation.
Actual Result:
The message remains marked as new after reading it and scrolling up and down the chat conversation.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6626402_1728243616105.New_message.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @paultsimuraThe text was updated successfully, but these errors were encountered: