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

fix(files): Add proper visual loading feedback for image preview #45431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented May 21, 2024

Summary

Currently only a white square is shown while loading the icon, this add a loading indicator.
(Especially the previous one had a short flash when both the background and icon are shown at the same time).

Screen recording

Before

before.mp4

After

after.mp4

Checklist

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux added design Design, UI, UX, etc. 3. to review Waiting for reviews feature: files labels May 21, 2024
@susnux susnux requested a review from skjnldsv as a code owner May 21, 2024 21:28
@skjnldsv
Copy link
Member

Currently only a white square is shown while loading the icon, this add a loading indicator.
(Especially the previous one had a short flash when both the background and icon are shown at the same time).

This is supposed to be a placeholder.
Somehow it's disabled

// animation: preview-gradient-fade 1.2s ease-in-out infinite;

Imho, loading spinners are good for individual element loading.
For a lot of them (like here, in a list), it's distracting and a loading placeholder is what should be used (we do it in many other places)

@skjnldsv
Copy link
Member

skjnldsv commented May 22, 2024

Peek 22-05-2024 08-33

How t was supposed to look like
I think I forgot to re-enable it after 014a57e#diff-13362ff2e0fefd60f2365d996fe145183e796ed346aeb8c28421a44c720dfeba

Copy link
Member

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of the two, I think that the loading spinner looks nicer and is just as clear

@susnux
Copy link
Contributor Author

susnux commented May 22, 2024

Makes sense, like a loading skeleton.

So I am fine with whatever the @nextcloud/designers prefer :)

@skjnldsv
Copy link
Member

Out of the two, I think that the loading spinner looks nicer and is just as clear

For the record, my point is not about if it's clearer or not, but the fact that 20 spinners shown drag too much attention for very little value (it's just a preview) :)

Anyway, as Ferdinand said: I am fine with whatever the @nextcloud/designers prefer 😉

@marcoambrosini
Copy link
Member

marcoambrosini commented May 22, 2024

The gif you posted @skjnldsv seem to draw more attention than the little spinner in @susnux video. But I'm fine either way tbh :)

@nimishavijay
Copy link
Member

For a lot of them (like here, in a list), it's distracting and a loading placeholder is what should be used (we do it in many other places)

I would agree here, the square being distracting is rather a result of the color of the skeleton screen component being too light in dark mode IMO, so darkening the color of the squares would already make it look less busy. What do you think?

@skjnldsv
Copy link
Member

darkening the color of the squares would already make it look less busy. What do you think?

Seconded 👍

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice with the skeleton squares, and agree with the feedback of adjusting the color a bit (lightening/darkening).

An additional thing: When it’s a file which does not have a preview, like a PDF for example – why don’t we just instantly show the PDF filetype icon?

@skjnldsv
Copy link
Member

An additional thing: When it’s a file which does not have a preview, like a PDF for example – why don’t we just instantly show the PDF filetype icon?

Because we don't always know if there is a preview. It can be available but not generated.
There is a ticket somewhere to have a property saying if the preview for thie mime is enabled or not, that's a different approach

@jancborchardt
Copy link
Member

Because we don't always know if there is a preview. It can be available but not generated.

Right, so what I’m saying is that we can show the filetype icon instantly. Preview could be shown as soon as available. That makes things feel more instant instead of having loading bars/skeletons here.

@solracsf solracsf added this to the Nextcloud 30 milestone Jun 18, 2024
This was referenced Jul 30, 2024
This was referenced Aug 5, 2024
@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc. feature: files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants