fix(webapp): fix promo page heading typography#4311
Conversation
The promo page stretched Header2 to display sizes, but Header2's fixed leading-6 collapsed the multi-line title so the two lines overlapped. Switch to Header1 (the page-title primitive, used by the login pages) with leading-tight and pb-4 for correct line-height and spacing.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (11)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{packages/core,apps/webapp}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/webapp/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)
Files:
🧠 Learnings (15)📚 Learning: 2026-02-03T18:27:40.429ZApplied to files:
📚 Learning: 2026-02-11T16:37:32.429ZApplied to files:
📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-06-13T19:53:13.759ZApplied to files:
📚 Learning: 2026-06-17T17:13:49.929ZApplied to files:
📚 Learning: 2026-06-23T13:04:21.413ZApplied to files:
📚 Learning: 2026-05-08T21:00:20.973ZApplied to files:
📚 Learning: 2026-06-25T18:21:55.847ZApplied to files:
📚 Learning: 2026-05-12T21:04:05.815ZApplied to files:
📚 Learning: 2026-06-25T18:21:51.905ZApplied to files:
📚 Learning: 2026-07-03T17:10:21.498ZApplied to files:
📚 Learning: 2026-06-25T18:21:54.729ZApplied to files:
🔇 Additional comments (2)
WalkthroughUpdated the promo route to import and render 🚥 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 |
Header1's responsive font-size overrides (md:text-3xl, lg:text-4xl) carry their own line-heights, so a single base leading-tight did not reliably win at md/lg widths and the wrapped title could still overlap. Set leading-tight explicitly per breakpoint, ordered after each font size, so the relative 1.25 line-height always applies.
What
The
/promopage heading rendered with overlapping lines — the two lines of "Promo codes are for new accounts" collided.Why
The page used
Header2stretched to display sizes (sm:text-2xl md:text-3xl lg:text-4xl), butHeader2bakes in a fixedleading-6(24px). A 36px font in a 24px line box makes wrapped lines overlap. It only showed atsm+ widths and only on headings that wrap to 2+ lines, which is why it slipped through — the short single-line headings on the same page looked fine.Fix
Switch both headings to
Header1— the page-title primitive the sibling login pages (login._index,login.magic) already use for exactly this size. Addleading-tight(relative line-height, scales with font size, and this heading uniquely wraps to two lines) andpb-4to match the login pages' spacing convention.Testing
Manually verified the signed-in view (
/promowhile logged in) renders as two clean, non-overlapping lines across breakpoints. Pure CSS/layout change — no automated test.