Bug 447653 - LSP Client Symbol Outline shouldn't sort alphabetically
Summary: LSP Client Symbol Outline shouldn't sort alphabetically
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 20.12.0
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-29 18:39 UTC by Grósz Dániel
Modified: 2022-01-13 09:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2021-12-29 18:39:23 UTC
STEPS TO REPRODUCE
1. Enable the LSP Client plugin
2. Open the LSP Client Symbol Outline sidebar
3. Click on the header ("Symbols")

OBSERVED RESULT
The symbols are now sorted alphabetically (instead of by occurrence in the code, as normally).

Clicking it again switches to sorting reverse alphabetically (which one is unlikely to want). The only way to undo this is to restart Kate, or turn the LSP Client plugin off and on.

EXPECTED RESULT
The header shouldn't even exist (since there is only one column), or clicking it shouldn't do anything.

Alternatively, clicking the header should toggle between sorting by occurrence and sorting alphabetically, so that one can switch back.

SOFTWARE/OS VERSIONS
openSUSE Tumbleweed 20211227
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Comment 1 Waqar Ahmed 2022-01-11 17:43:41 UTC
> Clicking it again switches to sorting reverse alphabetically (which one is unlikely to want). The only way to undo this is to restart Kate, or turn the LSP Client plugin off and on.

Right click on a symbol and click "Sort Alphabetically" to sort and then uncheck it to undo the sorting back to original state.

The design and discoverability could be improved I guess. For such discussions, best open an issue on the repo.
Comment 2 Mark Nauwelaerts 2022-01-13 09:22:30 UTC
Git commit e6d756310226070e08e9da8f74092150e5e7881d by Mark Nauwelaerts.
Committed on 12/01/2022 at 23:27.
Pushed by mnauwelaerts into branch 'master'.

lspclient: only allow symbol view header toggle sort when applicable

See issue #44

M  +3    -0    addons/lspclient/lspclientsymbolview.cpp

https://invent.kde.org/utilities/kate/commit/e6d756310226070e08e9da8f74092150e5e7881d