Skip to content

fix(highlight): stop Happening Now card from stretching feed row#6033

Merged
idoshamun merged 2 commits into
mainfrom
eng-1432-happening-now-row-stretches-cards-vertically
May 12, 2026
Merged

fix(highlight): stop Happening Now card from stretching feed row#6033
idoshamun merged 2 commits into
mainfrom
eng-1432-happening-now-row-stretches-cards-vertically

Conversation

@idoshamun
Copy link
Copy Markdown
Member

@idoshamun idoshamun commented May 12, 2026

Summary

The Happening Now grid card was pushing the feed row taller than its neighbors. Its inner content (5 highlights with break-words headlines) had a max-content size larger than typical post cards, and even though max-h-cardLarge capped the visual height, that size still contributed to CSS Grid's auto-rows track sizing — stretching the row and forcing every other card in it to grow too.

Changes

  • Wrap HighlightCardContent in an absolute inset-0 container in HighlightGrid so the content is out-of-flow and contributes nothing to the article's intrinsic size.
  • Add min-h-card (24rem) to match ArticleGrid so the card has a sensible baseline when it's alone in a row (mobile single-column).
  • Drop the now-redundant flex h-full flex-col from the override since they're already on the Card primitive.

Test plan

  • pnpm --filter @dailydotdev/shared exec jest src/components/cards/highlight/ (18/18 passing)
  • Lint clean on changed file
  • Strict typecheck passes on changed files
  • Manually verify on a feed with the highlight card alongside taller and shorter post cards on mobile, tablet, and laptop widths

Closes ENG-1432


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1432-happening-now-row-stret.preview.app.daily.dev

The HighlightGrid card's intrinsic content (5 highlights with break-words
headlines) was contributing its full size to the CSS grid track, pushing
the feed row taller and stretching neighboring post cards. Wrapping the
content in an absolutely-positioned container removes its contribution to
track sizing, so the row is sized by the other cards instead. min-h-card
keeps the card from collapsing when it is alone in a row.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview May 12, 2026 7:05am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored May 12, 2026 7:05am

Request Review

Drop the `min-h-0 overflow-y-auto` from the list variant of
HighlightCardContent. Those classes were carried over from the grid
variant fix but never activate here — the list card stacks vertically
with no parent height constraint, so content should grow as needed.
Also captures the grid vs list scoping rule in AGENTS.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@idoshamun idoshamun merged commit c59ff1c into main May 12, 2026
13 checks passed
@idoshamun idoshamun deleted the eng-1432-happening-now-row-stretches-cards-vertically branch May 12, 2026 07:38
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.

1 participant