feat(cards): collection source stack + aligned card tags/date + freeform tags#6332
Closed
tsahimatsliah wants to merge 1 commit into
Closed
feat(cards): collection source stack + aligned card tags/date + freeform tags#6332tsahimatsliah wants to merge 1 commit into
tsahimatsliah wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
CollectionSourceStack— viewport‑aware (useViewSize); rests tight (≤3 avatars + "+N") and expands on hover, showing each source's richHoverCard/SourceEntityCard. Mobile renders expanded, no hover card. Pure CSSgroup-hoverexpansion;pointer-events-autoso it works inside the card'spointer-events-nonetext container.CollectionCardHeader(grid, also feeds the featured wide card) andCollectionList(list).collectionSourcesGraphQL selections (fragments.ts,posts.ts) with the fields the hover card needs (id,name,permalink,type,description,membersCount,flags.totalUpvotes).Card tag/date alignment
contentClassNameonWelcomePostCardFooter, so tags/date line up regardless of title length or image/text footer.Freeform post cards
FreeformGrid+FreeformListnow render tags (freeform posts carry tags but the card/list didn't show them), aligned like the collection card.The master
ArticleGridis intentionally untouched.Testing
CollectionGrid.spec.tsxupdated (pill‑label assertions → source‑stack render). Collection + posts GraphQL specs pass; strict typecheck + lint clean.🤖 Generated with Claude Code
Preview domain
https://claude-collection-card-source-st.preview.app.daily.dev