Skip to content

Handling very long strings for metadata and file names#1458

Merged
tdonohue merged 3 commits intoDSpace:mainfrom
atmire:w2p-85862-handling-very-long-strings
Dec 17, 2021
Merged

Handling very long strings for metadata and file names#1458
tdonohue merged 3 commits intoDSpace:mainfrom
atmire:w2p-85862-handling-very-long-strings

Conversation

@LotteHofstede
Copy link
Copy Markdown
Contributor

References

Description

This PR makes sure very long words and urls for metadata and file names don't overflow on the Edit Item Page and Item page.
For the file names on the item's edit/bitstream page and titles in the trail, the word should be truncated and end in an ellipsis. For all other occurrences, the .dont-break-out class was added.

Instructions for Reviewers

Metadata:

  • Add a metadata field with a very long word or url (without spaces and/or hyphens) to an item
  • Check that the text does not overflow the field on both the Item Page and the Edit Item Page /metadata tab.

Title metadata:

  • Add a title metadata field with a very long word or url (without spaces and/or hyphens) to an item
  • Check that the title does not overflow the field on both the Item Page and the Edit Item Page /metadata tab, in the trail and the list view.

File names:

  • Add a file with a very long file name and description (without spaces and/or hyphens)
  • Check that the text does not overflow the field on both the Item Page and the Edit Item Page /bitstreams tab.

Checklist

  • 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 TSLint validation using yarn run lint
  • My PR doesn't introduce circular dependencies

(*) This code does not contain new tests or TypeDoc as the changes are all CSS changes

@artlowel artlowel added 1 APPROVAL pull request only requires a single approval to merge bug component: Item (Archived) Item display or editing e/4 Estimate in hours high priority usability labels Dec 16, 2021
@artlowel artlowel added this to the 7.2 milestone Dec 16, 2021
@tdonohue tdonohue self-requested a review December 16, 2021 15:55
@manez
Copy link
Copy Markdown

manez commented Dec 16, 2021

Tested. With this PR, text properly wraps instead of overflowing if too long for the field. Approved 👍

Copy link
Copy Markdown
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.

👍 Code looks good to me, and I also gave it a quick test and it looks to fix the bug. Thanks @LotteHofstede !

@tdonohue tdonohue merged commit 7d88897 into DSpace:main Dec 17, 2021
4science-it pushed a commit to 4Science/dspace-angular that referenced this pull request Apr 8, 2024
DSC-1556

Approved-by: Stefano Maffei
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: Item (Archived) Item display or editing e/4 Estimate in hours high priority usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-ergonomic display of long metadatavalue without space on admin metadata + bitstream edit AND public item pages

4 participants