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

Images without metadata about their dimensions cause scroll jumps #22222

Open
robintown opened this issue May 16, 2022 · 0 comments
Open

Images without metadata about their dimensions cause scroll jumps #22222

robintown opened this issue May 16, 2022 · 0 comments
Labels
A-Media A-Timeline A-Timeline-Jumpy-Scroll Stable timeline dream ✨ O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Chronic

Comments

@robintown
Copy link
Member

Steps to reproduce

  1. Receive any image event that doesn't have size metadata (lacks an info field) (some bridges do this)
  2. Watch it 'pop' into the timeline as it loads

Outcome

What did you expect?

The tile should maintain a consistent size before and after loading to avoid scroll jumps. Element Android achieves this by giving the image an arbitrary constant height, though we could also consider somehow preloading the image before paginating the event into our ScrollPanel.

What happened instead?

Because there's no way to know what dimensions the image will have before loading, it causes a layout shift. If this happens in the scrollback of a room, it will cause scroll jumps when navigating through history.

Operating system

NixOS unstable

Browser information

Firefox 100.0

URL for webapp

develop.element.io

Application version

Element version: 6c87e29-react-fcc4d62edee7-js-f44510e65f9b Olm version: 3.2.8

Homeserver

Synapse 1.58.0

Will you send logs?

No

@robintown robintown added T-Defect S-Minor Impairs non-critical functionality or suitable workarounds exist A-Timeline A-Media Z-Chronic O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Timeline-Jumpy-Scroll Stable timeline dream ✨ labels May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Media A-Timeline A-Timeline-Jumpy-Scroll Stable timeline dream ✨ O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Chronic
Projects
None yet
Development

No branches or pull requests

1 participant