layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[UI] Improve vertical alignment of Related Resources card thumbnails

Open piyushtripathi9424 opened this issue 2 months ago • 8 comments

Description

The thumbnails/logos inside the Related Resources cards on individual resource pages are not consistently aligned.

The Related Resources cards themselves are aligned correctly as a grid/carousel, but the logos/images inside the cards can appear vertically misaligned or have different visual positioning depending on their aspect ratio.

For example, the Terraform and Kubernetes logos appear at different visual sizes and positions within their respective cards.

Comparison

On the individual resource page, the Related Resources section shows the inconsistent internal image alignment:

Whereas the main Resources collection has the cards aligned consistently:

The issue is specifically with the image/logo positioning inside the Related Resources cards, rather than the overall card alignment.

Investigation

The Related Resources cards use the shared Card component, but currently do not use the fitContainer option.

The existing fitContainer implementation introduced in #7918 provides a consistent image container with centered contain behavior and is already used by the Resources collection.

This suggests that the inconsistency is related to how the shared Card component handles the images rather than the individual resource logos themselves.

Proposed Approach

Reuse the existing fitContainer styling/behavior for the Related Resources cards to improve the internal vertical alignment of their thumbnails instead of introducing separate CSS specifically for this section.

The initial scope should focus on vertical alignment. Image sizing can involve tradeoffs with different image aspect ratios, so the existing fitContainer behavior should be reused where appropriate.

Reference

Screenshots

Image Image Image

piyushtripathi9424 avatar Sep 25 '26 13:09 piyushtripathi9424

Hi @piyushtripathi9424 I would like to work on this issue, can you please assign it to me.

@dhruveshmishra @Maanvi212006

sh011 avatar Sep 25 '26 13:09 sh011

Hey @dhruveshmishra ! If @piyushtripathi9424 is no longer working on this one, Can I give this a go?

mesmaio avatar Oct 09 '26 15:10 mesmaio

@mesmaio I am working on it, thanks for reaching out you can see other issues.

piyushtripathi9424 avatar Oct 09 '26 16:10 piyushtripathi9424

@piyushtripathi9424 Okay. Best of luck!!!

mesmaio avatar Oct 09 '26 19:10 mesmaio

Hey, i cant see the issue to be fixed till now, should i take the charge?

anshawasthy avatar Oct 16 '26 21:10 anshawasthy

@anshawasthy I am working on this, so please take a look on other issues.

piyushtripathi9424 avatar Oct 17 '26 07:10 piyushtripathi9424

@PARTH-TUSSLE @Maanvi212006 @dhruveshmishra Can you please reassign this issue to me, since no PR has been raised yet, even after 4 weeks?

sameerkrdev avatar Oct 29 '26 12:10 sameerkrdev

I am working on this @sameerkrdev please work on another issue.

piyushtripathi9424 avatar Oct 29 '26 12:10 piyushtripathi9424