Draft
Conversation
Contributor
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Variable 'obj' is of type date, object or regular expression, but it is compared to an expression of type null.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nation.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add opt-in pagination to collections. Works with filtering and sorting, turns off when grouping. Basic tests added.