-
Notifications
You must be signed in to change notification settings - Fork 175
fix: allow word breaking for long file names #3196
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
base: master
Are you sure you want to change the base?
fix: allow word breaking for long file names #3196
Conversation
* long file names breaks records landing page, this commit fix it. * closes inveniosoftware#3195
fenekku
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find, at first I thought this was a regression of #2158, but actually that one only worked with filenames that had spaces in them allowing for default word breaks.
The recommended approach has been to create a utility class and then apply that class to the elements. See comments. @kpsherva can also validate if this is the appropriate way.
| #preview-file-title, | ||
| td.ten.wide a { | ||
| word-break: break-word; | ||
| overflow-wrap: break-word; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utility classes is favored if I remember correctly:
| #preview-file-title, | |
| td.ten.wide a { | |
| word-break: break-word; | |
| overflow-wrap: break-word; | |
| } | |
| .overflow-break-and-wrap-word { // or another catchy name | |
| word-break: break-word; | |
| overflow-wrap: break-word; | |
| } |
Then place it on <td class="ten wide overflow-break-and-wrap-word"> and the #preview-file-title element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fenekku, I think the change fixes the issue (affects Zenodo too).
Since this file already includes similar one-off overrides, keeping the rule here makes sense and keeps it scoped to the affected elements.
If there’s interest in turning it into a utility class later, that’s fine but it’s not really needed for this case.
|
This PR was automatically marked as stale. |
❤️ Thank you for your contribution!
Description
Screen.Recording.2025-10-09.at.15.47.13.mov
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
Frontend
Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: