Repository navigation
feat(viewer): show a picture's blurhash, at its size, while it loads - #145
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
+ Coverage 92.34% 92.42% +0.07%
==========================================
Files 48 49 +1
Lines 4051 4103 +52
Branches 887 898 +11
==========================================
+ Hits 3741 3792 +51
- Misses 289 290 +1
Partials 21 21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
artonge
approved these changes
Oct 15, 2026
artonge
left a comment
There was a problem hiding this comment.
I don't see a call to registerDavProperty for those two props, I assume the Viewer simply uses them if it finds them?
Contributor
Author
nope, it's absolutely needed, you're right! |
A picture whose blurhash and size the server keeps (the size comes from the Photos app) shows as its blurred colours, in the box it will take, instead of a spinner alone. Its size also sets how far the picture zooms before the sharper preview has been fetched. The image handler has the Files list ask for the size, as Files asks for the blurhash. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
skjnldsv
force-pushed
the
feat/blurhash-placeholder
branch
from
October 15, 2026 14:08
1fbf0eb to
97a3cf6
Compare
skjnldsv
enabled auto-merge
October 15, 2026 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While a picture loads, the viewer shows a spinner on an empty backdrop. When the server keeps the picture's blurhash and its size, it now shows its blurred colours instead, in the box the picture will take, so nothing moves when it lands.
Relates to nextcloud/viewer#703
A blurhash says nothing of a picture's proportions, so it takes both:
metadata-blurhash, which the server generates, andmetadata-photos-size, which the Photos app records with the EXIF rotation applied. Photos nodes carry both. Files asks for the blurhash only, so the image handler has Files lists ask for the size too. Registering that property pulls the webdav client into the registration chunk until @nextcloud/files ships nextcloud-libraries/nextcloud-files#1792.The size also sets how far the picture zooms before the sharper preview has been fetched. It is only a starting point that loading can raise: Photos fills in 256×256 for a file it has not read yet.
Component tests cover the placeholder's size, the spinner alone with a blurhash but no size, and the zoom. A playground test opens
photo.jpgwith its real blurhash and size, slowed down, and checks the placeholder's proportions and that the picture lands in the same box.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.