Skip to content

chore: upgrade @primer/react to v38 - #505

Merged
Miablo merged 1 commit into
github-community-projects:mainfrom
Miablo:deps/primer-react-v38
Sep 22, 2026
Merged

Miablo merged 1 commit into
github-community-projects:mainfrom
Miablo:deps/primer-react-v38

Conversation

@Miablo

@Miablo Miablo commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

  • Upgrades @primer/react 36.27.0 → 38.39.0 and @primer/octicons-react to 19.35.0
  • Primer v38 removes the library's dependency on styled-components, which drops support for the sx prop and styled-system props — migrates every affected component off sx to CSS Modules
  • New .module.css files added alongside each migrated component, plus a shared src/app/styles/shared.module.css for common auth-card styling
  • No component behavior changes — this is a styling-mechanism migration only

Addresses the @primer/react v38 step of the dependency upgrade plan in #412.

Working UI post-changes

Screenshot 2026-09-12 at 9 08 29 PM Screenshot 2026-09-12 at 9 58 46 PM Screenshot 2026-09-12 at 9 59 06 PM Screenshot 2026-09-12 at 9 59 11 PM

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run npm run format and fix any formatting issues that have been introduced
  • run npm run lint and fix any linting issues that have been introduced
  • run npm run test and run tests

@Miablo Miablo self-assigned this Sep 13, 2026
@Miablo
Miablo marked this pull request as ready for review September 13, 2026 23:24
@Miablo
Miablo requested review from a team as code owners September 13, 2026 23:24
@Miablo
Miablo enabled auto-merge September 13, 2026 23:25

@wrslatz wrslatz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a few questions to discuss, but no blockers to this PR. This puts the project in a much better state. Thanks @Miablo for taking this on!


const DashLayout = ({ children }: { children: React.ReactNode }) => {
return <Box>{children}</Box>
return <>{children}</>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this swap to div like other Box uses did?

@@ -0,0 +1,31 @@
.fieldMarginBottom {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We may want to add a CSS linter to this repo now, if there is not already one.

</Box>
<Box sx={{ textAlign: 'center' }}>
<Text sx={{ fontSize: '1', color: 'fg.muted' }}>
<div className={sharedStyles.authCard}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These components are also much more readable this way

Comment thread src/app/page.tsx
import { Avatar, Box, Link, Octicon, Stack } from '@primer/react'
import { Blankslate, DataTable, Table } from '@primer/react/drafts'
import { Avatar, Link, Stack } from '@primer/react'
import { Blankslate, DataTable, Table } from '@primer/react/experimental'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How much do we want to depend on experimental components? I guess if we're already using the equivalent currently then it makes sense

Comment thread src/app/page.tsx
</Stack>
)
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks for cleaning these up along the way!

@Miablo
Miablo merged commit 8edd7d1 into github-community-projects:main Sep 22, 2026
11 checks passed
@wrslatz

wrslatz commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Forgot to ask if this should be released. I guess we can release after the other dependency updates land?

@Miablo

Miablo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Forgot to ask if this should be released. I guess we can release after the other dependency updates land?

Not sure! What do you think?

I'm good with releasing each one since they work independently but releasing together also makes sense.

@riley-kohler -- do you have a preference?

@riley-kohler

riley-kohler commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

My preference is generally to always release if possible (continuous deployment mentality). It really sucks when an open source project has changes that you want for whatever reason that are merged but not published. It's a hassle to release if a change was merged without the release tag but we should make sure the next PR releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants