dspace-angular
dspace-angular copied to clipboard
Use full community and collection names in breadcrumb navigation
Is your feature request related to a problem? Please describe.
In DSpace 7, long community and collection names are clipped in breadcrumb navigation. (The item title is also included in the breadcrumb navigation, which I think is unnecessary. But if the item title must be included, then do clip item titles, since they can be very long.)
Like many institutions, we have some long-winded community and collection names to match long-winded organizational units. Many start with our organization's name, so if they are clipped, they will be hard to distinguish. Therefore, please do not clip the community and collection names in the breadcrumb navigation.
Describe the solution you'd like
In DSpace 6 XMLU, full community and collection names are used in the breadcrumb navigation. The item title is not included, which I think is preferable. This breadcrumb navigation has worked well for us.
Describe alternatives or workarounds you've considered One option (discussed below) would be to continue to truncate these names, but provide a (hover over) tooltip which displays the full name.
Additional context Add any other context or screenshots about the feature request here.
@alawvt : The reason we had gone with this approach was to try to ensure that breadcrumb listing remains smaller (especially for mobile devices / smaller screens -- which XMLUI was really bad at supporting unfortunately). That said, I definitely can see why truncating can cause confusion.
What do you think about if we continued to truncate these names but added a hover over which displayed the entire name?
So, you'd still see something like College of Agriculture and Life ..
, but when you hover your mouse over it you may see a tooltip that gives the full name as College of Agriculture and Life Sciences (CALS)
. That might be a way for us to allow people to easily see the full name, while also providing a view that is more friendly to smaller devices.
@tdonohue, your proposal would certainly be an improvement over the current arrangement, so I am in favor of it.
@alawvt : Sounds good, I'll clarify that in the ticket description as an option & get this added to our board.
@tdonohue A couple of minor changes to breadcrumbs.component.scss can fix this, without needing a tooltip.
-
change .breadcrumb-item-limiter.max-width: fit-content;
-
override .text-truncate.white-space: normal;
Bootstrap will display the full breadcrumb name on large and small devices, by wrapping long breadcrumbs when necessary,
@ericlmontag : Feel free to send us a PR and I can find some testers for it. Otherwise, I'll see if I can find someone to try this out (as this ticket is still waiting on a volunteer). Thanks!
@tdonohue I created a PR.
@ericlmontag : My apologies for the misunderstanding of your suggestion, but as you can see in my comment in your PR, I've decided to close your PR. Both @artlowel and I are concerned that expanding all breadcrumbs at all times will take up valuable screen space (and many users have no need for these long breadcrumbs on their screen).
Therefore, this ticket is still open for volunteers. The recommended approaches include one of the following:
- Provide a hover over "tool tip" to display the full breadcrumb of any truncated text
- Or, find a way to dynamically expand the truncated breadcrumb text when hovered over
Overall though, we feel that the truncation feature should be the default behavior in order to save screen space.
If we do the tooltips, perhaps we can even consider leaving the DSO's name out of the trail entirely, and only showing it in the tooltip.
A trail such as …
Home > Community > Sub-community > Collection > Item
… where each crumb shows the title of the DSO in a tooltip on hover is much more predictable and easier to style on all possible screens. It is arguably easier to grasp for a user that isn't particularly acquainted with the repository as well, as the parent DSO names may not have any particular meaning for them, and the trail will look the same on comparable pages
@artlowel, thank you for considering this request. I don't know what DSO stands for but I will assume that it has something to do with the item name. I don't see the point of including the item title in the breadcrumb trail, because it already appears on the item page. The breadcrumb trail is there to provide context. If we don't want to drop the item title in the breadcrumb trail, than I think hiding it except in a tooltip would be an improvement.
No problem! DSO stands for DSpace Object, meaning Items, Collections, Communities,
Hi @tdonohue,
I reviewed the conversation and I thought the tooltip was a good idea, add an angular function and pass the text parameter.
Add in the file 'src\app\breadcrumbs\breadcrumbs.component.html' this code on the lines 13 and 17:
[ngbTooltip]="text | translate" placement="bottom"
@jtimal : If you want to send us a PR, we can find a reviewer to take a look at your small fix. Based on the screenshot though, it looks like a reasonable fix to me. Thanks!
Closing, fixed by #1957