Bug 497664 - Tuncate files names in the middle
Summary: Tuncate files names in the middle
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-12-18 23:15 UTC by Maximilian Böhm
Modified: 2025-01-16 16:58 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 25.04.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maximilian Böhm 2024-12-18 23:15:49 UTC
Tuncate files names in the middle

»One of my earliest UX wins was for Mac System 7. The Finder team wanted to truncate files names with '…' if it wouldn’t fit. I argued that too much critical info would be lost and suggested it be in the middle instead. The Finder team loved it and implemented it later that day. They were so easy to work with.

I'd totally forgotten about it until I overheard someone commenting it was an example of Apple's attention to detail. I'd didn't say anything at the time but yeah, that was me ;-) «
https://social.coop/@scottjenson/113676007029747942 (with screenshot)

Please implement this in Dolphin too! Looks so much better!
Comment 1 Nate Graham 2024-12-20 18:32:14 UTC
Dolphin currently elides at the end of the file name, but before the extension, so that part never gets cut off. IIRC there was quite a lot of discussion in the recent past that resulted in this implementation.

However I can see from the image posted at that link that our current implementation would hide any information the user has added as an explicit suffix though, such as a year, an ordinal number, etc. Perhaps it would indeed be wiser to go for the simple option of eliding in the middle.
Comment 2 Felix Ernst 2024-12-21 10:54:37 UTC
I agree that truncating in the middle is somewhat sensible. That being said, we can't really win here because it will always be mostly about assumptions which part of a file name string is the most important for the user to see and there will always be examples where we are doing the wrong thing. The wanted behaviour might also vary by culture and language e.g. because in some regions it might be normal to typically frontload information or something.

I'll set this as CONFIRMED for now because I would not mind if anyone worked on this, however I would like whoever works on this to first search up on the previous discussion on this topic that Nate mentioned and explain why those discussions resulted in a sub-optimal solution.
Comment 3 Nate Graham 2025-01-02 19:34:34 UTC
I dug up the history. Turns out I changed the elision from right-eliding to middle-eliding in https://phabricator.kde.org/D19471 for Dolphin 19.12.0. Likely for the same reason brought up in this bug report: to make Dolphin more like the macOS Finder, which I stopped using only a few years prior, in 2016.

Then Méven changed it to the current style in https://phabricator.kde.org/D29794 for Dolphin 20.04.0. The reason appears to have been people complaining about the first change in https://bugs.kde.org/show_bug.cgi?id=404955, which led to the current approach which was viewed as a compromise.

Ultimately I think the right conclusion here is that it should be made configurable, since people have different file naming approaches and hence different elision needs. But I do still think simple middle-elision is the best default.
Comment 4 Felix Ernst 2025-01-03 11:20:51 UTC
(In reply to Nate Graham from comment #3)
> I dug up the history.

Thanks for researching!

> Then Méven changed it to the current style in
> https://phabricator.kde.org/D29794 for Dolphin 20.04.0. The reason appears
> to have been people complaining about the first change in
> https://bugs.kde.org/show_bug.cgi?id=404955, which led to the current
> approach which was viewed as a compromise.

Hmm, five people complaining for a very user-visible change within 1 year seems somewhat normal for any kind of Dolphin change to me. Of course some people will be hit harder by such a change than others, so a certain percent will always complain, and of course the compromise change was less of a change so neither the users who would like middle-eliding more nor those who did prefer the previous behaviour would complain. Hmm, it is difficult to draw final conclusions from that IMO. Nate's comment of "Yeah, I feel bad about this. Nobody liked the change and I feel like I can understand the complaints." might perhaps even have been too self-critical. :P

> Ultimately I think the right conclusion here is that it should be made
> configurable, since people have different file naming approaches and hence
> different elision needs. But I do still think simple middle-elision is the
> best default.

I think I would be fine with reverting back to simple middle-ellision if Méven, who implemented that change, would also be fine with it. Having it as an option might IMHO indeed be the best option here, though it seems a bit of a workaround when it really seems generally a bit unfortunate to have file names so long that they don't fit within Dolphin. That could be considered user error to some extent which we don't have to accomodate for considering that there is no ideal solution that fits everyone here.
Comment 5 Bug Janitor Service 2025-01-03 19:53:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/880
Comment 6 Felix Ernst 2025-01-07 01:47:01 UTC
Git commit f42e81fb5d71ffa23948c4edea9bb3f86c84e8c7 by Felix Ernst, on behalf of Nate Graham.
Committed on 07/01/2025 at 01:46.
Pushed by felixernst into branch 'master'.

Elide file names in the middle again

In ye olden days, filenames were elided on the right. This prevented
seeing the filename extension and any suffix style text the user
included in the filename (e.g. "myfile 1", "myfile 2" and so on).

In 97f49347482519b9ad53b7596d7462e68b7c2e14, this was changed to elide
in the middle, fixing both problems and bringing Dolphin into Jakobs'
Law style consistency with MacOS Finder and Windows Explorer, and
possibly other file managers too.

However it worsened the situation for users who name their files such
that most of the information was on the left. After some complaints, it
was changed in 99cf24c03def1c0722ba8dbd86a27b9dbc521f43 to right-elide
again, but excluding the filename extension.

Unfortunately user complaints have continued. At this point it's clear
that nothing will satisfy everyone due to diversity of file naming
styles. In such a situation, Jakobs' Law consistency with the rest of
the industry is the best solution short of making it configurable,
which has its own drawbacks.

Accordingly, return to middle-elision.
Related: bug 404955
FIXED-IN: 25.04.0

M  +4    -21   src/kitemviews/kstandarditemlistwidget.cpp
M  +0    -2    src/kitemviews/kstandarditemlistwidget.h

https://invent.kde.org/system/dolphin/-/commit/f42e81fb5d71ffa23948c4edea9bb3f86c84e8c7