fix: info card and media container alignment#426
Conversation
✅ Deploy Preview for cell-catalog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| display: flex; | ||
| flex-direction: column; | ||
| gap: 4px; | ||
| max-height: calc(4 * (100px + 4px) + 50px); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
good point, I'll switch to a fixed height and add a quick comment
There was a problem hiding this comment.
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-heightconstraint to thumbnail container to display 4.5 items, making additional thumbnails scrollable - Added
overflow-x: hiddento prevent horizontal overflow in the thumbnail container
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 Catalogbutton and the cell line info cardSolution
What I/we did to solve this problem
approach 1:verify the change using AICS-82 as an example.

approach 2(current pick):
setmax-height: 420px;to.thumbnail-containerso that four thumbnails are visible by default, additional ones are scrollable. keeps both media and info card containers evenly alignedmax-heightto show 4.5 itemsType of change
Please delete options that are not relevant.
Steps to Verify: