-
Notifications
You must be signed in to change notification settings - Fork 42
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
Message panel scrolls to the bottom after downloading a submitted file, possibly moving the file entry out of view #144
Comments
Bug confirmed, and yes it was surprising for it to no longer be in view once downloaded. |
Found the bug. # Completely unintuitive way to ensure the view remains scrolled to the
# bottom.
sb = self.scroll.verticalScrollBar()
sb.rangeChanged.connect(self.move_to_bottom) It must have been assumed that the conversation would only grow if new content was added, but in fact the "Download" bubble of a file differs in size from "Open" by 15 (pixels I am assuming). Therefore, it also scrolls to the bottom once the file is downloaded |
The issue also happens when there are various |
We just chatted about this in Jitsi and decided on the following Slack-like behavior:
If people think this is confusing/incorrect behavior, please comment! |
This is the behavior that I would expect as a user. Eventually there could be a way to show notifications in a popup with a go-to/ jump link that takes you to new activity if something happened outside the scope of the current view, or a recent activities view to see things like a file finishes downloading or if there are unseen messages, as discussed here: #187 |
I agree on that behavior. The simplest way to solve this issue would be to modify the current_val = self.scroll.verticalScrollBar().value()
if current_val == max_val:
self.scroll.verticalScrollBar().setValue(max_val) we would need to add some tolerance such as being within a viewport's height from the bottom: current_val = self.scroll.verticalScrollBar().value()
viewport_height = self.scroll.viewport().height()
if current_val + viewport_height > max_val:
self.scroll.verticalScrollBar().setValue(max_val) This means that the conversation would scroll to the bottom. Either this or instead storing the But this solution seem quite right and does not provide a solution to:
|
I am trying to make it in a way that can keep track of the of the last conversation item added and detect whether or not is if visible. |
If a message thread has a downloaded file at the beginning, and the user clicks Download, the message panel is redrawn once the file is downloaded and decrypted, scrolled all the way to the bottom.
If the thread is longer than can be displayed all at once, this means that the thread appears to jump down to the bottom messages, putting the file that was just downloaded out of view.
It would probably be better for the message thread to be redrawn at the same point as it was when the user clicked Download.
The text was updated successfully, but these errors were encountered: