-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feat: pagination #7653
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
base: main
Are you sure you want to change the base?
Feat: pagination #7653
Conversation
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.
Pull Request Overview
This pull request implements pagination functionality for the Decap CMS, allowing collections to display entries in pages rather than loading all entries at once. The implementation supports both client-side and server-side pagination.
Key Changes:
- Added pagination configuration options at both global and collection levels (enabled flag and per_page setting)
- Implemented pagination state management in Redux with page size, current page, and total count tracking
- Modified backend implementations to support optional pagination parameters
- Created pagination UI component with navigation controls
- Added client-side pagination support for filtered/sorted entries
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/decap-server/src/middlewares/types.ts | Added optional pagination options to EntriesByFolderParams |
| packages/decap-server/src/middlewares/localGit/index.ts | Implemented server-side pagination with cursor metadata |
| packages/decap-server/src/middlewares/localFs/index.ts | Implemented server-side pagination with cursor metadata |
| packages/decap-server/src/middlewares/joi/index.ts | Added Joi validation schema for pagination options |
| packages/decap-cms-locales/src/en/index.js | Added English translations for pagination UI |
| packages/decap-cms-lib-util/src/implementation.ts | Updated Implementation interface to include pagination options |
| packages/decap-cms-core/src/types/redux.ts | Added pagination-related types and state definitions |
| packages/decap-cms-core/src/reducers/entries.ts | Implemented pagination state management and selectors |
| packages/decap-cms-core/src/reducers/tests/entries.spec.js | Added comprehensive pagination test cases |
| packages/decap-cms-core/src/lib/pagination.ts | Created utility functions for pagination configuration |
| packages/decap-cms-core/src/lib/immutableHelpers.ts | Added helpers for working with Immutable.js objects |
| packages/decap-cms-core/src/lib/entryHelpers.ts | Added helpers for filtering, sorting, and grouping entries |
| packages/decap-cms-core/src/components/Collection/Entries/Pagination.js | Created pagination UI component |
| packages/decap-cms-core/src/components/Collection/Entries/* | Integrated pagination into entry listing components |
| packages/decap-cms-core/src/backend.ts | Added pagination support to backend entry loading |
| packages/decap-cms-core/src/actions/entries.ts | Implemented pagination actions and updated filter/sort logic |
| packages/decap-cms-backend-test/src/implementation.ts | Updated test backend to support pagination |
| packages/decap-cms-backend-proxy/src/implementation.ts | Updated proxy backend to pass pagination options |
| packages/decap-cms-backend-github/src/implementation.tsx | Implemented pagination for GitHub backend |
| packages/decap-cms-backend-git-gateway/src/implementation.ts | Updated git-gateway to pass pagination options |
| dev-test/config.yml | Added example pagination configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/decap-cms-core/src/components/Collection/Entries/Pagination.js
Outdated
Show resolved
Hide resolved
| return (obj as { get: (k: string) => T }).get(key); | ||
| } | ||
|
|
||
| if (typeof obj === 'object' && obj !== null) { |
Copilot
AI
Nov 5, 2025
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.
Variable 'obj' is of type date, object or regular expression, but it is compared to an expression of type null.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…nation.js Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Add opt-in pagination to collections. Works with filtering and sorting, turns off when grouping. Basic tests added.