feat: more hero cards#6294
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
|
Claude finished @capJavert's task in 2m 50s —— View job Review: more hero cards
Nice extraction of the shared bits ( 🟡 1. Two sources of truth for "widenable" types (latent layout bug)
// Feed.tsx:707-746 — the wide grid cell is created regardless of PostTypeToWideCard
const isWidened = colSpan > 1;
if (isWidened) { renderedItem = <div style={{ gridColumn: `span ${colSpan}` }}>… }But // FeedItemComponent.tsx:471-479
const WideCard = isWidenedFeaturedPost ? PostTypeToWideCard[itemPost.type] : undefined;
…
{WideCard ? <WideCard … /> : <PostTag … />}So if someone adds a type to 🟡 2. Heavy duplication across the four wide cardsPer the repo's strong "Avoiding Code Duplication" guidance, the four That's ~600 duplicated lines. Consider a shared shell that slots the per-type differences, e.g.: <FeaturedWideCardShell
post={post} wideColSpan={wideColSpan} domProps={domProps} …
header={<CollectionCardHeader post={post} />}
description={post.summary}
media={<FeaturedWideCardMedia post={post} showVideoOverlay />}
/>At minimum the image column and the footer (glass/action) block are identical everywhere and are safe, low-risk extractions. This is a startup-pragmatism call, but four copies of a 200-line card is a lot of surface area for future drift. 🟠 3.
|
|
@claude review again, especially if new components for post types cover all cases which regulard card components do |
|
Claude finished @capJavert's task in 2m 49s —— View job Review: hero card coverage vs regular cards
Nice work on the refactor since last round — the Focusing on your question — do the wide cards cover every case the regular cards handle? — mostly yes, but I found a few gaps: 🟠 1.
|
|
@claude review again, do note that trending flag is purposly not included in wide cards, thats ok, i also enhanced so that wide cards show more content instead of just always image on right |
|
Claude finished @capJavert's task in 2m 47s —— View job Review: hero card coverage (round 3)
Thanks for the context. Confirming the two things you called out:
Coverage is in good shape. One thing the "config based types" commit reopened, and a couple of smaller notes: 🟠 1.
|
|
@claude review
|
|
Claude finished @capJavert's task in 2m 3s —— View job Review: hero cards (round 4)
Noted — double flag eval is intended/cheap, dropping it. Both open items from round 3 are now resolved: ✅
Config defaults are correct per CLAUDE.md: 🟢 Minor (non-blocking)
Verdict: LGTM. Both prior blockers are closed, the config→component path is compile-safe, and coverage now matches the regular cards on the cases that matter. The two minors above are cosmetic/consistency nits, safe to merge without. |
Changes
Add hero cards support to more types.
Events
Did you introduce any new tracking events?
Experiment
Did you introduce any new experiments?
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Preview domain
https://more-hero-cards.preview.app.daily.dev