Skip to content

feat(www): a line of partners under the header of docs and blog pages on phones - #7841

Merged
KATT merged 3 commits into
mainfrom
cursor/mobile-partner-strip-a923
Nov 3, 2026
Merged

KATT merged 3 commits into
mainfrom
cursor/mobile-partner-strip-a923

Conversation

@KATT

@KATT KATT commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Why

  • On phones, partners are hard to see. Docs pages show them only at the very end (PartnersStrip), since the side column (PartnersRail) only appears at xl.
  • tanstack.com handles this on mobile docs pages with a slim sticky bar under the navbar that shows one rotating partner logo.

What

  • New PartnersBar: one 36px line inside the sticky SiteHeader, below md only. It shows a "Partners" label and every partner's logo, gold first, in the same order and from the same data as the social cards.

    • Logos are small (h-3.5), grayscale and muted, and turn full colour on hover, like the hero's "Supported by".
    • When the logos don't fit (narrower than about 340px today), the line scrolls sideways with no scrollbar, and a short fade at the right edge hints that there's more.
    • Links work like the other partner links: rel="sponsored noopener", a new tab, and the blurb as the title.
    • A logo focused from the keyboard gets an inset ring and its colour back. The line clips anything drawn outside it, so a normal outline would be cut off.
  • Only on reading pages. partners-bar.ts holds an explicit allowlist of path prefixes, plus a short list of excluded pages:

    Shows the bar Doesn't
    /docs/… in every version (v11, /docs/v10/…, /docs/v9/…) /: the hero and the sponsors section already show the partners
    /blog and /blog/… /sponsor and each version's docs sponsors page (/docs/community/sponsors, /docs/v10/community/sponsors, /docs/v9/sponsors): they ask for sponsors themselves
    /media, /search: not reading pages
    404s: /404, and any docs or blog URL that doesn't exist (any route match that's "not found")
    Anything new, until it's added to the list
  • It slides between pages instead of jumping. The bar stays mounted and folds to 0px where it doesn't show, and its height animates over 200ms with ease-out, so the page under it slides.

    • The change starts a frame after the new page paints. The first visit to a docs page has one slow frame that would otherwise use up most of the animation.
    • With prefers-reduced-motion, it switches at once.
    • While folded it's inert, so its links can't be focused or reached by screen readers.
  • scroll-padding-top is 6.75rem below md only while the bar shows (html:has([data-partners-bar='shown'])), and 4.5rem otherwise, so anchored headings land below the header either way.

  • sponsors.ts exports partnersByTier, the tier-ordered list the cards already used, so the bar and /sponsor's card alt text share it.

  • Desktop (md and up) is unchanged.

Why it doesn't shift or cover anything:

  • Each page is server-rendered with the bar already open or folded, at a fixed height, and the logos are inline SVGs. Measured CLS on first load is 0 for every page type listed below.
  • The bar is part of the header's normal flow, so content starts below it instead of behind it. The docs sidebar only exists from md, where the bar is hidden. The mobile menu is a full-height dialog above the header.

Navigating home → docs → blog → sponsor → docs (390×844)

after-navigation.mp4

Mobile screenshots (390×844)

Before After
Home (no bar) Home before Home after
Docs Docs before Docs after
Docs, scrolled Docs scrolled before Docs scrolled after
Menu open, on docs Menu before Menu after

More pages, after:

Blog Blog post Sponsor (no bar) Docs sponsors page (no bar)
Blog Blog post Sponsor Docs sponsors page
v10 docs Missing docs page (no bar) /media (no bar) /search (no bar)
v10 docs Missing docs page Media Search

At 320px, where it scrolls, and in dark mode:

Bar at 320px Bar in dark mode

A logo focused from the keyboard (bottom), and the line without focus (top):

Keyboard focus on a partner logo

Scrolling a docs page, then opening the menu

Before:

before-scroll.mp4

After:

after-scroll.mp4

Links

Open these on a phone, or in a window narrower than 768px.

Alternatives considered

  • One rotating logo, as tanstack.com does. It needs a timer and client state, it moves on its own (which is distracting next to docs), and only one partner is visible at a time. Three logos fit on one line at common phone widths, so showing them all is calmer and fairer. Sideways scrolling covers narrow screens and a future longer list.
  • A denylist instead of an allowlist. New pages, often landing pages, would get the bar without anyone deciding they should. With an allowlist, a page shows it only when someone adds it.
  • View transitions. The site doesn't use them, and they would cross-fade whole pages, not just slide the content under the header. A height transition on one element is enough.
  • Animating transform instead of height. It runs smoother on a busy main thread, but the content under the bar wouldn't move, so the bar would cover it while it slides in.
  • A separate sticky element under the header. It would need its own top offset and z-index, and could drift from the header. A row inside the header can't overlap it.
  • Showing it on desktop too. Desktop already shows partners in the docs side column and the home hero. Left as is.

Testing

  • partners-bar.test.ts:
    • the allowlist: docs in every version and the blog show it; home, /sponsor, /media, /search, /404, the docs sponsors pages, and look-alike paths (/docsearch, /blogroll) don't.
    • each excluded docs page still exists, so the list can't go stale silently.
  • sponsors.test.ts: partnersByTier lists every partner in the cards' order, gold first.
  • pnpm vitest run (www), pnpm lint, tsc --noEmit, oxfmt --check and pnpm build all pass.
  • Playwright against vite preview, 390×844 mobile:
    • First load: CLS is 0 for home, docs, v10 docs, blog, a blog post, /sponsor, the docs sponsors page, /media, /search, /404 and a missing docs page. The header is 93px with the bar and 57px without, and scroll-padding-top follows it.
    • Anchors: /docs/quickstart#installation and /blog/announcing-trpc-v11#overview-of-changes both land 15px below the header. A search result for a heading, opened from /, /sponsor or a docs page, lands 15px below too.
    • Navigation: the header's height, per frame, from one page to the next:
      • home → docs: 57, 66, 73, 78, 82, 85, 87, 89, 91, 92, 93
      • blog → sponsor: 93, 84, 77, 72, 68, 65, 63, 61, 59, 58, 57
      • docs → blog: stays 93
      • with reduced motion: 57 to 93 in one step
    • Keyboard: tabbing onto a logo shows the inset ring in full, inside the line.
    • At 320px the bar scrolls inside itself and the page doesn't scroll sideways. At 768px the bar is hidden and the header is 57px, as before.

AI model

Claude Opus 5.5

Open in Web Open in Cursor 

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • A horizontally scrollable partner-logo bar appears beneath the site header on smaller screens across documentation and blog pages. Logos link to partner pages and are ordered by tier. The bar is hidden on the home page, sponsor pages, search pages, and not-found pages.
  • Improvements
    • On narrow screens, in-page navigation leaves more space below the header when scrolling to a section on pages with the partner bar.

@KATT
KATT requested a review from a team as a code owner November 2, 2026 23:42
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
www Ready Ready Preview Nov 3, 2026 12:03am UTC
6 Skipped Deployments
Project Deployment Actions Updated
examples-next-minimal-starter Skipped Skipped Nov 3, 2026 12:03am UTC
examples-todomvc Skipped Skipped Nov 3, 2026 12:03am UTC
next-prisma-starter Skipped Skipped Nov 3, 2026 12:03am UTC
next-prisma-websockets-starter Skipped Skipped Nov 3, 2026 12:03am UTC
tanstack-start-sse-chat Skipped Skipped Nov 3, 2026 12:03am UTC
trpc-next-app-dir Skipped Skipped Nov 3, 2026 12:03am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4872c2b and 73ec861.

Files selected for processing: 1
  • www/src/components/sponsors/partners.tsx
Files skipped from review as they are similar to previous changes: 1
  • www/src/components/sponsors/partners.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

The site header conditionally displays a tier-ordered partner logo bar on eligible routes. The bar is hidden on excluded routes and not-found matches. Narrow viewports use additional document scroll padding.

Changes: Partner bar and responsive header

Layer / File(s) Summary
Tier-ordered partner data
www/src/sponsors.ts, www/src/sponsors.test.ts
partnersByTier exposes partners in tier order. The sponsor card uses this list for alt text, and a test checks its order against cardFooter.partners and sponsorTiers.
Route-based partner bar
www/src/partners-bar.ts, www/src/partners-bar.test.ts, www/src/components/site-header.tsx, www/src/components/sponsors/partners.tsx, www/src/styles.css
showsPartnersBar checks configured path prefixes and exclusions. The site header uses the route result to show a mobile-only bar of horizontally scrollable partner logos. Tests cover route matching and excluded-page files. Below 48rem, document scroll padding is 6.75rem.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SiteHeader
  participant showsPartnersBar
  participant PartnersBar
  SiteHeader->>showsPartnersBar: check current pathname
  showsPartnersBar-->>SiteHeader: return visibility result
  SiteHeader->>PartnersBar: render tier-ordered partner logos when visible
Loading

Possibly related PRs

  • trpc/trpc#7835: Changes sponsor footer data and partner ordering used by this partner display.
  • trpc/trpc#7821: Adds a sponsor social card that uses partner data; this change excludes sponsor pages from the partner bar.
  • trpc/trpc#7827: Adds tier-ordered partner data also used by the mobile header bar.

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 73ec8

No actionable issue remains in the supplied review scope; the change is ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding a mobile partners bar under the header on documentation and blog pages.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 6 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@pkg-pr-new

pkg-pr-new Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/@trpc/client@7841

@trpc/next

npm i https://pkg.pr.new/@trpc/next@7841

@trpc/openapi

npm i https://pkg.pr.new/@trpc/openapi@7841

@trpc/react-query

npm i https://pkg.pr.new/@trpc/react-query@7841

@trpc/server

npm i https://pkg.pr.new/@trpc/server@7841

@trpc/tanstack-react-query

npm i https://pkg.pr.new/@trpc/tanstack-react-query@7841

@trpc/upgrade

npm i https://pkg.pr.new/@trpc/upgrade@7841

commit: 73ec861

@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.

  • Fix comments: Fix CodeRabbit comments on this PR

@cursor cursor Bot changed the title feat(www): a line of partners under the header on phones feat(www): a line of partners under the header of docs and blog pages on phones Nov 2, 2026
@vercel
vercel Bot temporarily deployed to Preview – trpc-next-app-dir November 3, 2026 00:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-todomvc November 3, 2026 00:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – next-prisma-starter November 3, 2026 00:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – examples-next-minimal-starter November 3, 2026 00:01 Inactive

@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.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread www/src/components/site-header.tsx Resolved

@trpc-bot trpc-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The user approved it. CI is green at 73ec861, and both CodeRabbit threads are resolved.

@KATT
KATT added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 12bafa8 Nov 3, 2026
54 checks passed
@KATT
KATT deleted the cursor/mobile-partner-strip-a923 branch November 3, 2026 00:37
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 4, 2026

This branch was successfully deployed

1 active and 4 inactive deployments
Preview – www — 73ec861b Deployed Nov 3, 2026 by vercel[bot]
Preview – examples-next-minimal-starter — 73ec861b Deployed Nov 3, 2026 by vercel[bot]
Preview – trpc-next-app-dir — 73ec861b Deployed Nov 3, 2026 by vercel[bot]
Preview – examples-todomvc — 73ec861b Deployed Nov 3, 2026 by vercel[bot]
Preview – next-prisma-starter — 73ec861b Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants