Middle-elide file/folder labels so the extension is always visible

Authored by ngraham on Mar 2 2019, 1:02 PM.


Group Reviewers

This ensures that the filename extension is always visible, and also is just a
nicer way to elide file and folder names in general.

BUG: 404955
FIXED-IN: 19.08.0

Test Plan

Details view:

Icons view with limited label height:

Diff Detail

R318 Dolphin
middle-elide-labels-so-extension-is-always-visible (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 9080
Build 9098: arc lint + arc unit
ngraham created this revision.Mar 2 2019, 1:02 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 2 2019, 1:02 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 2 2019, 1:02 PM

Hmm, I don't know, I'm afraid this would make the filenames harder to recognize.
The file extension can always be guessed by looking at the file icon/preview. Advanced user could also add the Type column in detail view mode. And there is also the Information panel...

Also note that the file dialog uses right-elision as well, so that would need to be patched accordingly.

In my opinion, middle elision is actually more comprehensible for filenames than right-elision is. macOS Finder also uses middle elision here, for comparison.

I'll do the file dialogs as well for consistency.

rooty accepted this revision.EditedMar 11 2019, 7:39 PM
rooty added a subscriber: rooty.

Right-sided elision isn't all that useful considering the filename that's being elided is usually pretty long already. This patch, however, would enable the user to always see the extension (which is a huge deal, especially if we're dealing with something malicious).

So +1 from me (will you be doing file dialogs in a separate patch or as part of this one?)

This revision is now accepted and ready to land.Mar 11 2019, 7:39 PM
rooty resigned from this revision.Mar 28 2019, 11:22 PM
This revision now requires review to proceed.Mar 28 2019, 11:22 PM
ngraham edited reviewers, added: VDG; removed: rooty.May 3 2019, 3:23 PM

Any chance we can reach some consensus on this?

ndavis added a subscriber: ndavis.Tue, Jun 25, 9:33 PM

It feels strange at first, but I think it's a good idea.

elvisangelaccio accepted this revision.Sun, Jun 30, 8:29 PM

I guess go for it.

As long as the file picker gets the same patch ;)

This revision is now accepted and ready to land.Sun, Jun 30, 8:29 PM
ngraham edited the summary of this revision. (Show Details)Sun, Jun 30, 9:17 PM