Bug 385520

Summary: Kate's tabs don't respect the theme and look like they came from Adwaita
Product: [Applications] kate Reporter: Nate Graham <nate>
Component: applicationAssignee: Tomaz Canabrava <tumaix>
Status: RESOLVED FIXED    
Severity: wishlist CC: adr.fantini, bugseforuns, chimak111, christoph, daniel-r.schmidt, erbenton, kde, tcanabrava
Priority: NOR Keywords: usability
Version: Git   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=386758
https://bugs.kde.org/show_bug.cgi?id=408192
Latest Commit: Version Fixed In: 20.08.0
Sentry Crash Report:
Attachments: Kate tabs
Okular tabs
Konsole tabs
Dolphin tabs
System Settings tabs
KSysGuard tabs
Tab movement in comparison

Description Nate Graham 2017-10-09 14:38:02 UTC
Created attachment 108243 [details]
Kate tabs

Kate's tabs don't respect the active theme and therefore don't match the visual appearance of most other tabs in KDE software. Instead, their appearance seems hardcoded, with the current tab only being marked by a thin blue line at the bottom, like tabs in the GNOME Adwaita theme.

See attached screenshots.
Comment 1 Nate Graham 2017-10-09 14:38:27 UTC
Created attachment 108244 [details]
Okular tabs
Comment 2 Nate Graham 2017-10-09 14:38:43 UTC
Created attachment 108245 [details]
Konsole tabs
Comment 3 Nate Graham 2017-10-09 14:39:00 UTC
Created attachment 108246 [details]
Dolphin tabs
Comment 4 Nate Graham 2017-10-09 14:39:19 UTC
Created attachment 108247 [details]
System Settings tabs
Comment 5 Nate Graham 2017-10-09 14:39:38 UTC
Created attachment 108248 [details]
KSysGuard tabs
Comment 6 Christoph Cullmann 2017-10-10 06:18:26 UTC
Yes, they are a custom widget.
They don't behave like normal tabs neither, e.g. more like a LRU list.
Comment 7 Nate Graham 2017-10-10 17:55:04 UTC
IMO they should look and behave like normal tabs. If they need extra functionality, it should be added without changing standard appearance and behaviors.
Comment 8 Nate Graham 2017-11-14 16:20:55 UTC
*** Bug 386898 has been marked as a duplicate of this bug. ***
Comment 9 Dominik Haumann 2018-08-07 20:21:49 UTC
@Nate: I will give some background here.

Traditionally, Kate did not have tabs for over 15 years. The reason was always that tabs do not scale: It is not uncommon that users have many many files open (say >50), navigating between files then will simply not work anymore. Therefore, Kate always only had the so called "Documents" list as sidebar, which displays all opened files in a list view or tree view.

Over time, some developers (including me) added some tab bar plugins, which could be enabled. There was a simple tab bar that more looked like an embedded toolbar. Then there was the multiline tab bar (by me), and I think even more. You can read about some of them here: https://kate-editor.org/2011/04/25/kates-tab-bar-plugins/

For Kate 5, we decided to follow the users' request and added a tabbar by default. However, we decided that this tabbar should be tightly integrated with the quick open feature (CTRL+ALT+O). The idea was to show as many tabs as possible, and tell the user how many documents do not fit anymore into the tabbar. These documents can then be quickly accessed via CTRL+ALT+O.

Many users seem to like how this works right now. Maybe many also don't. Fact is: You will always find some who don't and have a loud voice.

In this case: I can see that the tabbar is different, because it has absolutely nothing to do with a tabbar of e.g. console, dolphin, ... It works different by design.

Now of course it may very well be that we completely borked things, and we simply did a bad job (which is most likely the case). But let me put it like this: Changing this to simple tabs like Dolphin won't cut it. Before changing this, this needs to be very well designed in the workflow. Compare with Visual Studio, compare with all the other text editors out there. Compare with extensions for Visual Studio. You will find 10+ different implementations, all having their strength and weaknesses.

If our only weakness right now is the visual appearance and possibly a slightly different behavior, then maybe it's not the worst solution.

PS: I currently do not have plans to change the current implementation. But of course, patches are welcome.
Comment 10 cat22 2018-08-07 21:57:49 UTC
Why is it that the default tab bar can not be multirow?
Comment 11 Nate Graham 2018-08-07 22:33:50 UTC
(In reply to k3bBug from comment #10)
> Why is it that the default tab bar can not be multirow?
There are other bugs tracking changes to tab behavior. This bug is purely about visual appearance.

Thanks for the history, Dominik. To be clear, this bug is not proposing any behavioral changes at all. Personally I don't have a problem with the overflow behavior. This bug is only tracking a proposal to make the tabs' visual appearance match the rest of Qt and KDE software. In theory, the only implementation detail it proposes to change is to use a QTabBar instead of a custom widget, and of course to port the features so no current functionality is lost.

I was kind of hoping that Tomaz Canabrava would stumble on this and volunteer once he gets finished with his Konsole tab bar re-work. He seems to like hacking on tab bars. :)
Comment 12 Johannes Jordan 2019-02-12 22:39:10 UTC
Created attachment 118021 [details]
Tab movement in comparison

As a user, I would like to mention that I didn't really get the special behavior of Kate tabs at all, despite tabs looking "wrong" in Kate. So I suggest not to excuse the usability deficits of this custom widget with "it's not a tabbar like the others, so it doesn't need to look like it".

I would like to point out that the issue at hands doesn't stop at the static look of tabs. Also, if you want to reorder tabs manually, the visual feedback is severely lacking (missing, in fact, while you move the tab around). This irritates the user and makes dragging tabs dreadful (waiting for the "pop"). A problem that is already solved in regular Qt/KDE or GTK. Please see the comparison attached.

Thank you for the consideration.
Comment 13 tcanabrava 2019-02-14 09:49:39 UTC
I already finished the konsole tabbar rewrite, now I'm doing the spltis. but I belive I can use QTabBar and do the same thing required for kate: changing only the appearance without changing usability.
Comment 14 Nate Graham 2019-02-14 14:54:25 UTC
<3 <3 <3
Comment 15 Nate Graham 2020-06-24 17:11:56 UTC
Tomaz is working on this: https://invent.kde.org/utilities/kate/-/merge_requests/89
Comment 16 Nate Graham 2020-06-25 14:36:33 UTC
This is done now! See the commits added with https://invent.kde.org/utilities/kate/-/merge_requests/89