Skip to content

Conversation

@danielguillan
Copy link
Contributor

@danielguillan danielguillan commented Dec 17, 2025

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:

  • Upgrade @primer/doctocat-nextjs from 0.7.0 to 0.8.0
  • Upgrade @primer/react from 37.11.2 to 38.6.1
  • Upgrade next from 15.5.2 to 15.5.9
  • Update React version constraints to support React 18 and 19
  • Remove styled-components dependency (no longer required by @primer/react 38.x)
  • Remove motion-dom override (no longer needed)
  • Refactor color-scales components to use CSS modules instead of @primer/react Box with sx prop

What should reviewers focus on?

Supporting resources (related issues, external links, etc):

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

⚠️ No Changeset found

Latest commit: a845027

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@danielguillan danielguillan changed the title Update React, Doctocat, and Primer React to latest versions Update Docs to use React v19 Dec 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

🟢 No design token changes found

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@danielguillan danielguillan marked this pull request as ready for review December 18, 2025 11:03
@danielguillan danielguillan requested a review from a team as a code owner December 18, 2025 11:03
Copilot AI review requested due to automatic review settings December 18, 2025 11:03
Copy link

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

@danielguillan danielguillan requested a review from rezrah December 18, 2025 14:39
Copy link
Collaborator

@rezrah rezrah left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@rezrah
Copy link
Collaborator

rezrah commented Dec 18, 2025

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

@danielguillan danielguillan merged commit 022e010 into main Dec 19, 2025
22 checks passed
@danielguillan danielguillan deleted the danielguillan/upgrade-docs-react-v19 branch December 19, 2025 09:01
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.

3 participants