Bug 404955 - Add an option to always show the file extension
Summary: Add an option to always show the file extension
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-01 17:30 UTC by sdfjsfjaei-hans
Modified: 2025-01-07 13:03 UTC (History)
10 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdfjsfjaei-hans 2019-03-01 17:30:30 UTC
Instead of showing

"this is a very
very very very
long file name..."

Dolphin would show sth. like the following, when the option is enabled:

"this is a very
very very very
long file n...txt"
Comment 1 sdfjsfjaei-hans 2019-03-02 11:25:41 UTC
Forgot to add: "txt" is the file extension here
Comment 2 Nate Graham 2019-03-02 13:03:44 UTC
Here, have a patch: https://phabricator.kde.org/D19471
Comment 3 sdfjsfjaei-hans 2019-03-02 17:12:52 UTC
That's awesome. (And so fast..) Thank you, Nate! :)
Comment 4 Nate Graham 2019-03-02 21:00:49 UTC
My pleasure! :)
Comment 5 Nate Graham 2019-08-24 18:44:19 UTC
Git commit f05f67d79cadcb82fa52bc5845549299564ce6ff by Nate Graham.
Committed on 24/08/2019 at 18:44.
Pushed by ngraham into branch 'master'.

[KDirOperator] Middle-elide labels that are too long to fit

Summary:
Right now too-long labels get right-elided, which among other minor issues, causes
their filename extentions to not be visible. Dolphin is moving to middle-eliding
labels instead (See D19471), so this patch implements the same behavior for KDirOperator
so the file dialogs behave the same way.

Test Plan: See the Test Plan in D19471; same deal

Reviewers: #vdg, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23201

M  +7    -0    src/filewidgets/kdiroperatordetailview.cpp
M  +1    -0    src/filewidgets/kdiroperatordetailview_p.h
M  +1    -0    src/filewidgets/kdiroperatoriconview.cpp

https://commits.kde.org/kio/f05f67d79cadcb82fa52bc5845549299564ce6ff
Comment 6 Nate Graham 2019-08-24 18:45:13 UTC
Git commit 97f49347482519b9ad53b7596d7462e68b7c2e14 by Nate Graham.
Committed on 24/08/2019 at 18:44.
Pushed by ngraham into branch 'master'.

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

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

Test Plan:
Details view: {F6648784}
Icons view with limited label height: {F6648785}

Reviewers: #dolphin, #vdg, elvisangelaccio, GB_2

Reviewed By: #dolphin, #vdg, elvisangelaccio, GB_2

Subscribers: GB_2, ndavis, rooty, elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19471

M  +4    -4    src/kitemviews/kstandarditemlistwidget.cpp

https://commits.kde.org/dolphin/97f49347482519b9ad53b7596d7462e68b7c2e14
Comment 7 J.D 2020-03-22 11:12:21 UTC
Can this be made optional? I like the way it was before this "fix". I've seen other people also not like this forceful change that can't be reversed.
Comment 8 JanKusanagi 2020-03-22 15:34:40 UTC
(In reply to J.D from comment #7)
> Can this be made optional? I like the way it was before this "fix". I've
> seen other people also not like this forceful change that can't be reversed.
Yes, please. It's very annoying for many of my folders (plus I have little need to know the extensions then).
Comment 9 Nate Graham 2020-03-22 21:36:23 UTC
Various other people have complained too. We can reconsider, or try to make the elision behavior smarter.
Comment 10 Lurkningen 2020-03-28 05:00:38 UTC
Often the rightmost part of long file names (with the exception of the extension) is the most useless part, with specific details such as unique IDs, tags, or long version strings being tacked at the end. And sometimes you can get some of that "noise" both at the start and at the end of the file name, with the result that with the new behaviour the actual useful part of the file name becomes completely hidden.

A smarter way to do this would be to try to always show the extension and put the ellipsis just before it, though handling double extensions won't be straightforward.

In any case I think it would be better to make this optional. Sometimes you just want to be certain that the file name you are seeing is the actual file name. I've seen one too many file names with ellipses in them and the first time I saw the new behaviour I didn't even realise those weren't part of the file name.
Comment 11 Christoph Feck 2020-03-28 18:16:40 UTC
The MIME database knows about common double extensions, see https://doc.qt.io/qt-5/qmimedatabase.html#suffixForFileName
Comment 12 Matteo M. 2020-05-02 11:18:45 UTC
I honestly hate this "fix", for me it's been a very negative change: in the most important directories I organize file names as something like

    Author -- yyyy-mm-dd -- Topic -- Sub-topic -- Name/Title -- ID.ext

so that it's ordered by author, then date, then topic, etc. and I COULD still see (for the most part) the most important things, which are topic, sub-topic and the first half of name/title.

Now I can't: this forced change has made that impossible for me, rendering Dolphin totally useless in those (important) directories. I'm thinking about switching to another file manager for this reason.

This is not the way to go: a change like this should be configurable in the Settings, where you should provide all 3 possible elision options:
  * right  (like before)
  * middle (like now)
  * left   (somebody could find that useful, probably me too)
Making Dolphin save it in the directory's custom settings (instead of globally) would be even better, because you could need different elision types in different directories.
Comment 13 Méven Car 2020-05-18 06:14:56 UTC
Git commit 99cf24c03def1c0722ba8dbd86a27b9dbc521f43 by Méven Car.
Committed on 18/05/2020 at 06:14.
Pushed by meven into branch 'release/20.04'.

Left-elide file/folders while keeping their extension visible

Summary:
Tweak behavior introduced in D19471.

Test Plan:
Before:
{F8325282}
After:
{F8325283}
{F8325284}

Reviewers: ngraham, #dolphin, elvisangelaccio, #vdg

Reviewed By: ngraham, #dolphin, elvisangelaccio, #vdg

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29794

M  +24   -6    src/kitemviews/kstandarditemlistwidget.cpp
M  +2    -0    src/kitemviews/kstandarditemlistwidget.h

https://invent.kde.org/system/dolphin/commit/99cf24c03def1c0722ba8dbd86a27b9dbc521f43
Comment 14 JanKusanagi 2020-06-23 00:50:14 UTC
Having seen this in Dolphin 20.04.2, kudos!! Much better solution, thansk! =)
Comment 15 spiesant 2020-07-14 02:46:32 UTC
This is awful. Does anyone know the very last build of Dolphin before this was changed, and how to revert to it?

I have a similar naming convention to Matteo M, & this new behavior - which is dissimilar to Windows & every other file manager I've ever worked with - makes it impossible to get consistent behavior across systems.  There's therefore no longer a way to name my files that behave "well" on different systems.
Comment 16 Bug Janitor Service 2025-01-03 19:53:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/880
Comment 17 Felix Ernst 2025-01-07 01:46:53 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 497664
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
Comment 18 spiesant 2025-01-07 01:53:40 UTC
What drawbacks are there of making it configurable? Then there's 0 possibility of it colliding with someone's naming style. Users can just set whatever style works for their naming convention.
Comment 19 J.D 2025-01-07 05:19:08 UTC
Yes, why do what a good portion of users want?! Why not follow Jakobs' Law, which does not even apply here?! People who use linux, who use Dolphin, do not tend to use concurrently other file managers. And even if, it does not mean that making Dolphin worse is the answer. Besides, why compare dolphin to file managers from Windows or MacOs ? Compare to other file managers from linux.

Make the option configurable.
If there is such an opposition to adding another checkbox into GUI configuration, then make it some obscure line in dolphinrc.
Comment 20 Matteo M. 2025-01-07 13:03:56 UTC
Back in 2020 I wrote "a change like this should be configurable in the Settings, where you should provide all 3 possible elision options". It's 2025 and we're still here.
They changed it 3 times by hard-coding the behavior instead of doing it just once but configurable, solving all problems.

If somebody wants to reopen this bug, please do it, since somebody inexplicably marked it as "RESOLVED FIXED". I won't do it because Dolphin and KDE have been dead to me for years.

I'm happy I switched from Dolphin to PCManFM-Qt in 2020 and from KDE to LXQt after a while: I don't regret stopping using KDE at all on all my devices, seeing the path it's been on for so many years, since before 2020.
KDE and Linux's configurability (and lightness) used to mean something, while with today's KDE & friends it's just bells and whistles, translucency and very bad performance (and bugs).
If you wanna continue to compare yourselves to Windows and MacOS, hey, you do you... for me it's gonna be a "No, thanks".