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 #4537

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

refactor: pagination #4537

wants to merge 4 commits into from

Conversation

lisalupi
Copy link
Contributor

@lisalupi lisalupi commented Dec 4, 2024

Summary

Type

  • Refactor

Summarise concisely:

What is expected?

Refactor and enhancement of <Pagination /> :

  • Number of results on the bottom left
  • Number of items to display
  • Styling

The following changes where made:

Relevant logs and/or screenshots

Page Before After
url Capture d’écran 2024-12-04 à 16 00 36 Capture d’écran 2024-12-04 à 16 00 02
url Capture d’écran 2024-12-04 à 16 02 06 Capture d’écran 2024-12-04 à 16 01 17

PerPage :
Capture d’écran 2024-12-04 à 16 02 54

@lisalupi lisalupi added the refactor Refactor without breaking changes label Dec 4, 2024
@lisalupi lisalupi requested a review from a team December 4, 2024 15:03
@lisalupi lisalupi self-assigned this Dec 4, 2024
@lisalupi lisalupi requested a review from matthprost as a code owner December 4, 2024 15:03
@lisalupi lisalupi requested review from johnrazeur and DorianMaliszewski and removed request for a team December 4, 2024 15:03
Copy link

changeset-bot bot commented Dec 4, 2024

🦋 Changeset detected

Latest commit: f446dc4

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

This PR includes changesets to release 3 packages
Name Type
@ultraviolet/ui Minor
@ultraviolet/form Patch
@ultraviolet/plus Patch

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

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.71%. Comparing base (9d27e8b) to head (f446dc4).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4537      +/-   ##
==========================================
+ Coverage   87.58%   87.71%   +0.12%     
==========================================
  Files         335      337       +2     
  Lines       12803    12873      +70     
  Branches     3531     3556      +25     
==========================================
+ Hits        11213    11291      +78     
+ Misses       1590     1582       -8     
Files with missing lines Coverage Δ
...ui/src/components/Pagination/PaginationButtons.tsx 100.00% <100.00%> (ø)
packages/ui/src/components/Pagination/PerPage.tsx 100.00% <100.00%> (ø)
...onents/Pagination/__tests__/getPageNumbers.test.ts 100.00% <100.00%> (ø)
...src/components/Pagination/__tests__/index.test.tsx 100.00% <100.00%> (+13.15%) ⬆️
...ges/ui/src/components/Pagination/getPageNumbers.ts 100.00% <100.00%> (ø)
packages/ui/src/components/Pagination/index.tsx 100.00% <100.00%> (+5.55%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0266269...f446dc4. Read the comment docs.

Copy link
Collaborator

@matthprost matthprost left a comment

Choose a reason for hiding this comment

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

You have some issues with your coverage, it seems that you are calling onChange in the test without using vi.fn(). I think this is what makes the codecov broken

@matthprost matthprost requested a review from mhervouet December 5, 2024 13:55
@mhervouet
Copy link

For pagination with item number per page, the size should be small for selectInput and Buttons

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

Successfully merging this pull request may close these issues.

7 participants