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: 2022-05-18 16:02 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.2


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.