-
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
[$250][HOLD #49825][HOLD #49824] Chat - Chat is not autoscrolled to the bottom when receiving whisper after a mention #49599
Comments
Triggered auto assignment to @RachCHopkins ( |
@RachCHopkins 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/~021838383119719075523 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
Edited by proposal-police: This proposal was edited at 2024-09-27 08:30:08 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.When a whisper is received in the chat for the current user the screen is not scrolled down and the whisper is not visible until the user decides to scroll down. What is the root cause of that problem?The cause of the issue seems to be an intented behaviour in the logic of the scrolling for new actions. The current logic scrolls the user to the bottom if the action is from the current user, all other cases no scrolling is done. This logic is in
What changes do you think we should make in order to solve the problem?We have a few options depending on how the scrolling is intented to behave;
We need to change the approach to check the latest action in the chat and check if that is a whisper for the current user or not by changing this existing useEffect to this:
In addition we need to fix how the What alternative solutions did you explore? (Optional) |
@klajdipaja is correct – this looks intentional at the moment. However, it seems reasonable to also enable auto-scroll on the whispers as they are system messages addressed directly to the user and often require some action/attention. 🎀👀🎀 C+ reviewed to summon an Engineer for decision. |
Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @klajdipaja 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Agreed, lets got with solution 2 outlined in the proposal. If possible, can we reach out the engineers who implemented this code originally to make sure they're aware of the changes we're making? |
…e current user is received in the chat
@marcaaron @Julesssss I see you were involved in #536, where this comment appeared for the first time:
Just a heads-up: we plan to add auto-scroll to the bottom when the user receives a whisper message. 2024-09-25.-.12.37.-.Screen.Recording.2024-09-25.at.12.36.44.mp4 |
…e current user is received in the chat
@paultsimura While testing my changes in android emulator I found out that there's an issue with my proposal. When the internet or device is really slow I saw that the scrolling does not happen.
This is testing really well, you can check this out in this branch and let me know what you think |
@klajdipaja please make a draft PR and tag me there. It's easier to work with |
I've played with these Duplicating the bugs here for clarity: Bug 1:
Expected: The report is scrolled to the bottom so the whisper action becomes visible. Bug 2:
Expected: The "New messages" floating button should not appear as there is no new message
Expected: The report's last message in LHN should remain 2024-09-25.-.19.11.-.Screen.Recording.2024-09-25.at.19.10.18.mp4 |
@paultsimura did you check those with the draft PR #49699 I created? I have a feeling it will solve both issues but haven't had the time to double check |
@klajdipaja no it doesn't fix those. From what I see, is doesn't fix the current one either. |
Will do! Still confirming expected behavior - whispers are weird, haha |
I have a potential fix up, will fully test tomorrow and then hopefully have it up for review! It'll actually be a separate fix from that other issue, but that's okay. |
How this going @dangrous? |
Backend is in review! Should hopefully be merged soon and then we can move forward here |
This should hopefully be fixed on the backend. Can we retest and figure out if anything else is needed? |
@dangrous something's different now (some cases were fixed I believe), but the issue is still reproducible (recording from staging): 2024-11-14.-.22.42.-.Screen.Recording.2024-11-14.at.22.42.07.mp4 |
IMO, we should remove |
Also @dangrous could you please check this? Looks like another BE issue:
I'm unsure what is expected here: to have a whisper for each message or the last one only. But this is inconsistent. 2024-11-14.-.22.56.-.Screen.Recording.2024-11-14.at.22.56.19.mp4 |
so for the first one I think that might be expected? What's the behavior if someone sends a regular message when you're scrolled up in the chat, like you are? I don't think you should be rescrolled to the bottom, right? For the second one - is that new behavior, or was it like that before too? It definitely seems weird to have them all pop back up like that - but I'm not sure why they disappeared in the first place. This would probably be an edge case since you'd be unlikely to keep inviting the same person over and over again like that, but still worth looking into. Is it the front end that's removing the previous whispers (maybe optimistically?) or the backend? |
You're right 👍 This GH seems to be resolved now. How do we act if the Contributor has already been hired here but the PR has not been opened because we had to hold? Do we just close the issue? |
Apparently, we had a GH for it that got closed due to being a non-priority. You could take a look there, it was diagnosed as a BE issue: #47255 |
Okay great, then I think we're good to close this! Since no PR raised, I don't think we need payment here but if anyone disagrees let me know. Thanks! |
@dangrous @paultsimura what should be done with the Upwork contract in this case? |
@klajdipaja we can just close it by ourselves. Specify "the work is no longer needed" as the reason. |
actually, I've been informed that we pay 50% in this case (contributor hired but no PR needed)! @RachCHopkins can you help us out? |
Payment Summary:
Upwork job here |
Thanks. |
I think we can pay whenever, since it was only backend we're not waiting on a regression period cc @RachCHopkins |
@paultsimura it's ASAP! I'm just getting my ducks in a row! 🦆 🦆🦆 |
Contributors have been paid, the contracts have been completed, and the Upwork post has been closed. |
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: 9.0.39.0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
After mentioning another user that is not part of the chat, a whisper with options should be received, and the chat should be autoscrolled to the bottom
Actual Result:
When the whisper is received, after mentioning an user that is not part of the room, the chat is not autoscrolled to the bottom
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6612450_1727095488272.Whisper_Scroll.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dangrousThe text was updated successfully, but these errors were encountered: