-
Notifications
You must be signed in to change notification settings - Fork 389
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
Admin pop-up to create/edit a DSO #367
Conversation
Conflicts: src/app/shared/shared.module.ts
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.
Honestly, this looks great overall. I've tested it, and it works. I'm nearly a 👍 , but I have a few (very minor) requests for TypeDocs, comments etc. inline below.
function: () => { | ||
this.modalService.open(CreateCommunityParentSelectorComponent); | ||
} | ||
} as OnClickMenuItemModel, |
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.
Strangely, even though Create Community is listed first in this component, it shows up last under the "New" menu. I'm not sure that's a fault of this PR though.
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.
Strangely enough, this behaviour only occurs when preboot is enabled and is not related to this PR.
I'm not sure why this happens, but before launching the Admin Menu PR I discussed this with @artlowel and we decided it's not really a bug: if you want to force a specific order of menu items, you can explicitly pass a manual "index" when creating a new menu item.
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.
I agree this isn't the fault of this PR. I see the same behavior on master
.
However, I'm going to log it as a bug, as I feel these menus should retain an expected ordering. At the very least, we need to document the "force a specific order of menu items" option you noted, but ideally we should find a way to get ordering to remain consistent.
Nonetheless, it's a bug not caused by this PR. So, this PR can obviously move forward as-is.
...al-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts
Show resolved
Hide resolved
...odal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
Show resolved
Hide resolved
...selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts
Show resolved
Hide resolved
src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.ts
Show resolved
Hide resolved
...d/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts
Show resolved
Hide resolved
...red/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts
Show resolved
Hide resolved
src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts
Show resolved
Hide resolved
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.
👍 Gave this a second review/test. It looks great to me now. Thanks @LotteHofstede !
@LotteHofstede a doubt I have, "new item" is same as "submission", right? It will be created another PR to integrate this work with the submission? |
@paulo-graca If I understand correctly, you create a Unfortunately, this will give you 0 results, because the SOLR search core has not yet indexed the newly created community and therefore cannot find it yet. You should be able to find the Community if you wait a bit longer and search for the UUID again. I understand this is confusing behaviour, but it's nothing we can do anything about in the frontend. Thanks to your report I did find another issue with request caching. The cache was almost never invalidated because of some bugs in the request service code. I did fix this, which should also fix issue #219. To answer your second question: yes, the |
When creating a new Item, I was trying to searched for an existing collection. I noticed that, for every typed letter, the service makes a request. After several typed letters I've got a 403 HTTP Error (Forbidden) when searching for that collection. |
@paulo-graca we weren't able to reproduce the 403, perhaps you can give more details about what you typed to get it? @LotteHofstede did adjust the search service to ensure an unexpected result can no longer break the UI for follow up queries. She also added a debounce to ensure that not every keypress gets sent to the server if you're typing quickly. |
That is great! I will perform another test. |
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.
I performed another test and now it works properly, the code looks ok to me. @LotteHofstede thank you for your work!
This PR is now at +2. I gave it another quick code review (of more recent changes). Merging. Thanks @LotteHofstede! |
This PR adds the ability to quickly go to a create or edit page as an administrator, using the admin menu.
To use this functionality, login and click a Community/Collection/Item menu item in the New or Edit menu section.
Create
For Communities a list of Communities will be shown in which you can create a subcommunity - or you can choose to add a new Top-level community instead.
For Collections a list of Communities will also be shown in which you can create a the collection.
For Items a list of Collections will be shown in which you can create a new Item.*
Edit:
For edit a list of the respective object type is shown.
*) These create item links do not work yet, because there's no direct link (even in the submission PR) to submit an item in a specific collection
Note that in the mockups, a list of parents was shown for the communities/collections like a trail.
However, this functionality is not yet implemented yet because DSpace objects do not have any parents in the backend yet. This relates to this comment on the Submission PR
This PR now also closes #219