Skip to content

fix(www): pricing table spacing and sticky offset - #49532

Merged
pamelachia merged 5 commits into
masterfrom
pamchia/growth-1137-fix-cramped-multi-line-cell-spacing-in-pricing-comparison
Aug 26, 2026
Merged

pamelachia merged 5 commits into
masterfrom
pamchia/growth-1137-fix-cramped-multi-line-cell-spacing-in-pricing-comparison

Conversation

@pamelachia

@pamelachia pamelachia commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Multi-line cells in the /pricing comparison table rendered as one cramped block once lines wrapped: the stacked values had no gap between entries, and the continuation lines' leading-4 is a no-op at text-xs. At the same narrow desktop widths (1024 to 1280px), category headers clipped behind the sticky plan header because their hardcoded top-[108px] xl:top-[84px] offsets desync from the plan header's variable height.

Changed:

  • Value cells get vertical padding: the value tds were pl-6 pr-2 with no vertical padding, so tall multi-line cells pressed text against the row dividers; they now carry py-5 like the row-label column (text ink sits ~21px off both borders, measured).
  • Stacked price lines read as separate entries: gap-2 between entries while wrapped lines inside one entry stay tight (leading-4), so each price reads as its own block. Two earlier iterations that only widened the entry gap (gap-1, then gap-2 with looser leading-5 wraps) reviewed as still-cramped; the missing cell padding was the dominant cause. Mobile untouched.
  • Category headers never clip behind the plan header: a ResizeObserver measures the sticky thead's real height and publishes --pricing-category-top as a CSS variable on the table; the category header consumes it via var(), keeping the old 108px/84px values as pre-hydration fallbacks so SSR paint is unchanged. Runs in a layout effect so the first client paint already has the measured value.

Note: I rejected re-tuning the hardcoded offsets: numbers desyncing from the header's content-driven height is the root cause, and new constants re-break on the next copy or breakpoint change.

Before / after

Before (prod: multi-line prices pressed against the row dividers as one dense block; rows clipped under the sticky category header):
pr-before

After (this PR: padded cells, each price its own block, headers pin flush):
pr-after

To test

Tested on the Vercel preview (Playwright, measured values in parens):

  • At a 1024 to 1280px viewport, open /pricing and find the Pipelines row: the 3 price lines in the Pro and Team cells read as distinct blocks (row-gap 8px between entries, tight 16px line boxes within an entry, 20px cell padding; verified on localhost pre-push and on the preview, light and dark)
  • Multi-line cell text no longer touches the row dividers: ~21px from border to text ink top and bottom (was 0-3px)
  • At the same width, scroll the whole comparison table: Database and Auth section headers pin flush below the plan-price header, with no row text clipped between them (pinned category top within 0.2px of thead bottom)
  • At ~1800px wide: Pipelines and Point in time recovery (Enterprise) cells show the same separated lines (PITR Enterprise is a single wrapping string, renders cleanly)
  • Resize across 1280px after load: category headers stay flush under the plan header (ResizeObserver refires; same 0.2px alignment after 1900px to 1150px resize without reload)
  • Below 1024px: the mobile comparison view is unchanged
  • Added: cold navigation to /pricing#compare-plans lands with --pricing-category-top already applied (151px at 1150px width) and the pinned header flush
  • Added: no new console errors versus the page's pre-existing baseline

Linear

  • fixes GROWTH-1137

@pamelachia pamelachia self-assigned this Aug 25, 2026
@vercel

vercel Bot commented Aug 25, 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, v0 Aug 26, 2026 5:59am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 26, 2026 5:59am
design-system Skipped Skipped Aug 26, 2026 5:59am
docs Skipped Skipped Aug 26, 2026 5:59am
studio-self-hosted Skipped Skipped Aug 26, 2026 5:59am
studio-staging Skipped Skipped Aug 26, 2026 5:59am
ui-library Skipped Skipped Aug 26, 2026 5:59am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c260886-8f88-4736-81dd-116f23262260

📥 Commits

Reviewing files that changed from the base of the PR and between 23949ae and c3428d3.

📒 Files selected for processing (2)
  • apps/www/components/Pricing/PricingComparisonTable.tsx
  • apps/www/components/Pricing/PricingTableRow.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The pricing comparison table now measures its sticky header and exposes the result through a CSS custom property. Desktop category headers use this value for positioning, and plan-value cells use updated vertical spacing.

Changes

Pricing table sticky layout

Layer / File(s) Summary
Sticky header measurement
apps/www/components/Pricing/PricingComparisonTable.tsx
The desktop table observes the sticky thead with ResizeObserver and sets --pricing-category-top from the measured header dimensions.
Category positioning and cell spacing
apps/www/components/Pricing/PricingTableRow.tsx
Desktop category headers use the measured offset with viewport fallbacks. Plan-value cells add vertical padding and spacing between multiline values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c3428

This PR adjusts pricing-table spacing and dynamically aligns category headers with the sticky plan header. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: 4l3k51

🚥 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. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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 summarizes the main changes: pricing table spacing and sticky-header offset fixes.
Description check ✅ Passed The description explains the current and new behavior, implementation details, testing, visual changes, and linked issue. It omits the required CONTRIBUTING.md confirmation and explicit change-type se…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

Full details: Description check

Explanation

The description explains the current and new behavior, implementation details, testing, visual changes, and linked issue. It omits the required CONTRIBUTING.md confirmation and explicit change-type section, but it is otherwise complete.

✨ 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 pamchia/growth-1137-fix-cramped-multi-line-cell-spacing-in-pricing-comparison

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.

@supabase

supabase Bot commented Aug 25, 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 ↗︎.

@pamelachia
pamelachia marked this pull request as ready for review August 26, 2026 07:00
@pamelachia
pamelachia requested a review from a team as a code owner August 26, 2026 07:00
@pamelachia
pamelachia merged commit 6d4263b into master Aug 26, 2026
44 checks passed
@pamelachia
pamelachia deleted the pamchia/growth-1137-fix-cramped-multi-line-cell-spacing-in-pricing-comparison branch August 26, 2026 07:11
@github-actions

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

hunleyd added a commit that referenced this pull request Aug 26, 2026
…for-pitr-archiving-stale

* origin/master: (26 commits)
  chore(docs): add Simon Tomlinson to humans.txt (#49547)
  fix(docs): make code blocks reachable and readable by keyboard and screen reader (#49562)
  feat: update mgmt api docs (#49128)
  fix: display request body Array<object> schema/fields in Management API Reference (#49575)
  Set up feature preview for explorer (#49602)
  docs(troubleshooting): add postgres_changes not delivering guide (#48997)
  chore: Update API types (#49598)
  refactor(studio): fetch MCP tool→FGA map from mgmt-api endpoint (#49225)
  Add go page: Postgres Summit US 2026 contest (#49597)
  Add Lingo.dev customer case study (#49595)
  fix(studio): hide legacy API keys on High Availability projects (#49552)
  [FE-4246] fix(studio): resolve notebook database labels (#49554)
  fix(studio): resolve dirty notebook save conflicts (#49540)
  fix(studio): make menu links reliable (#49584)
  [FE-3717] feat(studio): Multigres cluster topology diagram (#49298)
  feat(www): homepage json-ld, canonical, 404 links (#49533)
  refine role impersonation popover (#49467)
  feat(studio): move read replica creation to a dialog (#49516)
  fix(www): pricing table spacing and sticky offset (#49532)
  fix(studio): treat region flags as decorative by default (#49574)
  ...
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