-
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
Limit edit item modal results #2011
base: main
Are you sure you want to change the base?
Conversation
…dit->Item menu (admin sidebar). Currently there are still build issues.
Hi @KoenP, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
b68e39f
to
7982259
Compare
Hi @KoenP, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
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.
@KoenP : I tried to test this today, but I cannot build this PR when I apply it to the latest main
. It appears this PR may be accidentally undoing many of the changes to the "shared.module.ts" which were recently applied to main
.
We could always wait to rebase this after #1999 is fully merged (I think it's close). But, I just wanted to let you know that this PR appears to have build issues right now.
258009c
to
14a45fa
Compare
…item-modal-results
14a45fa
to
4526097
Compare
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.
👍 @KoenP : I tested and reviewed this today. I have a few very minor inline requests which I'd like to be resolved prior to merger. However, this works well, so I'll go ahead and approve it.
@@ -54,6 +54,15 @@ export const getFirstSucceededRemoteWithNotEmptyData = <T>() => | |||
(source: Observable<RemoteData<T>>): Observable<RemoteData<T>> => | |||
source.pipe(find((rd: RemoteData<T>) => rd.hasSucceeded && isNotEmpty(rd.payload))); | |||
|
|||
export const mapRemoteDataPayload = <T,U>(fn: (payload: T) => U) => |
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.
Can we add a comment or TypeDocs to describe how/when to use this? See for example how "getFirstSucceededRemoteDataPayload" is described (and others below it.)
@@ -14,7 +14,8 @@ import { Item } from '../../../../core/shared/item.model'; | |||
|
|||
@Component({ | |||
selector: 'ds-edit-item-selector', | |||
templateUrl: '../dso-selector-modal-wrapper.component.html', | |||
templateUrl: './edit-item-selector.component.html', | |||
// templateUrl: '../dso-selector-modal-wrapper.component.html', |
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.
Can we remove the commented out code here?
Hi @KoenP, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
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 @KoenP!
The code in this PR looks good and it works well.
However I noticed some cases where the solr index seemed to be outdated after adding or removing a user from a group. I made a comment about it on the rest PR: DSpace/DSpace#8616 (comment)
References
Description
The frontend PR ensures that, when a user clicks Edit->Item in the admin sidebar, they only see items they have permission to edit. The backend PR extends the REST API with a
findItemsWithEdit
search method to support quickly finding these relevant items.Instructions for Reviewers
List of changes in this PR:
EditableItemSelectorComponent
, which renders a list of items that are editable by the current user.EditItemSelectorComponent
now uses a custom template instead of the genericDSOSelectorModalWrapperComponent
template.BaseItemDataService
: now implementsSearchData<Item>
and defines a new methodfindItemsWithEdit
, which calls a new REST method with the same name to retrieve the list of items for which the current user has editing rights.Manual testing can be done via the REST API at
/api/core/items/search/findItemsWithEdit
or via the frontend.Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
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.