-
Notifications
You must be signed in to change notification settings - Fork 20
Update query parameters to Dataset&File Version Summaries use case #886
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
Update query parameters to Dataset&File Version Summaries use case #886
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 PR updates the file and dataset version summaries API to support pagination by introducing limit and offset parameters. The changes update the @iqss/dataverse-client-javascript dependency to version 2.1.0-pr395.061ad8e which provides pagination support for version summaries.
Key changes:
- Introduces
FileVersionSummarySubsetandDatasetVersionSummarySubsetinterfaces that wrap summaries with atotalCountfield - Updates repository methods to accept optional
limitandoffsetparameters for pagination - Updates all test mocks to return the new subset structure
Reviewed Changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates the dataverse-client-javascript dependency to version with pagination support |
| package-lock.json | Updates lock file for the new dependency version |
| src/files/domain/models/FileVersionSummaryInfo.ts | Adds FileVersionSummarySubset interface |
| src/dataset/domain/models/DatasetVersionSummaryInfo.ts | Adds DatasetVersionSummarySubset interface |
| src/files/domain/repositories/FileRepository.ts | Updates getFileVersionSummaries signature with pagination parameters |
| src/dataset/domain/repositories/DatasetRepository.ts | Updates getDatasetVersionsSummaries signature with pagination parameters |
| src/files/domain/useCases/getFileVersionSummaries.ts | Updates use case to pass pagination parameters |
| src/dataset/domain/useCases/getDatasetVersionsSummaries.ts | Updates use case to pass pagination parameters |
| src/files/infrastructure/FileJSDataverseRepository.ts | Implements pagination parameters in repository |
| src/dataset/infrastructure/repositories/DatasetJSDataverseRepository.ts | Implements pagination parameters in repository |
| src/sections/file/file-version/useGetFileVersionsSummaries.ts | Updates hook to support pagination and extract summaries from subset |
| src/sections/dataset/dataset-versions/useGetDatasetVersionsSummaries.ts | Updates hook to support pagination and extract summaries from subset |
| src/stories/file/FileMockRepository.ts | Updates mock to return FileVersionSummarySubset |
| src/stories/dataset/DatasetMockRepository.ts | Updates mock to return DatasetVersionSummarySubset |
| src/stories/dataset/DatasetLoadingMockRepository.ts | Updates mock signature for pagination |
| src/stories/dataset/DatasetErrorMockRepository.ts | Updates mock signature for pagination |
| src/stories/dataset/deaccession-dataset/DeaccessionDatasetModal.stories.tsx | Updates story to return new subset structure |
| tests/component/dataset/domain/models/DatasetVersionsSummariesMother.ts | Updates test data factory to return subset structure |
| All test files | Updates test mocks to return new subset structures with totalCount |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ekraffmiller
left a comment
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.
looks good! just a suggestion about using a pagination param in the definition of the use case.
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
Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
ekraffmiller
left a comment
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.
looks good, approved!
|
all tests pass and no merge conflicts, ok to merge |
What this PR does / why we need it:
Based on JS-dataverse changes about Adding pagination query parameters to Dataset&File Version Summaries use case IQSS/dataverse-client-javascript#395
This PR adds pagination support to the Dataset and File Version Summaries use cases by introducing optional limit and offset query parameters. This allows clients to retrieve version summaries in paginated chunks rather than loading all versions at once.
Front-end also needs to update these use cases accordingly
Which issue(s) this PR closes:
Special notes for your reviewer:
Suggestions on how to test this:
it should be good if all checks pass, no ui change
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
no
Is there a release notes or changelog update needed for this change?:
yes, breaking change
Additional documentation: