Skip to content
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

Fix for #1602 Insufficient collection information when submitting an article #3327

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

im-shubham-vish
Copy link

@im-shubham-vish im-shubham-vish commented Sep 12, 2024

Description

Fixes #1602

Insufficient collection information when submitting an article.

Instructions for Reviewers

Sometimes, the collections returned by the collection browser are indistinguishable because their names are identical to other collections and their parent communities.
For example, suppose you have two communities named "Institution A" and "Institution B," each with a subcommunity named "Reports." Both subcommunities have a collection called "Research Reports." If I want to submit an item to "Institution B > Reports > Research Reports," it's impossible to differentiate between the "Reports" subcommunity in "Institution A" and "Institution B" when searching for the "Research Reports" collection.
Expected Behavior
Instead of displaying only the name of the parent community, the interface should display the full hierarchy, similar to how it's done in XMLUI.

List of Changes in this PR:

• Added a method getHierarchicalName in sidebar-search-list-element.component.ts that returns the hierarchical name. Now, parentTitle calls getHierarchicalName instead of getParentTitle.
• Added a method createInstanceFromDSpaceObject responsible for creating an instance of DSpaceObject.
• Removed the maxlines argument from sidebar-search-list-element.component.html.
• Added some CSS to the content class in truncatable-part.component.scss.

Steps to Test and Reproduce the Behavior:

  1. Create two top-level communities named "A" and "B."
  2. Create a subcommunity named "Reports" under each top-level community.
  3. Create a collection named "Research Reports" within each "Reports" subcommunity.
  4. Try to submit an item to "B > Reports > Research Reports" and ensure that the full hierarchical name is displayed.

@tdonohue tdonohue added bug usability component: submission 1 APPROVAL pull request only requires a single approval to merge labels Sep 12, 2024
@tdonohue
Copy link
Member

@im-shubham-vish : Thanks for the PR. Just a note that this is failing lint formatting checks. You can see those locally by running npm run lint. They are also visible in this PR if you look at the "Files changed" tab. Some of these may be fixed automatically if you run npm run lint-fix

We require all PRs to pass lint formatting checks.

@Leano1998
Copy link
Contributor

Hi @im-shubham-vish ,
thanks for you PR! I tested it locally and it worked perfectly. I just noticed, you kept the parentTitle$ variable in the TypeScript file. Is there a reason for it? Because as far as I can see, you don't need it any more or do I miss something?
Also, you might adjust the spec test in the sidebar-search-list-element.component.spec.ts in order to test the hierarchicalTitle$ instead of the parentTitle$.

Fix for DSpace#1602 Insufficient collection information when submitting an article.
@im-shubham-vish
Copy link
Author

Hi @Leano1998,
Sorry for the late reply & thanks for your feedback! You're right we have no use case left for parentTitle$. So I've adjusted all over the possible places to use hierarchicalTitle$ instead of the parentTitle$ including spec test files.

Please recheck once and let me know in case you've any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge bug component: submission usability
Projects
Status: 🙋 Needs Reviewers Assigned
Development

Successfully merging this pull request may close these issues.

Insufficient collection information when submitting an article
3 participants