Skip to content

Conversation

mperrotti
Copy link
Contributor

@mperrotti mperrotti commented Sep 17, 2025

Relates to https://github.com/github/primer/issues/5424 and https://github.com/github/primer/issues/5425
Closes https://github.com/github/primer/issues/5796

Changelog

New

Changed

sx prop was removed from PageLayout and its subcomponents

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@mperrotti mperrotti requested a review from a team as a code owner September 17, 2025 22:38
@mperrotti mperrotti requested review from Copilot and pksjce September 17, 2025 22:38
Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: 52adc31

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Major
@primer/styled-react Major

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

@Copilot 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 removes Box component usage and the sx prop from PageLayout components in Primer React, migrating from styled-components to CSS Modules. The changes support the broader migration from the styled-system approach to a more modern CSS-based implementation.

  • Replaces BoxWithFallback components with native HTML elements (div, header, footer)
  • Removes sx prop from all PageLayout component interfaces and implementations
  • Adds new styled-react wrapper for backward compatibility during the migration period

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/styled-react/src/sx.ts New utility for handling sx prop in styled-react package
packages/styled-react/src/index.tsx Adds PageLayout export and removes it from main exports
packages/styled-react/src/components/PageLayout.tsx New styled-react wrapper providing sx prop compatibility
packages/react/src/PageLayout/PageLayout.tsx Removes Box usage, sx prop, and migrates to native HTML elements
packages/react/src/PageLayout/PageLayout.stories.tsx Removes sx prop from story args
packages/react/src/PageLayout/PageLayout.module.css Adds CSS classes for draggable handle styling
packages/react/src/PageLayout/PageLayout.dev.stories.tsx Replaces sx prop usage with CSS classes
packages/react/src/PageLayout/PageLayout.dev.stories.module.css New CSS classes for development story styling

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Sep 17, 2025
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3156

@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Sep 24, 2025
Copy link
Contributor

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@francinelucca francinelucca added this pull request to the merge queue Sep 26, 2025
Merged via the queue into main with commit 4e797ef Sep 26, 2025
42 of 43 checks passed
@francinelucca francinelucca deleted the mp/rm-box-and-sx-from-pagelayout branch September 26, 2025 21:01
@primer primer bot mentioned this pull request Sep 26, 2025
jonrohan added a commit that referenced this pull request Oct 1, 2025
francinelucca added a commit that referenced this pull request Oct 3, 2025
francinelucca added a commit that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants