Skip to content

Conversation

@avivkeller
Copy link
Member

This PR moves all the partner page logic to the server side, reducing the size of the client bundle

@avivkeller avivkeller requested a review from a team as a code owner December 19, 2025 21:47
Copilot AI review requested due to automatic review settings December 19, 2025 21:47
@avivkeller avivkeller requested a review from a team as a code owner December 19, 2025 21:47
@vercel
Copy link

vercel bot commented Dec 19, 2025

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

Project Deployment Review Updated (UTC)
nodejs-org Ready Ready Preview Dec 22, 2025 10:56pm

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@github-actions

This comment was marked as off-topic.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.83%. Comparing base (1a7effb) to head (26eb6cf).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8431      +/-   ##
==========================================
+ Coverage   73.62%   73.83%   +0.20%     
==========================================
  Files         108      109       +1     
  Lines        9193     9255      +62     
  Branches      313      313              
==========================================
+ Hits         6768     6833      +65     
+ Misses       2423     2420       -3     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR successfully migrates partner page logic from client-side to server-side rendering to reduce the client bundle size. The refactoring consolidates two separate components (PartnersIconList and PartnersLogoList) into a single unified PartnersList component, updates dependency versions (Next.js 16.0.10 → 16.1.0, Vercel packages), and fixes several bugs in the Indonesian localization files.

  • Migrates partner rendering from client-side ('use client') to server-side ('use server') using Next.js 'use cache' directive
  • Consolidates PartnersIconList and PartnersLogoList into a single PartnersList component with a size prop
  • Updates type names from plural to singular (Partners → Partner, Supporters → Supporter)

Reviewed changes

Copilot reviewed 50 out of 52 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates Next.js from 16.0.10 to 16.1.0, Vercel analytics/insights packages, and related dependencies
apps/site/package.json Bumps Next.js and Vercel package versions to match lock file
apps/site/util/partners/index.tsx Removes client-side partner icon creation utilities (moved server-side)
apps/site/util/array.ts Makes shuffle function generic to work with any type, not just Partners
apps/site/types/partners.ts Renames types to singular form, removes RandomPartnerListConfig type
apps/site/next.partners.constants.tsx Removes client-side partner constants (replaced by server-side provider)
apps/site/next-env.d.ts Updates Next.js types reference path for dev environment
apps/site/next-data/providers/partners.ts Adds new server-side provider with 'use cache' directive
apps/site/next-data/generators/partners.mjs Implements server-side partner list generation with shuffling
apps/site/mdx/components.mjs Updates component exports from PartnersIconList/PartnersLogoList to PartnersList
apps/site/hooks/react-client/usePartnersList.ts Removes client-side hook (no longer needed)
apps/site/components/Common/Supporters/index.tsx Updates type reference from Supporters to Supporter
apps/site/components/Common/Partners/utils.ts Removes client-side utility functions
apps/site/components/Common/Partners/index.tsx New unified server component replacing separate icon/logo components
apps/site/components/Common/Partners/index.module.css New styles for unified component
apps/site/components/Common/Partners/PartnerButton/index.tsx New shared button component for both sizes
apps/site/components/Common/Partners/PartnerButton/index.module.css Consolidates styles from old PartnerIcon/PartnerLogo components
apps/site/components/Common/Partners/PartnersLogoList/* Removes old client-side logo list component
apps/site/components/Common/Partners/PartnersIconList/* Removes old client-side icon list component
apps/site/components/Common/Partners/PartnerLogo/* Removes old logo component
apps/site/components/Common/Partners/PartnerIcon/* Removes old icon component
apps/site/pages/*/index.mdx Updates component usage from PartnersIconList to PartnersList across all locales
apps/site/pages//download/.mdx Updates component usage from PartnersLogoList to PartnersList with size="big"
apps/site/pages/*/about/partners.mdx Updates component usage and fixes category/sort prop bugs in Indonesian locale
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 19, 2025

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 4.41 MB
New Total Size 3.98 MB
Delta -439.56 KB (-9.74%)

Changes

➕ Added Assets (9)
Name Size
.next/static/chunks/8ec131107fd1f05b.js 205.09 KB
.next/static/chunks/45b88b380febe3f1.js 101.82 KB
.next/static/chunks/7d19e315e828bf5f.js 101.82 KB
.next/static/chunks/8d389e1cd3e91770.js 27.57 KB
.next/static/chunks/a017a80ed43c7efc.js 101.82 KB
.next/static/chunks/340f0ef2ee3cd2f5.js 27.74 KB
.next/static/chunks/8288238ba8b20c26.js 561.22 KB
.next/static/chunks/74fbea75b8b661b2.js 561.22 KB
.next/static/chunks/84b4b6c5f0c7e49f.js 101.82 KB
➖ Removed Assets (10)
Name Size
.next/static/chunks/11b06735117415a7.js 204.26 KB
.next/static/chunks/472c79f905eeb9d5.js 101.79 KB
.next/static/chunks/39fc6610b9d853cf.js 101.79 KB
.next/static/chunks/83746613e033c5eb.js 27.28 KB
.next/static/chunks/c3e76e8ccf908f28.js 101.79 KB
.next/static/chunks/440c65068d6fbae2.js 27.74 KB
.next/static/chunks/c7363092071b3daf.js 767.74 KB
.next/static/chunks/11128c08875d4595.js 27.74 KB
.next/static/chunks/eb4fdb24df4a0411.js 767.74 KB
.next/static/chunks/d90f22899206d0e3.js 101.79 KB

@avivkeller avivkeller marked this pull request as draft December 19, 2025 23:56
@avivkeller
Copy link
Member Author

(Converting to Draft to implement the weight logic)

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

SGTM!

@bjohansebas bjohansebas marked this pull request as ready for review December 20, 2025 21:57
@bjohansebas
Copy link
Member

bjohansebas commented Dec 21, 2025

going back to the draft, why can't we the current solution, Or no, wait, let's wait for it to be fixed in main, and then check it here

@bjohansebas bjohansebas marked this pull request as draft December 21, 2025 22:54
@avivkeller
Copy link
Member Author

@bjohansebas I'll rebase this PR once my fix is opened + lands

@@ -0,0 +1,85 @@
'use server';
Copy link
Member

@bjohansebas bjohansebas Dec 21, 2025

Choose a reason for hiding this comment

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

now that I remember, the reason why it wasn't done on the server side, was because since we supported static export, we wanted the randomizer to keep working even if the page was static, and this was imposed in the issue, so we could make it work on the server side and still work statically, unfortunately the randomizer for the home page won't work anymore and will always show the partners in the same order 😔

Image

#7909 (comment)

so do we want to proceed with this pr?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should attempt to proceed as much as possible, and if it comes to a point where we can't, then we can't.

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.

6 participants