international-labour-organization / designsystem

A design system for the International Labour Organization
Apache License 2.0
1 stars 3 forks source link

Add skeleton loading states to components #1014

Open inesdgomes opened 6 months ago

inesdgomes commented 6 months ago

We need a loading state that informs users that something is happening in the background. It would show, for example, after users make a new search on this page or use any of the filters on the left side: https://www.ilo.org/search?ilo_date%5Bmin%5D=&ilo_date%5Bmax%5D=&sort_by=search_api_relevance&dl=false

We have this in the component library but doesn't seem fit for purpose. https://www.figma.com/design/RRxsfLNxjoypKrfJg1EwJf/ILO-Components-Library?node-id=682-6&t=8nBkXZiblcDk6Vg2-0 https://ilo-ui-twig.netlify.app/?path=/docs/components-transitions-loading--loading

cc'ing you @justintemps in case you want to chime in with any other additional requirements.

inesdgomes commented 6 months ago

@justintemps As discussed, assigning this to you so you can add more specs for @beatrizmartinmartins

justintemps commented 6 months ago

Hey @beatrizmartinmartins, in terms of a loading state, I think we should create skeleton versions (example here in material ui) for some but not all of the components.

When these gets used

Skeleton components get used when parts of the page are still loading, but should still be visible to the user while the data is fetching. As such, we only need this for content components that render data from the server.

Which components do we need skeletons for

beatrizmartinmartins commented 6 months ago

@justintemps Hey Justin, yes, I agree, we should make those versions although i'd say I will create a new category on the DS called Skeleton (just for dev purposes) and create those components there. In design is not really needed, but it does make sense to have it in design.

beatrizmartinmartins commented 5 months ago

@inesdgomes All skeletons are done except the rich text. We don't have that as a component. Should we just make the headings and the text have the same height as they have and just make them a skeleton instead of creating a component? Or do you actually need a component for all the type text styles @justintemps ? You can check the other components on the list here

inesdgomes commented 5 months ago

@beatrizmartinmartins Two requests:

@justintemps We need your feedback on the designs, please: https://www.figma.com/design/RRxsfLNxjoypKrfJg1EwJf/ILO-Components-Library?node-id=3587-1001&t=GvHITZiTMiv8FGJC-0

beatrizmartinmartins commented 5 months ago

Hey @inesdgomes ! Changed the border-radius from 24 (rounded) to 4px. I think it's a good amount of pixels to not be so rounded. Also, you can check the Search Results template here.

Included the following skeletons:

inesdgomes commented 4 months ago

Thanks @beatrizmartinmartins I'm moving this to development.

@justintemps All skeleton designs are here: https://www.figma.com/design/RRxsfLNxjoypKrfJg1EwJf/ILO-Components-Library?node-id=3587-1001&t=rPHHQj17zTWCD34L-0

And this a template showing the components that are a priority: https://www.figma.com/design/TnVsWy6VobbHzZdbHdx3Rb/ILO-Page-Templates?node-id=5452-140166&t=DeudsdqRTDqHvBoS-0

justintemps commented 3 months ago

The designs for this are done. I'm going to open a new ticket with instructions for development.

justintemps commented 3 months ago

@inesdgomes, @beatrizmartinmartins Hey, reviewing these designs, they look very complicated. The skeletons will only be on the page for a few seconds at most, can we simplify them so they'll be easier to implement?

For example, here's a look at the skeleton screen in LinkedIn. Notice the cards are very very simple.

0_s7uxK77a0FY43NLe

inesdgomes commented 3 months ago

Yep, I see your point. @beatrizmartinmartins could you please rework these designs?

beatrizmartinmartins commented 3 months ago

I was wondering, do we actually need the dark versions of a skeleton? See screenshot attached

Image

I will include them anyway, and we can remove later. Please check this link (I'm doing it on a branch)

@inesdgomes @justintemps

justintemps commented 3 months ago

@bashlk for your feedback please

bashlk commented 3 months ago

@justintemps Here are some of my thoughts