international-labour-organization / designsystem

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

Hero card & image: review sizes #958

Open inesdgomes opened 6 months ago

inesdgomes commented 6 months ago

We need to review the size of hero images. There are two issues:

beatrizmartinmartins commented 5 months ago

done @inesdgomes on design it has a max height but you need to tell justin what we talked about the percentages of the sizing of the screen

inesdgomes commented 5 months ago

This the logic applied in the development of the hero component.

Homepage Hero banner

Postersize: (240px) large Cardsize: (721px) medium Align: center Justify: start

Basic page

Postersize: (527px) xlarge Cardsize: (920px) xlarge Align: baseline Justify: center

Portal

Postersize: (240px) large Cardsize: (625px) small Align: baseline Justify: start

Publication

Postersize: (527px) xlarge Cardsize: (998px) xxlarge Align: if image bottom / no image baseline Justify: 1 col center / 2cols offset

Event

Postersize: (527px) xlarge Cardsize: (920px) xlarge / 2 cols (998px) xxlarge Align: if image bottom / no image baseline Justify: 1 col center / 2cols offset

Project

Postersize: (527px) xlarge Cardsize: (920px) xlarge / 2 cols (998px) xxlarge Align: if image bottom / no image baseline Justify: 1 col center / 2cols start

Multimedia story

Postersize: (527px) xlarge Cardsize: (856px) large Align: bottom Justify: center

Resource

Postersize: (527px) xlarge Cardsize: (920px) xlarge / 2 cols (998px) xxlarge Align: if image bottom / no image baseline Justify: 1 col center / 2cols start

The relevant parameter for us above is the postersize, which determines the size of the image. This means we're currently only using 2 image sizes on the website: large and xlarge. However, you can see in storybook that there are 4 postersize available options: small, medium, large and xlarge.

Image

As discussed, could you please:

beatrizmartinmartins commented 4 months ago

@inesdgomes There's some things I think don't really make sense like the Basic page sizing. I have been testing and isn't it too big when here's no picture? Check that template here. (This is what we had previously on the templates, I didn't change the format of it)

inesdgomes commented 4 months ago

Hi @beatrizmartinmartins When there is no image, all templates should look the same, like this: https://www.ilo.org/rights-and-permissions OR https://www.ilo.org/ilo-and-multilateral-system

I think at this point in time, it's better if you follow what can bee seen in Storybook, which has a certain logic, rather than trying to find a logic in the designs. I know Justin struggled a lot to implement the component because of how poorly documented was and of all its different variations. I would suggest that you:

beatrizmartinmartins commented 4 months ago

@inesdgomes everything is done.

I also updated all the templates. They work like intended and are up to date :)

inesdgomes commented 4 months ago

Hi @beatrizmartinmartins Great work, thanks, much better! We definitely simplified the component and it's easier to understand, but we still need to resolve the original problem - see ticket description at the top. To be discussed, but this is what I think we need to do:

beatrizmartinmartins commented 1 month ago

Logic of Hero Card component:

We removed all the namings of the component because we can use them independently of it's name. For example, maybe on Multimedia we can use the Hero Card on the center, of left, depending on the content. For this instance, it doesn't really had anything calling the variants by it's name. Meanwhile, we decided that it was better to divide them into two variants:

For this reason, we have decided that all images are going to have the same min-heigh (493px) and max-heigh (593). By doing this, the component get's much easier to use and to identify where to apply. Check the component here

cc @inesdgomes @justintemps