-
Notifications
You must be signed in to change notification settings - Fork 433
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
Fixed pagination issues on item mapper #2642
Fixed pagination issues on item mapper #2642
Conversation
Hi @alexandrevryghem, |
…per-pagination_contribute-main # Conflicts: # src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts
My colleague (Sutya Miklós (QULTO)) has tested it yesterday:
|
@kanasznagyzoltan: This is another issue see #2953 but I already created a fix for this and was planning to contribute it to this PR later today |
Thank you for the info! |
…ll the components gave the incorrect type of data to it
…me changes are detected
…ery time changes are detected
…fix-broken-item-mapper-pagination_contribute-main # Conflicts: # src/app/access-control/bulk-access/browse/bulk-access-browse.component.html # src/app/access-control/epeople-registry/epeople-registry.component.html # src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html # src/app/access-control/group-registry/group-form/members-list/members-list.component.html # src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.html # src/app/process-page/overview/process-overview.component.html # src/app/shared/object-select/collection-select/collection-select.component.html # src/app/shared/object-select/collection-select/collection-select.component.ts # src/app/shared/object-select/item-select/item-select.component.html # src/app/shared/object-select/item-select/item-select.component.ts # src/app/shared/object-select/object-select/object-select.component.ts # src/app/shared/pagination/pagination.component.ts
Hi @alexandrevryghem, |
…per-pagination_contribute-main # Conflicts: # src/app/shared/object-list/object-list.component.html # src/app/shared/object-select/collection-select/collection-select.component.ts # src/app/shared/object-select/item-select/item-select.component.ts # src/app/shared/pagination/pagination.component.ts
I tested it in a local environment and it works perfectly. Thanks @alexandrevryghem ! |
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.
👍 Thanks @alexandrevryghem ! I've also verified this fixes the issues with the ItemMapper (both the hanging issue & pagination). Tested CollectionMapper and other pagination based components as well to make sure there are no side effects. Didn't find any.
I've realized the original bug ticket (#2613) was for 7.6.x, so we may need to find a way to port this to 7.6.x if possible. Adding the |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-2642-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2642-to-dspace-7_x
git switch --create backport-2642-to-dspace-7_x
git cherry-pick -x 45e8977db7d34d7b0684c16f92e9e917f6ac4579 da31c4f253ecc504e65ebc3ebe18b4ce2a0960a2 59197cff2d663240cb771d58d1f01cf97d78c3b4 268d2e54fcb0c35216669e52022564a9c5a651d1 |
It appears this will require a manual port to 7.x as the automated port failed ☝️ |
References
Description
Fixed the Item Mapper not paginating the items correctly. Because the page config was improperly configured the request to the backend did not include the page size & the current page. This lead to all items being displayed in the Item Mapper & the different pages always displaying the same result.
Additionally this PR also improves the performance of the item mapper page by saving the observables from
canSelect
&getSelected
in a new list in order to prevent those methods from being called every time change detection is triggered.Instructions for Reviewers
List of changes in this
CollectionItemMapperComponent
.DSpaceObjectSelect
which will contain theObservable
s fromcanSelect
&getSelected
in order to prevent those Observables from being recreated each time change detection is triggered.@Input() pageInfoState
fromPaginationComponent
since it's not used and almost all the components who use it, pass incorrect data to it.Guidance for how to test or review this PR:
Edit Collection > Item Mapper
Browse mapped items
is fixedChecklist
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.