element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
426 stars 105 forks source link

Scroll jumps during backpagination #2877

Open ara4n opened 5 months ago

ara4n commented 5 months ago

Steps to reproduce

  1. Scroll backwards
  2. Run out of scrollback and view a spinner while backpaginating from the server
  3. Observe that when the spinner disappears the gap suddenly pops out of existence, causing a scroll jump
  4. Observe that if you are transitioning into a bubble continuation (ie the topmost bubble becomes a continuation), the sender profile needs to be animated away. This also seems to cause a jump rather than being a smooth transition.

Look frame by frame:

https://github.com/element-hq/element-x-ios/assets/1294269/1457c096-03f5-4ed9-be6a-1b1aa55cf417

Critically: the position of the topmost bubble should remain constant on the screen during pagination, even if the sender gets removed, the loading spinner gets removed, and new scrollback get loaded. Otherwise it’ll be perceived as a jarring jump.

Outcome

What did you expect?

smooth scrolling

What happened instead?

scroll jumps.

@pixlwave improved this in build 604, but it’s still jumpy

Your phone model

No response

Operating system version

No response

Application version

604

Homeserver

No response

Will you send logs?

No

pixlwave commented 5 months ago

From looking at the video I would call this expected behaviour. When you're in the overscroll area, the scrollview is going to snap back to the resting position and I think it's fair to say that iOS users are happy with that behaviour.

Velin92 commented 5 months ago

Let's check with design if this behaviour is to be expected.