Long file name displayed in a single line in the file widget

Created on 5 July 2020, about 4 years ago
Updated 22 June 2023, about 1 year ago

Problem/Motivation

When upload file with a long name (name does not contain spaces) via the file widget then the file name displayed in a single line and page markup looks like broken (al least a horizontal scroll shows up):

Proposed resolution

Add the wbr tag after each underscores in the file name:

User interface changes

Add the Break row checkbox to the field manage page:

πŸ› Bug report
Status

Needs review

Version

7.0 ⚰️

Component
File systemΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡¦Ukraine chmez πŸ‡ΊπŸ‡¦ Lviv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • last update about 1 year ago
    2,159 pass
  • πŸ‡ΊπŸ‡¦Ukraine chmez πŸ‡ΊπŸ‡¦ Lviv
  • πŸ‡ΈπŸ‡°Slovakia poker10

    Thanks for reporting and working on this @chmez!

    I think that the solution which will work with all possible filenames would be better, as mentioned in #13. What are the cons of using word-break: break-all;? It could be even less "intrusive" change in comparision with adding a new checkbox to the file field configuration.

    human-readable file names (words separated by spaces) which converts by Drupal (replace spaces by underscores).

    Drupal 7 does not have such conversion in the core - do you meant the Transliteration module? We cannot assume that sites will have this module installed. If you upload a file with spaces on vanilla D7 core to the file field, then nothing is changed and the filename is kept as it is.

Production build 0.71.5 2024