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

Add more blur to image previews #4102

Closed
wants to merge 1 commit into from

Conversation

nolanlawson
Copy link
Contributor

Adds more blur to the preview image so that it's clear that it's in a "loading" state, since otherwise it can be hard to tell.

Before: https://gfycat.com/VainCostlyDungenesscrab (throttled to 3G)

After: https://gfycat.com/AthleticSkeletalAlleycat (throttled to 3G)

I think it's debatable whether the entire preview system is an improvement over the browser's built-in loading of images, but personally I find it a bit jarring when an image loads from top-to-bottom, and plus not all images even have a progressive view (it depends how the JPEG is encoded, and PNGs don't have them at all). So I think the blurred approach is nice for consistency.

Fixes #4060

@nolanlawson nolanlawson requested a review from ykzts July 7, 2017 16:03
@Gargron
Copy link
Member

Gargron commented Jul 7, 2017

Could you overflow: hidden so the borders would be sharp?

@nolanlawson
Copy link
Contributor Author

Ahhh nice catch.

@nolanlawson
Copy link
Contributor Author

Hmmm oddly overflow: hidden does not result in sharp edges. border: 1px solid transparent was suggested as a workaround, but in desktop Chrome at least, that doesn't work either. I think we would need to add a container first and set its overflow to hidden. 😕

@nolanlawson
Copy link
Contributor Author

I've experimented with this and I don't think I can find a blur that I find satisfying. 10px causes the image to look inset a bit, and adding overflow: hidden even to the parent just makes this inset more obvious:

screenshot 2017-07-07 17 57 42

(Notice the weird "frame" around the preview image.)

I can't find a solution I'm happy with, so I'm going to abandon for now. Maybe a better solution would be to add opacity: 0.75 or a loading spinner or something like that?

@nolanlawson nolanlawson closed this Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants