Fix relationship modal on item page#1139
Merged
tdonohue merged 3 commits intoDSpace:mainfrom May 4, 2021
Merged
Conversation
tdonohue
approved these changes
May 3, 2021
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 This fixes the main issue and the modal now works for adding new relationships (from the Edit Item screen). Thanks @ybnd .
However, in testing this PR, I noticed two other bugs/usability issues here that are semi-related:
- While the modal window lets you add new relationships, it doesn't show which entities already have an existing relationship. So, the "Current Selection" tab in the modal always says zero, and every entity in the system is listed as unchecked. This means that you can attempt to add a new relationship to an Entity which already has an existing relationship as there's no way to tell in the popup which ones are already related. (If you attempt to add a duplicate relationship, nothing happens though...the UI knows that one already exists.)
- When an Entity has a large number of relationships, it becomes impossible to see them all on the "Relationships" tab. Either the "Relationships" tab needs pagination, or the "Current Selection" tab in the popup should list all existing relationships with pagination. Currently, if there's more than 20 relationships, only the first 20 relationships appear. So, it's impossible to see (or delete) any relationship after the first 20.
@artlowel : I suspect these both should be logged separately & we should move this PR forward as-is. But, let me know if either of these are easier to fix as part of this PR.
Member
|
Yes, I'd prefer to keep this PR small and fix the other issues separately |
Member
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Description
Remove submission-based initialization of
DsDynamicLookupRelationModalComponent#itemInstructions for Reviewers
DsDynamicLookupRelationModalComponent#setItemsubsattributeEditRelationShipListComponent, set the modal'scollectionto the owning Collection of the Item being editedReviewing
Authenticate as an admin
Edit an item. Open its "Relationships" tab. Click on any of the "Add" buttons.
The relationship lookup modal should open (and not get stuck in the "loading" animation)
Open a submission in a collection with lookup enabled. Click on the lookup button next to the field
The relationship lookup modal should open (and not get stuck in the "loading" animation)
Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.