SheCodeAfrica-Nairobi / SheCodeAfrica-Nairobi-Website

The new open source website for SheCodeNairobi website 🥳
18 stars 25 forks source link

Fix images on the Events Components #36

Closed katungi closed 1 year ago

katungi commented 2 years ago

The dynamic images are scaling wrongly on the events component, This is a small issue that's a good first issue 👏🏿

fosa-ij commented 2 years ago

hey @katungi i would like to work on this issue

fosa-ij commented 2 years ago

Nevermind @katungi

katungi commented 2 years ago

Hey @fosa-ij , still interested in working on the issue??

DreMukare commented 2 years ago

Hey @katungi Gimme more insight on the bug

katungi commented 2 years ago

Hey @DreMukare , So on the events component, the images look bad. Ideally, they should fit the image component as per the design. So the task will be to make those images from the events data play well within the images. Also, if you are feeling energetic and want to explore, you can try refactoring from the native img tag to using Next's Image tag.

Can you handle this?

DreMukare commented 2 years ago

Yes i can :)

katungi commented 2 years ago

Hey @DreMukare , any update on this issue?

johnGachihi commented 1 year ago

@katungi I'd like to continue with this

katungi commented 1 year ago

Hey @johnGachihi , yeah sure thing - go on and work on it.

johnGachihi commented 1 year ago

@M-Tee, @katungi Eventbright uses landscape images but the event card design is for square images. The options I see for dealing with this mismatch are stretching and cutting the images to fit the square cards (which is how it is now) or rendering the images in landscape and filling the remaining space in the square cards like below.

What do you think? Should we go with one of these?

Screenshot from 2023-01-17 15-18-20

Screenshot from 2023-01-17 15-07-02

Screenshot from 2023-01-17 15-36-33

katungi commented 1 year ago

Hey @johnGachihi - I really like the last one. It's simple and concise!

johnGachihi commented 1 year ago

@katungi I've tried playing around with the last option but it's leaving a lot of empty space which doesn't look good, especially on tablet-size screens. @M-Tee your opinion would really be appreciated.

katungi commented 1 year ago

Hey @johnGachihi , could you send a screenshot?

johnGachihi commented 1 year ago

These are both on screen width 820px. The problem is mainly on the large event card

With the original layout Screenshot from 2023-01-20 19-20-48

With a different layout meant to reduce the size of the large event card Screenshot from 2023-01-20 19-30-34

johnGachihi commented 1 year ago

:see_no_evil: I just noticed that the Eventbrite API also returns a url for the original uncropped event image. And the images are big enough to not get pixelated. I'll send a PR soon.

Screenshot from 2023-01-24 20-05-22