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

[feature] Added relay-style pagination to tasks query #418

Merged
merged 7 commits into from
Jan 1, 2024

Conversation

KCarretto
Copy link
Collaborator

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Enables relay-style pagination for tasks query.

Which issue(s) this PR fixes:

Fixes #371

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9f9f863) 71.17% compared to head (6041e6b) 71.13%.

Files Patch % Lines
tavern/internal/ent/schema/task.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   71.17%   71.13%   -0.05%     
==========================================
  Files         109      109              
  Lines        8084     8089       +5     
==========================================
  Hits         5754     5754              
- Misses       2221     2226       +5     
  Partials      109      109              

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

@cmp5987 cmp5987 requested a review from hulto January 1, 2024 20:37
@cmp5987
Copy link
Collaborator

cmp5987 commented Jan 1, 2024

Added UI for pagination:

  • Modified task filters to use the beacon filter bar
  • Added pagination 'next' and 'previous button and current page info to the table.

Expected Behavior:

  • Initial tasks are limited to '8' results, then you can click 'next' to view more data.
  • Previous is disabled when you are on the first set of data
  • Page gets reset to '1' when you change filters or search terms
  • Default sort is based on lastModifiedAt returning the most recently modified tasks.

Screenshot:

Screenshot 2024-01-01 at 3 35 35 PM Screenshot 2024-01-01 at 3 35 41 PM ot:

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

LGTM - seems to work in staging.

@cmp5987 cmp5987 merged commit 4ddf982 into main Jan 1, 2024
6 of 8 checks passed
@cmp5987 cmp5987 deleted the entgo-paginate-tasks branch January 1, 2024 22:32
KCarretto added a commit that referenced this pull request Feb 1, 2024
 
[feature] Added relay-style pagination to tasks query (#418)

* Added relay-style pagination to tasks query

* feat(pagination): Add pagination for task page

* fix(last): Bug fix to add last handling to pagination

* fix(rowLimit): Change row limit

* fix(count): Change counts for table to pages

* fix(build): Run npm build

---------

Co-authored-by: Squidli <catie@squidli.com>
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.

Implement pagination
3 participants