Skip to content

Comments

fix: info card and media container alignment#426

Merged
rugeli merged 5 commits intomainfrom
fix/align-info-card
Feb 24, 2026
Merged

fix: info card and media container alignment#426
rugeli merged 5 commits intomainfrom
fix/align-info-card

Conversation

@rugeli
Copy link
Collaborator

@rugeli rugeli commented Feb 17, 2026

Problem

What is the problem this work solves, including
two possible solutions for #424

In most cases, the two containers(media and info card) are evenly aligned. But when the media container includes more items than usual, an empty space appears between the Return to Cell Catalog button and the cell line info card

Screenshot 2026-02-16 at 3 28 43 PM

Solution

What I/we did to solve this problem

approach 1:

  • adjusted the style to allow for an uneven bottom alignment when the media container has more media items(>5)

verify the change using AICS-82 as an example.
Screenshot 2026-02-17 at 1 21 35 PM

approach 2(current pick):

  • set max-height: 420px; to .thumbnail-container so that four thumbnails are visible by default, additional ones are scrollable. keeps both media and info card containers evenly aligned
  • set thumbnail container max-height to show 4.5 items
Screenshot 2026-02-20 at 11 32 36 AM

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to Verify:

@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for cell-catalog ready!

Name Link
🔨 Latest commit 67f6449
🔍 Latest deploy log https://app.netlify.com/projects/cell-catalog/deploys/699cc3863807b90008d5f853
😎 Deploy Preview https://deploy-preview-426--cell-catalog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rugeli rugeli changed the title fix: info card top-aligned fix: info card and media container alignment Feb 17, 2026
display: flex;
flex-direction: column;
gap: 4px;
max-height: calc(4 * (100px + 4px) + 50px);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried percentage-based calc() but it started affecting other components and became complicated than expected;(

so I went with the straightforward solution to keep this fix pr within scope: max height = ~4.5 thumbnails(still a fixed height but the intent is clearer). We can do a separate refactor later to centralize fixed values if needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do this calc though? Isn't it just 466px? I'd just put 466px and a comment if you are trying to highlight how you arrived at that number

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I'll switch to a fixed height and add a quick comment

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a UI alignment issue where a blank gap appeared between the "Return to Cell Catalog" button and the cell line info card on pages with many media items (more than 4). The fix implements a scrollable thumbnail container with a maximum height to maintain consistent alignment between the media container and info card.

Changes:

  • Added max-height constraint to thumbnail container to display 4.5 items, making additional thumbnails scrollable
  • Added overflow-x: hidden to prevent horizontal overflow in the thumbnail container

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@meganrm meganrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@rugeli rugeli merged commit 7636138 into main Feb 24, 2026
7 checks passed
@rugeli rugeli deleted the fix/align-info-card branch February 24, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants