Skip to content
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

Extra space appears when the most recent message of the chat is selected and then unselected #371

Open
MasterK0927 opened this issue Dec 26, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@MasterK0927
Copy link
Collaborator

MasterK0927 commented Dec 26, 2024

When we select a message containing media (If the message was last message in the chat) and unselect it, it introduces extra space between the input box and message.

My understanding
The scroll threshold value should reset to null when the most recent message in a chat is unselected. However, this reset is not happening, which results in extra space between the input area and the most recent message, leading to unexpected scroll behavior.

Steps to Reproduce:

  • Open a chat and scroll to the bottom.
  • Select the most recent message to set the scrollThreshold.
  • Select and Unselect the most recent message.
  • Observe the extra space between the input area and the most recent message, and note the unexpected scrolling behavior.

Operating System

  • Pop OS 24.04 (based on Ubuntu)
@MasterK0927 MasterK0927 added the bug Something isn't working label Dec 26, 2024
@mattyg
Copy link
Collaborator

mattyg commented Dec 26, 2024

I searched the codebase for "scrollThreshold" but didn't find anything. Am I missing something, or can you link to the relevant code maybe?

@MasterK0927
Copy link
Collaborator Author

Apologies for not mentioning the full term earlier—it's related to the values SCROLL_BOTTOM_THRESHOLD and SCROLL_TOP_THRESHOLD. I believe they are relevant in this context.

@MasterK0927
Copy link
Collaborator Author

For reference please see this ss below
Screenshot from 2024-12-27 03-07-19

@mattyg
Copy link
Collaborator

mattyg commented Dec 27, 2024

Interesting, I'm not able to reproduce the issue following the steps:

Kazam_screencast_00000.mp4

Can you please note your OS in the description so it will be easier to investigate when we get to it? I'd also like to request that we rename the ticket to describe the problem you're seeing. Then note potential causes in the description, rather than starting with a proposed solution.

I don't think the right solution will be to set the SCROLL_BOTTOM_THRESHOLD to 0, since it is a constant for configuring the infinite scrolling.

Infinite scrolling is fiddly to get right, so I wouldn't be surprised if there are other bugs hiding in there as well. In general I'd be in favor of swapping out our code for a 3rd party library it if we find a good one.

@MasterK0927
Copy link
Collaborator Author

Updated the operating system.

@MasterK0927 MasterK0927 changed the title Scroll threshold does not reset to null when the most recent message of the chat is unselected Extra space appears when the most recent message of the chat is selected and then unselected Dec 29, 2024
@mattyg mattyg moved this to Backlog in Volla Messages Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants