Skip to content

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

Merged
jonrohan merged 9 commits into
mainfrom
css_modules_datatable_pagination
Jul 10, 2025
Merged

chore(DataTable.Pagination): Convert DataTable.Pagination to CSS modules#6273
jonrohan merged 9 commits into
mainfrom
css_modules_datatable_pagination

Conversation

@jonrohan

@jonrohanjonrohan commented Jul 2, 2025

Copy link
Copy Markdown
Member

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

@changeset-bot

changeset-botBot commented Jul 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90e70cc

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

This PR includes changesets to release 1 package
NameType
@primer/reactMinor

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-actionsgithub-actionsBot added the staff Author is a staff member label Jul 2, 2025
@github-actionsgithub-actionsBot 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
@github-actions

Copy link
Copy Markdown
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!

@github-actions
github-actionsBot requested a deployment to storybook-preview-6273 July 2, 2025 20:55 Abandoned
@github-actions

github-actionsBot commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js92.02 KB (0%)
packages/react/dist/browser.umd.js92.23 KB (0%)

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

Copy link
Copy Markdown

👋 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
CopilotAI review requested due to automatic review settings July 2, 2025 21:09
@jonrohan
jonrohan requested a review from a team as a code ownerJuly 2, 2025 21:09
@jonrohan
jonrohan requested a review from joshblackJuly 2, 2025 21:09

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

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.

FileDescription
packages/react/src/internal/components/ButtonReset.tsxReplaced styled-components with ButtonReset.module.css and a functional component.
packages/react/src/DataTable/Pagination.tsxSwapped out StyledPagination and inline styles for Pagination.module.css + clsx.
.changeset/polite-pandas-tie.mdAdded 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>) => {

Comment threadpackages/react/src/internal/components/ButtonReset.tsx
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6273 July 2, 2025 21:23 Inactive
@github-actionsgithub-actionsBot 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
Copy Markdown

🟢 golden-jobs completed with status success.

@github-actionsgithub-actionsBot 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

@joshblackjoshblack left a comment

Copy link
Copy Markdown
Member

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 👍

Comment threadpackages/react/src/internal/components/ButtonReset.tsx Outdated
border-end-end-radius: var(--borderRadius-medium);
}

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

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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>
@github-actions

Copy link
Copy Markdown
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!

@github-actionsgithub-actionsBot 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-actionsgithub-actionsBot 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
@github-actions

Copy link
Copy Markdown
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!

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

Copy link
Copy Markdown
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!

@github-actionsgithub-actionsBot 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 queueJul 3, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6273 July 3, 2025 22:36 Inactive
@jonrohan
jonrohan removed this pull request from the merge queue due to a manual request Jul 3, 2025
@jonrohan
jonrohan enabled auto-merge July 7, 2025 22:18
@github-actionsgithub-actionsBot 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 10, 2025
@github-actions

Copy link
Copy Markdown
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!

@jonrohan
jonrohan added this pull request to the merge queueJul 10, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6273 July 10, 2025 00:55 Inactive
Merged via the queue into main with commit 0cb9a5dJul 10, 2025
@jonrohan
jonrohan deleted the css_modules_datatable_pagination branch July 10, 2025 01:04
@primerprimerBot mentioned this pull request Jul 10, 2025
llastflowers pushed a commit that referenced this pull request Jul 23, 2025
…les (#6273)
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: primer[bot] <119360173+primer[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passingChanges in this PR do NOT cause breaking changes in gh/ghintegration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpmstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonrohan@joshblack