Bug 441929 - Should show file name first when "Show path in titlebar" is active
Summary: Should show file name first when "Show path in titlebar" is active
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-03 02:18 UTC by Eduardo
Modified: 2022-08-22 22:00 UTC (History)
1 user (show)

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


Attachments
Unable to see the actual file name in a taskbar with narrow items (28.16 KB, image/png)
2021-09-03 02:18 UTC, Eduardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo 2021-09-03 02:18:38 UTC
Created attachment 141260 [details]
Unable to see the actual file name in a taskbar with narrow items

SUMMARY
"Show Path in Titlebar" in both Kate and KWrite is a very useful feature, enabling the user to always be aware of exactly which file is being edited in his file system, avoiding the risk of confusion.

However, the most important information, the file name itself, is sometimes difficult to pinpoint in a first glance.

Currently the titlebar is displayed in this format:
<full_directory_path>/<file_name> — KWrite

i;e:
~/src/kernel/archlinux/include/linux/compiler_types.h — KWrite

Since we are naturally trained to read from left to right, we have to skim through the full path before we reach the file name itself, which is slightly under-productive.

Even worse, the file name itself becomes unreadable if you are using the "Task Manager" in a populated bottom panel (see screenshot).

So I believe it is good practice to show the file name first, to the left of the file's directory path, something like: "<file_name>" — <full_directory_path> — KWrite"


Maybe the character "—" is not the ideal separator between the file name and the 
directory, as alternatives maybe we could use "@" or ":" or even something else entirely.

So for my example we would have:

compiler_types.h — ~/src/kernel/archlinux/include/linux/ — KWrite

compiler_types.h @ ~/src/kernel/archlinux/include/linux/ — KWrite

compiler_types.h : ~/src/kernel/archlinux/include/linux/ — KWrite


STEPS TO REPRODUCE
1. Enable the feature in Kwrite/Kate menus: Settings -> Show Path in Titlebar

OBSERVED RESULT
The titlebar shows the full path before the file name, in the format: "<full_directory_path>/<file_name> — KWrite"

EXPECTED RESULT
The titlebar should show the file name first: "<file_name> — <full_directory_path> — KWrite"

SOFTWARE/OS VERSIONS
Kate/KWrite: 21.08.1

Operating System: Arch Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
N/A
Comment 1 Bug Janitor Service 2022-08-22 20:40:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/851
Comment 2 Christoph Cullmann 2022-08-22 20:42:39 UTC
Yes, good idea!

Take a look at the screenshot in the attached merge.
Comment 3 Christoph Cullmann 2022-08-22 22:00:43 UTC
Git commit 0dafd316dd5cfe89da535e9c615f5b175c44a1ea by Christoph Cullmann.
Committed on 22/08/2022 at 21:53.
Pushed by cullmann into branch 'master'.

nicer caption for full path output of local files

show file @ directory
this leads to better elide behavior

M  +13   -6    apps/lib/katemainwindow.cpp

https://invent.kde.org/utilities/kate/commit/0dafd316dd5cfe89da535e9c615f5b175c44a1ea