Skip to content

Conversation

@martinjagodic
Copy link
Member

Add opt-in pagination to collections. Works with filtering and sorting, turns off when grouping. Basic tests added.

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 5, 2025
@martinjagodic martinjagodic requested a review from Copilot November 5, 2025 11:32
Copy link
Contributor

Copilot AI left a 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.

return (obj as { get: (k: string) => T }).get(key);
}

if (typeof obj === 'object' && obj !== null) {
Copy link

Copilot AI Nov 5, 2025

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature code contributing to the implementation of a feature and/or user facing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants