tigase/beagle-im

non-smooth scrolling

free-electrician opened this issue · 4 comments

Scrolling down in the conversation view is not smooth, sometimes several lines are skipped at once.

To Reproduce
Steps to reproduce the behavior:

  1. Join an active channel from https://search.jabber.network
  2. Select another room or contact in the conversations list
  3. Wait for the unread messages number to pile-up to a couple hundred messages
  4. Select the room in the conversations list again
  5. Slowly scroll down and observe occasional jumpy, non-smooth scrolling

Expected behavior
Scrolling should always be smooth

Desktop:

  • OS: macOS
  • Version 11

Scrolling will never be smooth as during scrolling data is loaded (ie. preview for links) and then the view is updated. The size of the preview can be determined only after the linked site is fetched and that is done when you actually are about to see the message containing the link.

This is done this way to not fetch all links at once when message history is fetched (especially if someone may decide not to look at links at all).

The same goes for attachments.

However, the root cause of that is Apple AppKit (framework for UI on macOS) which decides that if the size of a message in the conversation log changes, then it doesn't keep the correct location on the screen during scrolling.

We have planned to switch from AppKit to SwiftUI in future versions and that may change this behavior. Due that and the fact that is it "inconvenience" and not critical issue, this will not be worked on currently.

Thank you for your answer. Is it possible to somehow mitigate this inconvenience? It still happens when link previews and attachments are disabled.

It still will be happening if you have messages which are multiline (the text of the message is wrapped). That is also causing resizing of the message just before it is displayed causing scrolling issues.

And there is no solution for that.