Skip to content

fix(www): postgres card art overlaps text column - #47734

Merged
pamelachia merged 2 commits into
masterfrom
pamela/fix-www-postgres-tile
Jul 8, 2026
Merged

pamelachia merged 2 commits into
masterfrom
pamela/fix-www-postgres-tile

Conversation

@pamelachia

@pamelachia pamelachia commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Before
Screenshot 2026-07-08 at 7 29 07 PM

After
Screenshot 2026-07-08 at 7 29 55 PM

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:

  1. Cap the box width at calc(100% - 280px) from md up, where 280 covers the text column's md:max-w-[250px] cap (in ProductCard.tsx's isDatabase branch) plus card padding and breathing room. The art scales down through its existing object-contain. At md/lg the card is full-width (md:col-span-12), so the clamp never binds and rendering is unchanged there.
  2. Remove the xl:-right-12 bleed (base right-0 stands, 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

  • Add md:max-w-[calc(100%-280px)] to the artwork span in DatabaseVisual.tsx so the Postgres card art can never cross its text column
  • Drop xl:-right-12 2xl:right-0 from the same span so the smaller art isn't clipped at the card's right edge

Testing

Round 1 on the Vercel preview (commit e1ca671, measured via getBoundingClientRect + computed styles):

  • Art clear of the text column at 1280/1440/1600/1920 (gap 54px at 1280/1440, 6px at 1600/1920); computed max-width: calc(100% - 280px) applies
  • Hover at 1440 — SVG and PNG rects identical (pixel-exact alignment)
  • 768/1024 — full-width card unchanged, span still a 398px square (clamp resolves but doesn't bind)
  • Light theme at 1440 — same geometry, no overlap

Round 1 also surfaced that the xl:-right-12 bleed now cropped the elephant at 1280-1535px widths → second commit removes it. Round 2 (commit e28b408):

  • 1280/1440/1512/1600/1920 — art fully visible (span right edge flush at the card's inner edge, e.g. 713 vs 714 at 1440), still clear of the text column (span left 457 vs text right 451)
  • 768/1024 — unchanged (span still a right-anchored 398px square)
  • Hover alignment still exact (PNG and SVG rects identical: 457,452,256,398)

Linear

  • fixes GROWTH-971

@pamelachia
pamelachia requested a review from a team as a code owner July 8, 2026 10:33
@pamelachia pamelachia self-assigned this Jul 8, 2026
@vercel

vercel Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Jul 8, 2026 11:05am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 8, 2026 11:05am
design-system Skipped Skipped Jul 8, 2026 11:05am
docs Skipped Skipped Jul 8, 2026 11:05am
studio-self-hosted Skipped Skipped Jul 8, 2026 11:05am
studio-staging Skipped Skipped Jul 8, 2026 11:05am
ui-library Skipped Skipped Jul 8, 2026 11:05am

Request Review

@supabase

supabase Bot commented Jul 8, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The wrapper <span> in DatabaseVisual.tsx gains responsive Tailwind classes that change its sizing behavior on medium screens and above.

Changes

DatabaseVisual Layout Update

Layer / File(s) Summary
Responsive wrapper span styling
apps/www/components/Products/DatabaseVisual.tsx
The wrapper span gains md:aspect-square and md:max-w-[calc(100%-280px)] classes, changing sizing behavior on medium screens and above.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly names the affected page and visual bug being fixed.
Description check ✅ Passed It covers the change, current/new behavior, screenshots, and testing, though the template sections are not explicitly filled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pamela/fix-www-postgres-tile

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4791220 and e1ca671.

📒 Files selected for processing (1)
  • apps/www/components/Products/DatabaseVisual.tsx

@pamelachia
pamelachia merged commit 6dfae09 into master Jul 8, 2026
38 checks passed
@pamelachia
pamelachia deleted the pamela/fix-www-postgres-tile branch July 8, 2026 11:56
@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1783511948)

Score Average Improvements Regressions
Knowledge Usage 97.4% (-3pp) - 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 97.6% (-2pp) - 1 🔴
Tool Usage 72.5% (+0pp) 1 🟢 1 🔴
Time_to_first_token 3.18tok (+0.07tok) 11 🟢 18 🔴
Llm_calls 2.91 (+0.05) 11 🟢 11 🔴
Tool_calls 3.08 (+0.11) 11 🟢 7 🔴
Errors 5.26 (-0.03) 5 🟢 3 🔴
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 26025.39tok (+2261.05tok) 10 🟢 15 🔴
Prompt_cached_tokens 7721.2tok (+82.39tok) 11 🟢 12 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 623.25tok (+31.1tok) 11 🟢 17 🔴
Completion_reasoning_tokens 102.95tok (+10.02tok) 10 🟢 16 🔴
Total_tokens 26648.64tok (+2292.15tok) 13 🟢 16 🔴
Estimated_cost 0$ (+0$) 9 🟢 17 🔴
Duration 17.84s (-0.54s) 16 🟢 13 🔴
Llm_duration 11.92s (+0.58s) 12 🟢 17 🔴

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.

2 participants