Repository navigation
feat(www): a line of partners under the header of docs and blog pages on phones - #7841
Conversation
Co-authored-by: alexander <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
No actionable comments were generated in the recent review.
|
| 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
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: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull 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.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
@trpc/client
@trpc/next
@trpc/openapi
@trpc/react-query
@trpc/server
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
…lide it in and out Co-authored-by: alexander <[email protected]>
Co-authored-by: alexander <[email protected]>
|
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. |
Why
PartnersStrip), since the side column (PartnersRail) only appears atxl.What
New
PartnersBar: one 36px line inside the stickySiteHeader, belowmdonly. 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.h-3.5), grayscale and muted, and turn full colour on hover, like the hero's "Supported by".rel="sponsored noopener", a new tab, and the blurb as the title.Only on reading pages.
partners-bar.tsholds an explicit allowlist of path prefixes, plus a short list of excluded pages:/docs/…in every version (v11,/docs/v10/…,/docs/v9/…)/: the hero and the sponsors section already show the partners/blogand/blog/…/sponsorand 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/404, and any docs or blog URL that doesn't exist (any route match that's "not found")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.
prefers-reduced-motion, it switches at once.inert, so its links can't be focused or reached by screen readers.scroll-padding-topis 6.75rem belowmdonly while the bar shows (html:has([data-partners-bar='shown'])), and 4.5rem otherwise, so anchored headings land below the header either way.sponsors.tsexportspartnersByTier, the tier-ordered list the cards already used, so the bar and/sponsor's card alt text share it.Desktop (
mdand up) is unchanged.Why it doesn't shift or cover anything:
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)
Mobile screenshots (390×844)
More pages, after:
/media(no bar)/search(no bar)At 320px, where it scrolls, and in dark mode:
A logo focused from the keyboard (bottom), and the line without focus (top):
Scrolling a docs page, then opening the menu
Before:
After:
Links
Open these on a phone, or in a window narrower than 768px.
Alternatives considered
transforminstead ofheight. 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.topoffset and z-index, and could drift from the header. A row inside the header can't overlap it.Testing
partners-bar.test.ts:/sponsor,/media,/search,/404, the docs sponsors pages, and look-alike paths (/docsearch,/blogroll) don't.sponsors.test.ts:partnersByTierlists every partner in the cards' order, gold first.pnpm vitest run(www),pnpm lint,tsc --noEmit,oxfmt --checkandpnpm buildall pass.vite preview, 390×844 mobile:/sponsor, the docs sponsors page,/media,/search,/404and a missing docs page. The header is 93px with the bar and 57px without, andscroll-padding-topfollows it./docs/quickstart#installationand/blog/announcing-trpc-v11#overview-of-changesboth land 15px below the header. A search result for a heading, opened from/,/sponsoror a docs page, lands 15px below too.AI model
Claude Opus 5.5
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit