Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 3, 2025

Reintroduces #6872 but without PageHeader and PageFooter styled wrappers (not needed and doesn't play well with slots)

Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: fca3c90

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

@github-actions github-actions bot added the staff Author is a staff member label Oct 3, 2025
Copy link
Contributor

github-actions bot commented Oct 3, 2025

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

@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 Oct 3, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6942 October 3, 2025 16:00 Inactive
@primer-integration
Copy link

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

@github-actions github-actions bot added integration-tests: failing Changes in this PR 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 Oct 6, 2025
@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: failing Changes in this PR cause breaking changes in gh/gh labels Oct 6, 2025
@francinelucca francinelucca marked this pull request as ready for review October 6, 2025 19:29
@francinelucca francinelucca requested a review from a team as a code owner October 6, 2025 19:29
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 favor of native HTML elements and CSS classes. This continues the migration away from styled-components in the Primer Design System's React implementation while maintaining backward compatibility through the styled-react wrapper package.

Key changes:

  • Replace Box/BoxWithFallback components with native HTML elements (div, header, footer)
  • Remove sx prop support from all PageLayout subcomponents
  • Add CSS classes for styling previously handled by sx props
  • Update styled-react package to provide sx prop compatibility layer

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/styled-react/src/index.tsx Updates export to use local PageLayout implementation instead of re-exporting from @primer/react
packages/styled-react/src/components/PageLayout.tsx Adds styled wrapper components that preserve sx prop functionality for backward compatibility
packages/styled-react/src/tests/primer-react.browser.test.tsx Removes tests for Header and Footer sx prop support (now handled by styled wrappers)
packages/react/src/PageLayout/PageLayout.tsx Replaces Box components with native HTML elements and removes sx prop from all interfaces
packages/react/src/PageLayout/PageLayout.stories.tsx Removes sx prop usage from story template
packages/react/src/PageLayout/PageLayout.module.css Adds CSS classes for draggable handle styling previously handled by sx props
packages/react/src/PageLayout/PageLayout.dev.stories.tsx Replaces sx prop usage with CSS class names for debug styling
packages/react/src/PageLayout/PageLayout.dev.stories.module.css Adds CSS classes for debug styling previously handled by sx props
.changeset/gold-geckos-send.md Documents breaking change for sx prop removal

@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 Oct 6, 2025
Copy link
Contributor

github-actions bot commented Oct 6, 2025

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

Copy link
Contributor

@llastflowers llastflowers left a comment

Choose a reason for hiding this comment

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

@francinelucca francinelucca added this pull request to the merge queue Oct 6, 2025
@francinelucca
Copy link
Member Author

@github-actions github-actions bot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 6, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit 3ced917 Oct 6, 2025
42 checks passed
@francinelucca francinelucca deleted the revert-6940-chore/revert-6872 branch October 6, 2025 23:19
@primer primer bot mentioned this pull request Oct 6, 2025
llastflowers pushed a commit that referenced this pull request Oct 6, 2025
pksjce pushed a commit that referenced this pull request Oct 7, 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 staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants