Notebook feed tiles: full-background image#4914
Conversation
Notebook tiles with a cover image now render like tournament tiles: the image fills the card as a background with a gradient scrim, and the title and preview text are overlaid in white. This gives the preview room to breathe instead of being squeezed into a narrow column beside a fixed-width thumbnail. Tiles without an image are unchanged.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
ChangesNotebook Post Card Background Image
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
Extend Option E to the consumer feed path so notebooks with a cover image render the full-bleed background + gradient scrim treatment in both forecaster and consumer views.
Render the notebook markdown summary (via NotebookTile fullBackground) on consumer-view notebook tiles that have a cover image, matching the Option E design which overlays both title and preview text.
Option E (full-background image + preview) applies to forecaster view only. Consumer-view notebooks remain the existing title-only card.
The .content p global rule applies text-gray-800 directly to descendants, beating the inherited !text-gray-0 on the contentEditable root. Target descendants explicitly so preview body text stays legible on dark cover images. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The score span's leading-4 was stripped by tailwind-merge because the later text-sm/text-xs class carries its own line-height, leaving the voter pill at 28px vs the comment button's 24px. Order leading-4 last so it wins, restoring the intended 24px and matching the comment pill. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The dark gradient scrim is always dark regardless of theme, so the overlaid preview text should always be white. The dark:text-gray-0-dark variant flipped descendants to a dark color in dark mode, making them illegible on the cover image. Drop the dark variants to match the always-white title treatment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Notebook feed tiles with a cover image now adopt the tournament-tile treatment (Ryan's suggestion, "Option E"): the image fills the card as a full-bleed background with a gradient scrim, and the title + preview text are overlaid in white. This gives the preview room to read instead of being crushed into a ~86px column next to a fixed 176px thumbnail.
Notebook tiles without an image are unchanged.
Context: #frontend Slack thread. Several mockups (A–E) were explored; E was the consensus pick (Leonard + Ryan).
Changes
post_card/index.tsx— computes the notebook cover-image URL once and passes it toBasicPostCard(backgroundImageUrl) andNotebookTile(fullBackground).basic_post_card/index.tsx— when a background image is present, the card becomes a relative, min-height container with the image + dark bottom-weighted gradient scrim absolutely positioned behind white-text content (title, preview, footer).notebook_tile.tsx— newfullBackgroundmode renders preview text only (white, 3-line clamp, full width) and drops the separate thumbnail, since the image is now the background.post_controls.tsx—onImageflag makes the footer rail legible (white text) over the image; the vote/comment pills keep their light backgrounds.Notes / follow-ups
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Improvements