-
Notifications
You must be signed in to change notification settings - Fork 56
Update Docs to use React v19 #1210
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
Conversation
|
🟢 No design token changes found |
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
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 updates the next-docs app to support React 19 by upgrading React, Next.js, Doctocat, and Primer React to their latest versions. The major change involves removing the styled-components dependency and refactoring color-scale components to use CSS modules instead of the @primer/react Box component with sx prop.
Key changes:
- Upgraded React from 18.x to 19.x support (>=18 <= 19)
- Upgraded @primer/react from 37.11.2 to 38.6.1 (which no longer requires styled-components)
- Refactored ColorThemePicker and ColorScales components to use CSS modules
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| apps/next-docs/package.json | Updated dependency versions for React 19, Next.js 15.5.9, @primer/react 38.6.1, @primer/doctocat-nextjs 0.8.0; removed styled-components and motion-dom override |
| apps/next-docs/package-lock.json | Lockfile updates reflecting dependency changes and transitive dependency updates |
| apps/next-docs/src/components/color-scales/ColorThemePicker.js | Refactored from @primer/react Box/sx to native HTML elements with CSS module classes |
| apps/next-docs/src/components/color-scales/ColorScales.js | Refactored from @primer/react Box/sx to native div elements with CSS module classes |
| apps/next-docs/src/components/color-scales/ColorScales.module.css | New CSS module file containing styles previously defined via styled-system sx prop |
| apps/next-docs/content/components/Label/index.mdx | Removed unused @primer/react Box import |
apps/next-docs/src/components/color-scales/ColorScales.module.css
Outdated
Show resolved
Hide resolved
apps/next-docs/src/components/color-scales/ColorScales.module.css
Outdated
Show resolved
Hide resolved
rezrah
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.
LGTM 🚀
Co-authored-by: Rez <[email protected]>
Co-authored-by: Rez <[email protected]>
|
@danielguillan i just remembered that we can now start hoisting the dependencies again in the root: https://github.com/primer/brand/blob/main/package.json#L26 So you can remove this line, and run npm i again, it'll bring apps/next-docs deps back to the root node_modules. |
Summary
Towards https://github.com/github/primer/issues/6134. Updates React, NextJS, Doctocat, and Primer React to latest versions in docs.
List of notable changes:
@primer/doctocat-nextjsfrom 0.7.0 to 0.8.0@primer/reactfrom 37.11.2 to 38.6.1nextfrom 15.5.2 to 15.5.9styled-componentsdependency (no longer required by @primer/react 38.x)motion-domoverride (no longer needed)What should reviewers focus on?
Supporting resources (related issues, external links, etc):