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

fix: pagination nav adjacent double ellipses #17779

Conversation

riddhybansal
Copy link
Contributor

Closes #17628

Fix pagination nav adjacent ellipses

Changelog

New

  • Added logic and test case for page ===0

Testing / Reviewing

Render with props itemsShown = 4, totalItems = something >= 10
Select a page from the ellipses
Select the first page
There should not be adjacent elleipses

@riddhybansal riddhybansal requested a review from a team as a code owner October 17, 2024 11:59
Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 2c16742
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/671632cb87829100088e17b2
😎 Deploy Preview https://deploy-preview-17779--v11-carbon-web-components.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.

Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2c16742
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/671632cbdf746a000843d882
😎 Deploy Preview https://deploy-preview-17779--carbon-elements.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.

Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4345adb
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6710fc2e5701d20008636b01
😎 Deploy Preview https://deploy-preview-17779--v11-carbon-react.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.

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.93%. Comparing base (c1c8a8b) to head (2c16742).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17779      +/-   ##
==========================================
+ Coverage   79.86%   79.93%   +0.07%     
==========================================
  Files         406      406              
  Lines       14012    14012              
  Branches     4333     4381      +48     
==========================================
+ Hits        11190    11200      +10     
+ Misses       2657     2647      -10     
  Partials      165      165              

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

Copy link

netlify bot commented Oct 17, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2c16742
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/671632cb3196020008a071ce
😎 Deploy Preview https://deploy-preview-17779--v11-carbon-react.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.

@thyhmdo thyhmdo requested review from thyhmdo and removed request for thyhmdo October 17, 2024 13:40
@guidari
Copy link
Contributor

guidari commented Oct 17, 2024

Hey @riddhybansal
I pull down locally to check the test. It is passing regarding it has the fix or not.

I guess the best way to test that is to replicate the behaviour we did together while testing the fix.

  • Click on PaginationOverflow to page 6.
  • Click on the first PaginationOverflow to page 1
  • Check if the page 2 is visible, which means the first PaginationOverflow is not being rendered as expected

I'm happy to pair on that if needed.

@riddhybansal riddhybansal requested a review from thyhmdo October 17, 2024 14:20
Copy link
Member

@thyhmdo thyhmdo left a comment

Choose a reason for hiding this comment

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

Looks great!

@riddhybansal riddhybansal force-pushed the ellipses_issue_pagination_nav branch from dcf227f to 5932df9 Compare October 21, 2024 10:52
@riddhybansal
Copy link
Contributor Author

Hey @riddhybansal I pull down locally to check the test. It is passing regarding it has the fix or not.

I guess the best way to test that is to replicate the behaviour we did together while testing the fix.

  • Click on PaginationOverflow to page 6.
  • Click on the first PaginationOverflow to page 1
  • Check if the page 2 is visible, which means the first PaginationOverflow is not being rendered as expected

I'm happy to pair on that if needed.

Yeah , Got what you are saying .. Added the test case for more clear testing !! This is indirectly testing the overflow menu behaviour in the pagination nav also. Please check and do let me know !!

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM 🚀

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

LGTM!

@alisonjoseph alisonjoseph added this pull request to the merge queue Oct 21, 2024
Merged via the queue into carbon-design-system:main with commit df8787e Oct 21, 2024
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pagination] Fix Adjacent ellipses in PaginationNav
4 participants