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

Show thumbnail at main image's size in lightbox #830

Closed
gnprice opened this issue Jul 22, 2024 · 0 comments · Fixed by #833
Closed

Show thumbnail at main image's size in lightbox #830

gnprice opened this issue Jul 22, 2024 · 0 comments · Fixed by #833
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-lightbox The lightbox / image-viewer screen server-9 Things new in Zulip Server 9.0

Comments

@gnprice
Copy link
Member

gnprice commented Jul 22, 2024

With #820 (implementing #799), when you open an image in the lightbox we immediately show the thumbnail (which we'll typically already have loaded, from when you saw the preview in the message list) while we're loading the full image.

One wrinkle is that for some images this means that the thumbnail appears smaller than the full image will, so there's a pop where it expands when the fetch finishes. This is still better than not showing the image at all (at least in cases where the fetch is more than perhaps a few hundred milliseconds), which is why we do it.

But with an extra feature that's now being added in the server, we can do better: the image HTML will encode the original image's dimensions, so we can use those to make sure we show the thumbnail at the same size we'll eventually show the full image. Let's use that.

@gnprice gnprice added a-content Parsing and rendering Zulip HTML content, notably message contents a-lightbox The lightbox / image-viewer screen server-9 Things new in Zulip Server 9.0 labels Jul 22, 2024
@gnprice gnprice added this to the Beta 3: Summer 2024 milestone Jul 22, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 23, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 23, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 24, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 24, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 24, 2024
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-lightbox The lightbox / image-viewer screen server-9 Things new in Zulip Server 9.0
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant