Bug 491890 - Button `Expand results` should expand also when there are more than 200 files
Summary: Button `Expand results` should expand also when there are more than 200 files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-19 08:10 UTC by Markus Pister
Modified: 2024-08-23 18:24 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Pister 2024-08-19 08:10:18 UTC
SUMMARY
I was used to use the button `Expand results` in the search plugin to both collapse and expand the result list. I just noticed that the button now only collapses the results, no expansion happens anymore when again hitting the button.

Found in branch 'master' (current HEAD: commit 41e0a495).

STEPS TO REPRODUCE
1. Perform some search with the search plugin that has results
2. Hit button `Expand results` multiple times

OBSERVED RESULT
Results are collapsed (if state was expanded before), but no expansion happens anymore.

EXPECTED RESULT
Hitting the button previously toggled expanded and collapsed state of the result list. Would be nice to have that behavior back.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: EndeavourOS
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Comment 1 Kåre Särs 2024-08-19 09:56:32 UTC
I just checked out master (683c53e9) and I cannot reproduce....

There is a limit there tho. If the number of matching files is greater than 199 it will not do the expansion. I think the reasoning was that having 200 or more expanded results in the tree-view will not give much additional value. It could also be a performance thing, but I do not remember what the limit explicitly was for.

Do you see a value for having the possibility to expand 200+ files?
Comment 2 Markus Pister 2024-08-19 10:19:25 UTC
Indeed, my search had matches in > 300 files, actually. Thanks for explaining.
Just rechecked with a different search and there, the button works as expected.

I agree that probably nobody checks soo many matches in the result list. My intention was to open the list and do a very fast scroll over if the matches look reasonable to me.

From my point of view, no need to relax that limit. I was just surprised cause I was not aware of the limit.

From that perspective, the bug report is invalid. I switch the status to "not a bug".

Thanks again for the fast reply.
Comment 3 Christoph Cullmann 2024-08-19 12:20:51 UTC
(In reply to Kåre Särs from comment #1)
> I just checked out master (683c53e9) and I cannot reproduce....
> 
> There is a limit there tho. If the number of matching files is greater than
> 199 it will not do the expansion. I think the reasoning was that having 200
> or more expanded results in the tree-view will not give much additional
> value. It could also be a performance thing, but I do not remember what the
> limit explicitly was for.
> 
> Do you see a value for having the possibility to expand 200+ files?

I would prefer to be able to do that, as I tend to just scroll over large lists. If one really is worried about the performance, one could show some 'do you really want it' dialog with a never ask again checkbox.
Comment 4 Kåre Särs 2024-08-19 12:38:21 UTC
Yep, the limit is a bit arbitrary and quite low.

Let's remove the limit and add some measure when/if it turns out to be a problem.
Comment 5 Kåre Särs 2024-08-19 20:53:10 UTC
Git commit f011f0df5604cdea269a62bc4cd863d140c13511 by Kåre Särs.
Committed on 19/08/2024 at 20:51.
Pushed by sars into branch 'master'.

Remove unneeded search result expanding limit

M  +1    -1    addons/search/SearchPlugin.cpp

https://invent.kde.org/utilities/kate/-/commit/f011f0df5604cdea269a62bc4cd863d140c13511
Comment 6 Waqar Ahmed 2024-08-23 18:24:23 UTC
Git commit 593c138fe1ac7353a7ff3f91990fe83f00a61b08 by Waqar Ahmed, on behalf of Kåre Särs.
Committed on 23/08/2024 at 18:23.
Pushed by waqar into branch 'release/24.08'.

Remove unneeded search result expanding limit
(cherry picked from commit f011f0df5604cdea269a62bc4cd863d140c13511)

M  +1    -1    addons/search/SearchPlugin.cpp

https://invent.kde.org/utilities/kate/-/commit/593c138fe1ac7353a7ff3f91990fe83f00a61b08