Bug 440585 - Tabs bar tends to scroll left and hides all tabs to the right of current tab
Summary: Tabs bar tends to scroll left and hides all tabs to the right of current tab
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 21.07.90
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: usability
Depends on:
Blocks: 452498
  Show dependency treegraph
 
Reported: 2021-08-04 11:07 UTC by Andrew Shark
Modified: 2022-04-11 12:48 UTC (History)
6 users (show)

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


Attachments
video demo of tabs hiding after editing in current tab (1.44 MB, video/mp4)
2021-08-04 11:07 UTC, Andrew Shark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2021-08-04 11:07:10 UTC
Created attachment 140509 [details]
video demo of tabs hiding after editing in current tab

When working with many documents, it is inconvenient that tabs hides themselves from the tabbar. I often loose a spot where my another document is, and start searching it again in my tabs.

STEPS TO REPRODUCE
1. Open many documents so your tabs touches the right edge of the window, so you can scroll the tabs left and right.
2. Scroll to the right tabs (make all tabs at the right visible).
3. Go to the pre-last tab and make any change to that document.

OBSERVED RESULT
The tabs bar is automatically scrolled to the position of when current document is at the right side of the window.

EXPECTED RESULT
The tab bar stays not scrolled.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Graphics Platform: X11

ADDITIONAL INFORMATION
This also happens in KDevelop (probably still kate issue in katepart).
In dolphin there are also tabs, but they stay not scrolled when you create file in any tab.
Comment 1 Waqar Ahmed 2021-08-04 13:00:11 UTC
This issue may likely never get fixed.

But there's a way to fix this problem for yourself, and that is by not using tabs directly and instead using the Documents plugin (which is kind of geared towards handling many open documents at once). 

Go to setting - Plugins - Documents (usually enabled by default) 

Then you can use that, to jump to whichever document you want or filter through them. It even highlights the recently open documents in shades so that you can tell which one you edited last and so on.
Comment 2 Andrew Shark 2021-08-04 14:18:16 UTC
> This issue may likely never get fixed.
Can you explain it a bit more why?

> It even highlights the recently open documents
Thanks, I did not know that, I will check it out.
Comment 3 Nate Graham 2021-08-04 18:05:29 UTC
This issue is theoretically improvable by squeezing the tabs to make them smaller at a lower width threshold like web browsers to, rather than scrolling so eagerly. We could perhaps squeeze the text if needed.
Comment 4 Christoph Cullmann 2021-10-03 21:03:11 UTC
If somebody wants to work on improving this, patches are welcome.

I think the current implementation works as designed and is consistent with other KDE applications that have tabs.

If one e.g. limits the number of tabs to have LRU behavior, this problem vanishes, thought not in a way you will like I assume.

Therefore I keep this open as wish list.
But if nobody steps up to implement it, this will someone be closed.
Comment 5 Eduardo 2021-12-01 05:50:00 UTC
I am actually quite surprised that this behaviour is deemed to be correct. Why would tab positions change based on which documents are edited and saved, is not clear to me.
There is just one solution - do not scroll / move tab positions while editing and saving documents, squeezed tabs won't work, because at the end there might be too much of them anyway.

Actually I tried konsole with too much tabs, it's not right IMO there too. If there is a scrollable tab bar and I scroll to the very right and click on 3rd tab to the left, it changes the tab under! the mouse right away - I mean I just selected the tab and it already moved away, which is even more confusing.
Anyhow, this is about kate and I really hope the sane (IMO) behaviour will eventually come to at least kate.
Comment 6 MisterE 2022-01-08 12:55:44 UTC
It issue is really annoying. The "save" icon in the tab triggers the shift of the tabs.
Comment 7 Waqar Ahmed 2022-02-20 17:32:46 UTC
*** Bug 435780 has been marked as a duplicate of this bug. ***
Comment 8 Bug Janitor Service 2022-02-20 20:42:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/628
Comment 9 Waqar Ahmed 2022-02-20 22:05:45 UTC
Git commit 5e2df994ad6eba40d493f52487df2b98b28f193a by Waqar Ahmed.
Committed on 20/02/2022 at 20:40.
Pushed by cullmann into branch 'master'.

Fix tab jumping with unlimited tabs

If we set the icon every time file is modified, it causes a lot of
layouting resulting in the tab bar getting scrolled.

With this change instead of setting an icon, we make the text italic to
show that this tab has modified content. This is more like other
editors.
Related: bug 435780

M  +45   -0    kate/katetabbar.cpp
M  +1    -6    kate/kateviewspace.cpp

https://invent.kde.org/utilities/kate/commit/5e2df994ad6eba40d493f52487df2b98b28f193a