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

showname with long filenames breaks the layout #144

Closed
gabuzom opened this issue May 21, 2020 · 2 comments · Fixed by #167
Closed

showname with long filenames breaks the layout #144

gabuzom opened this issue May 21, 2020 · 2 comments · Fixed by #167

Comments

@gabuzom
Copy link

gabuzom commented May 21, 2020

Steps to reproduce:

  • upload one or more image(s) with one improbably long filename (and no spaces)
  • display them in a gallery

=> the column(s) where these longname images appear would be as wide as the long filename written without a linebreak

Suggested solutions:

  • fix a max-filename-length variable, and after that length either:
    • display "..." and the rest of the filename on hover (or not)
    • display the name over sveral lines (would slightly break the layout of the current line in height, but seems totally acceptable.

Overall and besides this minor annyance, thanks zillions for the Gallery plugin, that truly rocks!! <3

@gabuzom
Copy link
Author

gabuzom commented Jun 15, 2020

After further tests it appears that this problem arises with filenames that:

  • contain only alpha-numeric characters
  • contain only alpha-numeric characters and underscores

but DOES NOT arise with filenames that:

  • contain hyphens
    (as long hyphen-containing filenames are indeed being broken in several lines!)

suggested fix would be: treat underscores like hyphens + set a max-length for non-hyphenated non-underscored long filnenames, after which a) they get "..." instead of the end of the filename b) they are put on several lines after every max-length characters....

@mprins
Copy link
Contributor

mprins commented Jun 16, 2020

If you can provide a PR that does this using CSS (text-overflow: ellipsis;)
see https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants