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

refactor: pagination #1514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

refactor: pagination #1514

wants to merge 1 commit into from

Conversation

renrizzolo
Copy link
Contributor

@renrizzolo renrizzolo commented Oct 25, 2022

Description

Refactor pagination component to calculate the range and map it

  • ensure the arrow buttons don't move around after clicking
  • add some accessible labels
  • add siblingCount prop to increase visible page range
  • add some clamping to prevent unexpected results
  • small css / ui tweaks

Does this PR introduce a breaking change?

  • Yes
  • No

Manual testing step?

Screenshots

New:
Kapture 2022-10-25 at 15 07 00

Old:
Kapture 2022-10-25 at 15 11 21

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Merging #1514 (da729a3) into master (21057bc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1514   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           97        97           
  Lines         1604      1609    +5     
  Branches       452       442   -10     
=========================================
+ Hits          1604      1609    +5     
Impacted Files Coverage Δ
src/components/Pagination/index.jsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@renrizzolo renrizzolo force-pushed the refactor-pagination branch 2 times, most recently from 5e46cac to 51b8eea Compare October 27, 2022 00:59
@renrizzolo renrizzolo force-pushed the refactor-pagination branch 2 times, most recently from e670c5d to ebe03cb Compare November 18, 2022 00:09
@sonarcloud
Copy link

sonarcloud bot commented Nov 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Dec 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

1 participant