Skip to content

chore(DataTable.Pagination): Convert DataTable.Pagination to CSS modules #6273

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Jul 2, 2025

This converts the DataTable.Pagination component to CSS modules. This was overlooked in the original migration.

Changelog

New

Changed

Converts styled-component styling to CSS modules.

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

Copy link

changeset-bot bot commented Jul 2, 2025

🦋 Changeset detected

Latest commit: 421bad1

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

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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 Jul 2, 2025
@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 Jul 2, 2025
Copy link
Contributor

github-actions bot commented Jul 2, 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 requested a deployment to storybook-preview-6273 July 2, 2025 20:55 Abandoned
Copy link
Contributor

github-actions bot commented Jul 2, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.39 KB (-0.04% 🔽)
packages/react/dist/browser.umd.js 92.49 KB (-0.07% 🔽)

@github-actions github-actions bot requested a deployment to storybook-preview-6273 July 2, 2025 21:04 Abandoned
@primer-integration
Copy link

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

@jonrohan jonrohan marked this pull request as ready for review July 2, 2025 21:09
@Copilot Copilot AI review requested due to automatic review settings July 2, 2025 21:09
@jonrohan jonrohan requested a review from a team as a code owner July 2, 2025 21:09
@jonrohan jonrohan requested a review from joshblack July 2, 2025 21:09
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 converts the styling of the DataTable.Pagination component (and the internal ButtonReset component) from styled-components to CSS modules.

  • Replaces the styled-components-based ButtonReset with a functional component that applies a CSS module and clsx.
  • Migrates all pagination-related styles in DataTable.Pagination to a CSS module, replacing StyledPagination and scoped class names.
  • Adds a changeset entry for a minor release.

Reviewed Changes

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

File Description
packages/react/src/internal/components/ButtonReset.tsx Replaced styled-components with ButtonReset.module.css and a functional component.
packages/react/src/DataTable/Pagination.tsx Swapped out StyledPagination and inline styles for Pagination.module.css + clsx.
.changeset/polite-pandas-tie.md Added changeset marking the minor version bump for this chore.
Files not reviewed (2)
  • packages/react/src/DataTable/Pagination.module.css: Language not supported
  • packages/react/src/internal/components/ButtonReset.module.css: Language not supported
Comments suppressed due to low confidence (1)

packages/react/src/internal/components/ButtonReset.tsx:11

  • Missing import of React for using React.PropsWithChildren and React.ButtonHTMLAttributes. Please add import type React from 'react' at the top.
}: React.PropsWithChildren & React.ButtonHTMLAttributes<HTMLButtonElement>) => {

@github-actions github-actions bot temporarily deployed to storybook-preview-6273 July 2, 2025 21:23 Inactive
@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 Jul 2, 2025
@jonrohan jonrohan enabled auto-merge July 2, 2025 23:59
@primer-integration
Copy link

🟢 golden-jobs 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 Jul 3, 2025
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Just one suggestion for the ButtonReset but otherwise LGTM 👍

border-end-end-radius: var(--borderRadius-medium);
}

@media ((max-width: calc(768px - 0.02px))) {
Copy link
Member

Choose a reason for hiding this comment

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

Completely separate from the refactor, would this be something we would ever want a container query for now that we can use them or is this best tied to the viewport range? (Was just curious)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think this was a bit verbose and would love either media query variables here or container queries.

Co-authored-by: Josh Black <joshblack@github.com>
Copy link
Contributor

github-actions bot commented Jul 3, 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!

@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 Jul 3, 2025
@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 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!

@github-actions github-actions bot requested a deployment to storybook-preview-6273 July 3, 2025 16:31 Abandoned
@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 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!

@github-actions github-actions bot requested a deployment to storybook-preview-6273 July 3, 2025 16:34 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-6273 July 3, 2025 17:18 Abandoned
@github-actions github-actions bot requested a deployment to storybook-preview-6273 July 3, 2025 17:58 Abandoned
@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 Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 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!

@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 Jul 3, 2025
@jonrohan jonrohan added this pull request to the merge queue Jul 3, 2025
@jonrohan jonrohan removed this pull request from the merge queue due to a manual request Jul 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 staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants