ebiwd / EBI-Pattern-library

Please head to the new pattern library:
http://www.ebi.ac.uk/style-lab/websites/patterns/
2 stars 2 forks source link

Loading animations and placeholders #14

Open khawkins98 opened 7 years ago

khawkins98 commented 7 years ago

Many teams across the campus have various dynamic lazy-loading content -- it can be found in search boxes (the EBI homepage) and dynamically loading pages (Angular and Handlebars).

So how can we best:

  1. indicate to users that stuff is coming,
  2. not annoy users with terrible aggressive animations, and
  3. hint at the content that is coming and make the pages feel a bit faster by teasing the content

And then once we identify a couple of major patterns, let's try and template out some reusable code for use upstream in the EBI Visual Framework.

khawkins98 commented 7 years ago

I'll kick things off.

In my view we need two "indicator" patterns:

  1. Activity indicator: A small pulse widget for search boxes, such as we have now (we could maybe polish this a bit, but in principle I think this is fine) for background tasks; and search-anim
  2. Content area indicator: When you're waiting on meaty content to load. We should give the user an idea of what content is coming and prep the layout (so that way things don't move too much after boxes populate), you'll see this on Facebook. content-loading-anim Source

If those two approaches sound reasonable, we can start looking at ways to document and template.

khawkins98 commented 7 years ago

I could also see a case for a progress bar ("Please wait while we process your request.") -- but I've yet to see this in use at EBI.

nbuso commented 7 years ago

we are implementing an AJAX interface and we 3 questions:

AntonPetrov commented 7 years ago

Showing a loading bar at the top of the page (as seen on GitHub/YouTube/Reddit) is another technique that might be useful to indicate that a request is taking a while.

For example, I use Angular Loading Bar on the RNAcentral website to show the progress of Ajax requests in keyword search.

khawkins98 commented 7 years ago

Thanks for pointing those out @AntonPetrov

loading-bar-angular

This angular loading animation could be a third loading pattern for us to add to the Pattern Library. (And it should also be familiar to many users, as it's the same pattern used on YouTube — and there are plenty of implementations: https://www.google.co.uk/search?q=youtube+page+loader )

Also saw the below use of spinners on RNAcentral:

rna-loaders

@nbuso: I think both of those patterns could well fit the EBI Search, along with a content placeholder animation for the main search results — we can obviously look a bit deeper on Thursday. If I have time, I'll mock something up as well.

khawkins98 commented 7 years ago

One other comment, mainly in @nbuso 's direction: I would say that you won't want to use more than one spinner/content placeholder animation on the page at a time.

What might work well: 1) Use the Angular progress bar OR a spinner like RNAcentral has done; and pair that with 2) Non-animated content placeholder images that tease what is coming (like the below one from Facebook)

screen shot 2016-10-21 at 10 54 38

tschaka1904 commented 7 years ago

Is there any progress on that? I think I came across a spinner, whilst clicking through one of the updated EBI pages.

I like the idea of the:

Non-animated content placeholder images that tease what is coming

LinkedIn is doing something similar.

nbuso commented 7 years ago

I ended up with progress bars from material design: https://material.io/guidelines/components/progress-activity.html

I'm using one for the global loading and one for inner components loading. But can be too messy. I like also the idea of an placeholder image, but I did not had the time of doing it and I was wondering if it can be something more dynamic than a static image (svg? text same color of the background forming the highlighting effect?). Does anyone have any reference on how to create such placeholder?

Nicola

On Tue, Mar 14, 2017 at 4:11 PM, Maximilian Koch notifications@github.com wrote:

Is there any progress on that? I think I came across a spinner, whilst clicking through one of the updated EBI pages.

I like the idea of the:

Non-animated content placeholder images that tease what is coming

LinkedIn is doing something similar.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ebiwd/EBI-Pattern-library/issues/14#issuecomment-286471996, or mute the thread https://github.com/notifications/unsubscribe-auth/AHL5aHs811giGr3agZqKjYS9-WaRn4Ucks5rlrwYgaJpZM4KZy_f .

tschaka1904 commented 7 years ago

For now I'll go with the most simple one: unknown

Or something like that. But I think a common load in a common colour would be good. Alternative this one ;-) : cat

But if anyone has experience with the placeholder image, that would be awesome.

AntonPetrov commented 7 years ago

For what it's worth, Font Awesome can animate any icon using CSS3: http://fontawesome.io/examples/

This is what I use in RNAcentral.