Repository navigation
fix(www): postgres card art overlaps text column - #47734
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe wrapper ChangesDatabaseVisual Layout Update
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/www/components/Products/DatabaseVisual.tsx`:
- Line 63: The responsive class on the span in DatabaseVisual should not use the
md breakpoint if the intent is to apply only at the 1280px clamp. Update the
Tailwind breakpoint token on that element to the 1280px-starting breakpoint (or
adjust the breakpoint definition if md is supposed to represent that range) so
the layout shift doesn’t happen at 768px and 1024px; use the existing span
className in DatabaseVisual as the target for the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 201f41d2-b2f9-4c92-ab2f-9f6eeaa4e461
📒 Files selected for processing (1)
apps/www/components/Products/DatabaseVisual.tsx
Braintrust eval report
|
Before

After

Summary
On the homepage, the Postgres Database product card's elephant artwork renders over the card's description text at every viewport ≥1280px. I traced it to #47226 (merged June 24): standardizing the marketing container to
section-container(max-w-7xl+xl:px-24) capped products-grid content at 1088px, shrinking the card to ~538px while its fixed geometry (250px text column + 398px right-anchored square artwork box) needs ~625px. Large monitors regressed hardest: before June 24 they got ~676px cards and no overlap. The app-router homepage move (#47228), the color system PR (#47288), and the artwork PNGs are all unrelated (verified against production DOM and full diffs).Two changes to the artwork span in
DatabaseVisual.tsx:calc(100% - 280px)frommdup, where 280 covers the text column'smd:max-w-[250px]cap (inProductCard.tsx'sisDatabasebranch) plus card padding and breathing room. The art scales down through its existingobject-contain. At md/lg the card is full-width (md:col-span-12), so the clamp never binds and rendering is unchanged there.xl:-right-12bleed (baseright-0stands, matching how 2xl already rendered). The bleed used to clip only the art's transparent canvas margin; with the clamped box the art fills its full width, so the 48px offset was cropping the elephant itself at 1280-1535px.The hover line-art SVG scales with the box and stays aligned with the PNG (identical aspect ratios: viewBox 390:430, PNG 585x645).
Changes
md:max-w-[calc(100%-280px)]to the artwork span inDatabaseVisual.tsxso the Postgres card art can never cross its text columnxl:-right-12 2xl:right-0from the same span so the smaller art isn't clipped at the card's right edgeTesting
Round 1 on the Vercel preview (commit e1ca671, measured via getBoundingClientRect + computed styles):
max-width: calc(100% - 280px)appliesRound 1 also surfaced that the
xl:-right-12bleed now cropped the elephant at 1280-1535px widths → second commit removes it. Round 2 (commit e28b408):Linear