Skip to content
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

Add required paginationLabel prop to TablePagination component's use of Pagination component. #3393

Open
wants to merge 2 commits into
base: release-22.x
Choose a base branch
from

Conversation

MichaelRoytman
Copy link
Contributor

Description

This commit fixes a bug with the TablePagination component. This component renders the Pagination component without a paginationLabel prop, which is a required prop of the Pagination component. This commit adds a paginationLabel="table pagination"prop, which matches the prop passed to thePaginationComponentby theTablePaginationMinimal` component.

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Does your change adhere to the documented style conventions?
  • Do any prop types have missing descriptions in the Props API tables in the documentation site (check deploy preview)?
  • Were your changes tested using all available themes (see theme switcher in the header of the deploy preview, under the "Settings" icon)?
  • Were your changes tested in the example app?
  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please request an a11y review for the PR in the #wg-paragon Open edX Slack channel.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for paragon-openedx-v23 ready!

Name Link
🔨 Latest commit cc4f734
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx-v23/deploys/67927552bcfb2f0008a85db3
😎 Deploy Preview https://deploy-preview-3393--paragon-openedx-v23.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -19,6 +19,7 @@ function TablePagination() {
currentPage={pageIndex + 1}
onPageSelect={(pageNum) => gotoPage(pageNum - 1)}
pageCount={pageCount}
paginationLabel="table pagination"
Copy link
Member

Choose a reason for hiding this comment

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

[consider] It may make sense to define the paginationLabel string as an i18n-compatible string so it's properly translated for non-English locales; the same could apply to the existing paginationLabel passed via TablePaginationMinimal.

For example, defining the table pagination string with defineMessages and using intl.formatMessage to return the translated message to the paginationLabel prop.

@MichaelRoytman MichaelRoytman changed the base branch from release-23.x to release-22.x January 23, 2025 18:35
… use of Pagination component

This commit fixes a bug with the TablePagination component. This component renders the Pagination component without a paginationLabel prop, which is a required prop of the Pagination component. This commit adds a paginationLabel="table pagination" prop, which matches the prop passed to the PaginationComponent by the TablePaginationMinimal component.
@MichaelRoytman MichaelRoytman force-pushed the michaelroytman/TablePagination-paginationLabel-prop-missing branch from cc4f734 to fc2baed Compare January 23, 2025 21:06
Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for paragon-openedx-v22 failed. Why did it fail? →

Name Link
🔨 Latest commit fc2baed
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx-v22/deploys/6792af546b97da0008dc694f

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.45%. Comparing base (5c53137) to head (fc2baed).
Report is 14 commits behind head on release-22.x.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-22.x    #3393      +/-   ##
================================================
+ Coverage         93.42%   93.45%   +0.03%     
================================================
  Files               250      252       +2     
  Lines              4515     4522       +7     
  Branches           1017     1052      +35     
================================================
+ Hits               4218     4226       +8     
+ Misses              294      289       -5     
- Partials              3        7       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants