Skip to content

feat(cards): collection source stack + aligned card tags/date + freeform tags#6332

Closed
tsahimatsliah wants to merge 1 commit into
mainfrom
claude/collection-card-source-stack
Closed

feat(cards): collection source stack + aligned card tags/date + freeform tags#6332
tsahimatsliah wants to merge 1 commit into
mainfrom
claude/collection-card-source-stack

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

Replaces the collection "Collection"/"Trend" pill with the collection's own source avatars, aligns the tag + date row across collection, freeform‑collection and freeform post cards, and shows tags on freeform post cards — all without changing the master ArticleGrid.

Changes

Source stack (replaces the pill)

  • New shared CollectionSourceStack — viewport‑aware (useViewSize); rests tight (≤3 avatars + "+N") and expands on hover, showing each source's rich HoverCard/SourceEntityCard. Mobile renders expanded, no hover card. Pure CSS group-hover expansion; pointer-events-auto so it works inside the card's pointer-events-none text container.
  • Wired into CollectionCardHeader (grid, also feeds the featured wide card) and CollectionList (list).
  • Expanded the collectionSources GraphQL selections (fragments.ts, posts.ts) with the fields the hover card needs (id, name, permalink, type, description, membersCount, flags.totalUpvotes).

Card tag/date alignment

  • Collection cards bottom‑anchor tags + date just above the footer, matching the article card. The freeform (text) variant reserves the same footer height as the cover image via a new optional contentClassName on WelcomePostCardFooter, so tags/date line up regardless of title length or image/text footer.
  • Dropped the redundant "· N sources" from the collection card metadata — the count already shows on the source‑stack "+N".

Freeform post cards

  • FreeformGrid + FreeformList now render tags (freeform posts carry tags but the card/list didn't show them), aligned like the collection card.

The master ArticleGrid is intentionally untouched.

Testing

  • CollectionGrid.spec.tsx updated (pill‑label assertions → source‑stack render). Collection + posts GraphQL specs pass; strict typecheck + lint clean.
  • Alignment verified in Storybook across all four grid card types at 1/2/3‑line titles.

🤖 Generated with Claude Code

Preview domain

https://claude-collection-card-source-st.preview.app.daily.dev

Replace the collection "Collection"/"Trend" pill with the collection's own
source avatars, align the tag/date row across collection, freeform-collection
and freeform post cards, and show tags on freeform post cards — all without
changing the master ArticleGrid.

- New shared CollectionSourceStack (viewport-aware expand + per-source hover
  card), wired into CollectionCardHeader (grid) and CollectionList (list);
  expand the collectionSources GraphQL selections with the hover-card fields.
- Align the collection card tags + date with the default article card:
  bottom-anchor them above the footer; give the freeform (text) variant the
  same footer height as the cover image via a new optional contentClassName
  on WelcomePostCardFooter.
- Drop the redundant "· N sources" from the collection card metadata (the
  count already shows on the source-stack "+N").
- Show tags on freeform post cards (FreeformGrid + FreeformList) and align
  them like the collection card.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 16, 2026 1:56pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jul 16, 2026 1:56pm

Request Review

@tsahimatsliah

Copy link
Copy Markdown
Member Author

Duplicate of #6331 — byte-for-byte identical change (verified: empty diff between the two branch trees). Keeping #6331 as the master since it splits the work into reviewable commits (source stack → tag/date alignment → drop sources count → freeform tags). Closing this one.

@tsahimatsliah
tsahimatsliah deleted the claude/collection-card-source-stack branch July 16, 2026 14:35
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