-
-
Notifications
You must be signed in to change notification settings - Fork 127
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)!: Use PAGINATION_DEFAULT_LIMIT
when limit is not provided
#673
Conversation
Reviewer's Guide by SourceryThis PR fixes a pagination issue by ensuring that Sequence diagram for applying pagination with default limitsequenceDiagram
participant Client
participant Server
participant Settings
Client->>Server: Request data with pagination
Server->>Server: Check pagination.limit
alt limit is UNSET
Server->>Settings: Get PAGINATION_DEFAULT_LIMIT
Settings-->>Server: Return default limit
end
Server->>Server: Apply pagination with limit
Server-->>Client: Return paginated data
Updated class diagram for pagination input and infoclassDiagram
class OffsetPaginationInfo {
int offset = 0
Optional~int~ limit = UNSET
}
class OffsetPaginationInput {
int offset = 0
Optional~int~ limit = UNSET
}
OffsetPaginationInput --|> OffsetPaginationInfo
note for OffsetPaginationInput "OffsetPaginationInput now inherits from OffsetPaginationInfo"
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bellini666 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
c487bc4
to
b081016
Compare
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #673 +/- ##
==========================================
- Coverage 88.98% 88.94% -0.04%
==========================================
Files 41 41
Lines 3731 3737 +6
==========================================
+ Hits 3320 3324 +4
- Misses 411 413 +2 ☔ View full report in Codecov by Sentry. |
An oversight from my side when working on #642
Fix #656
Summary by Sourcery
Fix the pagination logic to use the
PAGINATION_DEFAULT_LIMIT
setting when the limit is not explicitly provided in the pagination input. Update the pagination input and info classes to handle unset limits correctly and add tests to ensure the default limit is applied as expected.Bug Fixes:
Tests: