-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: server-side render partners #8431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe 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! 🙏 |
|
Note Your Pull Request seems to be updating Translations of the Node.js Website. Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project. Thank you! |
8ad98bd to
94156e9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8431 +/- ##
==========================================
+ Coverage 73.64% 73.84% +0.19%
==========================================
Files 107 108 +1
Lines 9161 9215 +54
Branches 312 312
==========================================
+ Hits 6747 6805 +58
+ Misses 2412 2408 -4
Partials 2 2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this 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
sizeprop - 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.
📦 Build Size ComparisonSummary
Changes➕ Added Assets (11)
➖ Removed Assets (11)
|
|
(Converting to Draft to implement the weight logic) |
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM!
|
cc @nodejs/marketing, as this changes the algorithm from randomly displaying partners to sorting partners based on their position in the JSON file. Their position in the JSON file has been dictated by the previous |
This PR moves all the partner page logic to the server side, reducing the size of the client bundle