elementary / files

File browser designed for elementary OS
https://elementary.io
GNU General Public License v3.0
327 stars 77 forks source link

Improve the way long file/dir. names are handled by adding an overlay #1590

Open hanaral opened 3 years ago

hanaral commented 3 years ago

Problem

As mentioned in my other issue about column view, the current column view tries to solve trunkated text by having wide columns by default and allowing the user to resize them. This doesn't really work, as 99% of the time the text is too wide for any column to sanely show in full anyway, so there isn't a way for the user to contextually show a full itemname without the sizing of the UI to change drastically.

Proposal

Popover boxes should appear when hovering over a filename that is too long so that no information is lost (macOS has done this for almost 2 decades)

Prior Art

Screenshot from 2021-02-11 19-30-46 Screenshot from 2021-02-11 19-30-58

jeremypw commented 3 years ago

There are really two issues here; (1) Fix column width (2) Show full text name in popover when hovered (if truncated).

I do not see any advantage in implementing (1) at this point although if the widget were ever to be re-written using different widgets it would simplify the code. I do not think there are any code bugs associated with the column resizing and the columns are created with a consistent size so if columns are not manually resized then they will be pseudo fixed width. Design seem to be :-1: on this as judged by comments on #1578.

Issue (2) is kind of already fixed because the full name of the hovered file is shown in the overlay bar that shows the file properties. However, that overlay may be discontinued in future so another solution may be needed then. I am concerned that lots of popovers appearing in the eye line while mousing over the view could be annoying. Maybe an ellipsis in the middle would be be better as it would enable sight of the file extension? Flagging for design team comment.

hanaral commented 3 years ago

The current resizability of the columns seem to cause the columns showing up too small or too large, I thought that picking a fixed size would alleviate any possible problems. I don't see how the overlay text could get annoying since (as you said) the ability to hover to see details is likely going away and needs a replacement. This would solve the issue of truncated text but also solve this future issue of not being able to get the full filename of an item without selecting it.

jeremypw commented 3 years ago

Each new column is opened with a fixed size (defined by the setting io/elementary/files/column-view preferred-column-width). Any manual change made by dragging the right border of the column is only temporary and does not affect any other column. You could argue that the preferred-column-width setting should be a different value oob, or that it should change if a column is manually resized but I do not see how the resizeability is an issue.