Menu

#862 Long file paths truncated too aggressively in Project Files dialog

4.1
closed-fixed
None
5
2017-06-23
2017-05-11
No

Problem:

In the Project Files dialog, if a file's path is longer than the "Filename" column width, the file is truncated at the furthest space in the path, instead of by using "..." at the end of the visible text. When this happens, and the portion of the name that is omitted is quite long, the file path could look unreconizable or can become identical to other file names, without a clear indiciation to the user that it is a truncated name.

To reproduce:

  1. Create several files with long names with spaces in the name so that the files have identical names but the last word is different, load them into a project, view the Project Files dialog, and reduce the width of the dialog.
    OR:
  2. Create several nested folders and put files in them that have spaces in the file names.

What I expect to happen:

I confess that I'm used to seeing "..." at the end of a line when text is truncated. So a file name like "handbook (1st edition)/ball room dancing techiques (advanced).html" should be truncated as e.g. "handbook (1st edition)/ball room d...".

What I see instead:

A file name like "handbook (1st edition)/ball room dancing techiques (advanced).html.html" is truncated like e.g. "handbook (1st edition)/ball room"

Suggestion:

Truncate long file names with "..." instead of chopping off the name at the last space.

Discussion

  • Aaron Madlon-Kay

    The truncation behavior of the cells in the table is the standard implementation provided by Swing. There seem to be two avenues for addressing this:

     
    • Samuel Murray

      Samuel Murray - 2017-05-12

      That is interesting, because if you resize any of the other columns, e.g. the "Filters" column, the truncation does use the "..." method even if there are spaces in the text.

       
  • Aaron Madlon-Kay

    The Filename column uses a different renderer than the other columns in order to support highlighting with the filter feature. The behavior is standard for that renderer.

    I came up with a workaround: replace spaces in the filename with no-break spaces. Please try r9886 or later and see if that works for you.

    A proper fix is in r9887.

     

    Last edit: Aaron Madlon-Kay 2017-05-13
  • Aaron Madlon-Kay

    • assigned_to: Aaron Madlon-Kay
     
  • Didier Briel

    Didier Briel - 2017-05-16
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2017-06-23
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2017-06-23

    Fixed in the released version 4.1.2 of OmegaT.

    Didier

     

Log in to post a comment.

MongoDB Logo MongoDB