-
Notifications
You must be signed in to change notification settings - Fork 438
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
Prevent request with page size of 9999 #3694
Open
FrancescoMolinaro
wants to merge
17
commits into
DSpace:main
Choose a base branch
from
4Science:task/main/DURACOM-304
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
…croll instead of page size 9999
…g page size of 9999
…ion-search-tab.component)
…by removing page size of 9999
tdonohue
added
bug
performance / caching
Related to performance, caching or embedded objects
code task
claimed: 4Science
4Science team is working on this issue & will contribute back
port to dspace-7_x
This PR needs to be ported to `dspace-7_x` branch for next bug-fix release
port to dspace-8_x
This PR needs to be ported to `dspace-8_x` branch for next bug-fix release
high priority
labels
Dec 2, 2024
Hi @FrancescoMolinaro, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
claimed: 4Science
4Science team is working on this issue & will contribute back
code task
high priority
performance / caching
Related to performance, caching or embedded objects
port to dspace-7_x
This PR needs to be ported to `dspace-7_x` branch for next bug-fix release
port to dspace-8_x
This PR needs to be ported to `dspace-8_x` branch for next bug-fix release
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.
References
Fixes #2513
Description
Correct page size parameter when provided as 9999.
Affected components:
is part of dynamic form rendered as DynamicSelectModel (ng-dynamic-forms documentation ) which does not support the infinite scroll or any other pagination feature
Solution:
Retrieve the bitstream formats using recursive pagination, fetching chunks of data with 20 elements per page until all data is retrieved. All data will be available in the dropdown, allowing the bitstream type to be selected.
Solution:
Retrieved the first 10 bundles initially. If more pages are available, a "load more" button will appear. On button click, the bundles for the next page will be retrieved and appended.
Solution:
Replaced the basic HTML select element with an ngbDropdown to enable the use of the infiniteScroll directive (ngx-infinite-scroll), as other examples in the application. This necessitated refactoring the component to align with the new template.
Load of the scripts will be on demand when the scroll reaches the end of the dropdown items.
Configuration: taking 20 elements per page
Solution: Removed elementsPerPage: 9999
Elements are no longer statically defined in the final layer of the service; they are now passed as parameters from higher levels.
Solution: Figured all the values should be available all at once , so retrieved the data using recursive pagination, fetching chunks of data with 20 elements per page until all data is retrieved.
Solution:
As instructed by the existing comment , values should be available all at once , so retrieved the data using recursive pagination, fetching chunks of data with 20 elements per page until all data is retrieved.
Solution:
selectAll method using the 9999 elements per page is not used , so it is removed.
Solution:
Starting from the structure of the cc-license component, where the dropdown toggle is a separate component and options are rendered using content projection in another component, the solution would be using an RxJS operator to recursively retrieve all elements until the list is complete.
Additional point: other changes would require a more complex refactor of the component and the existing logic.
Configuration: taking 20 elements per page
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lint
npm run check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.