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

Fixes "Insufficient collection information when submitting an article" #2070

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

Conversation

CrisGuzmanS
Copy link
Contributor

@CrisGuzmanS CrisGuzmanS commented Feb 2, 2023

Hi @tdonohue ✋, before you gave me the reviews of my other activities, I was working on this activity, so I'll be doing this pull request and will be listening for any feedback as I work on the requested reviews.

References

Description

I added the full hierarchy titles for communities when an article is going to be created to prevent choose the wrong collection.

Instructions for Reviewers

  1. login as administrator
  2. click the button to add a new item
  3. You will see the full hierarchy of communities displayed above the collection.

image

List of changes in this PR:

  • NOTE: I needed to change the sidebar-search-list-element.component.spec.ts file, and i added: jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
  • NOTE: I needed to add: await new Promise((resolve) => setTimeout(resolve, 1)); i am not pretty sure why adding this line i leave problems with the browser when i am testing.
  • method parentTitle() modified to title().

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!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@tdonohue tdonohue added the bug label Feb 2, 2023
@tdonohue tdonohue self-requested a review February 9, 2023 15:10
@tdonohue tdonohue changed the title Issues/1602 Fixes "Insufficient collection information when submitting an article" Mar 10, 2023
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CrisGuzmanS : The UI here isn't the best. The hierarchy is cut off and a tooltip is displayed. I think we want one of the other

For instance, I'm seeing this (notice the tooltip in this scenario is hidden partially):
tooltip

I think we should either use the tooltip or have a complete hierarchy, but not both. The UI looks confusing with both.

So, overall, this works, but I think we need to find a way to get the UI to make more sense. The tooltip gets in the way right now (and is sometimes partially hidden). I'm not sure of a better solution right now though

@CrisGuzmanS
Copy link
Contributor Author

@tdonohue I have been trying to think of a better way to show the complete hierarchy of the items, but I still don't know how to do it. As you say, if I show the complete hierarchy as it is (horizontally), for large hierarchies, it stops being visible at a certain point, but if I use the tooltip, it will be difficult to know the hierarchy for people using mobile devices.

I have thought of placing a button, maybe on the left side of each element, that when clicked, displays the complete hierarchy vertically (like a sort of list), but before I start working on this, I would like to know your point of view about this.

@tdonohue tdonohue self-requested a review April 13, 2023 14:56
@tdonohue
Copy link
Member

@CrisGuzmanS : Apologies for my silence on this ticket...it's taken a while to get back to. I wonder if the easiest approach here would be to simply make the New Item select box behave like the Collection dropdown in the Submission UI:

Collection-dropdown

  • In the Submission UI, the Collection Dropdown only displays the immediate parent Community (as you can see in the screenshot above).
  • (Optionally) if you wanted to enhance this behavior, the entire hierarchy could be displayed in the hover over title (see the red circled portion above...it appears if you hover over with your mouse). Currently, hover over just displays the Collection name... but it might be updated to display [Top Community name] > [Sub Community name] > [Collection name] or something similar.

This is my best idea here. I'm worried that attempting to display the entire hierarchy at all times is perhaps too difficult. Some hierarchies may be very deep, and this current PR doesn't work well for a deep hierarchy. Maybe it's better to use the approach of the Submission UI and simply display the immediate parent Community for more context.

@github-actions
Copy link

Hi @CrisGuzmanS,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@tdonohue tdonohue removed their request for review January 26, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ❓ Stalled/On Hold
Development

Successfully merging this pull request may close these issues.

Insufficient collection information when submitting an article
2 participants