Bug 472374 - File System Browser plugin search doesn't work
Summary: File System Browser plugin search doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 23.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-18 22:29 UTC by Pascal
Modified: 2023-08-03 14:04 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal 2023-07-18 22:29:34 UTC
This may be present since a few versions but I ran into it just now, with 23.04.3 and corresponding plugins: The File System Browser's search feature doesn't really find files any more.

STEPS TO REPRODUCE
1. Install 23.04.3 version of Kate plus corresponding plugins
2. Enable File System Browser plugin
3. Browse to folder with documents, try to search them and see if they show up

OBSERVED RESULT
Even when entering a proper search term (=string is included in file names), nothing shows up as result.

EXPECTED RESULT
With files named "Text File copy.txt" being present, a search for "Text" or "text" or even "tex" should show them.

SOFTWARE/OS VERSIONS (happens on production system and freshly installed VM)
Linux/KDE Plasma: Kubuntu 23.04
(available in About System)
KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION (Screenshots)
Files being present - trying to search them - results: zero
[url=https://abload.de/image.php?img=kate3pddi3.png][img]https://abload.de/thumb/kate3pddi3.png[/img][/url] [url=https://abload.de/image.php?img=kate2r0efm.png][img]https://abload.de/thumb/kate2r0efm.png[/img][/url] [url=https://abload.de/image.php?img=kate1uycr5.png][img]https://abload.de/thumb/kate1uycr5.png[/img][/url] 

I've tried this on an older version of Kate and it worked as intended.
Comment 1 Pascal 2023-07-18 22:32:01 UTC
Adding: Searching terms within documents works fine. It's just the File System Browser's search that's affected.
Comment 2 Pascal 2023-08-01 05:26:10 UTC
Even after being on the backports ppa in terms of timely updates (and possible fixes), the problem persists on current and freshly installed machines and is not present on older Kate builds. Strangely enough, I couldn't find any other reports about it.

Additional input and/or confirmation welcome.
Comment 3 Waqar Ahmed 2023-08-01 06:42:38 UTC
Moving to KIO since that's where it's broken, we can't do anything about it in Kate. You can search for `text*` and it will give you all matches.
Comment 4 Pascal 2023-08-01 07:51:50 UTC
Thanks for the tip and info. Much appreciated. I never tried that workaround but it's fine, once you know it. Regarding KIO, I'm assuming this means "KDE input/output" and that's where the fix has to happen?
Comment 5 Friedrich W. H. Kossebau 2023-08-01 09:39:01 UTC
As commented on https://invent.kde.org/frameworks/kio/-/merge_requests/1314#note_728978 I would think that Kate actually relied on a behaviour change that was reverted in the mean time as it broke things for filter expressions as used also in file picker dialogs.

The current (restored) logic in KIO's KCoreDirLister for name filters matches that of Qt for name filter properties. I.e. name filters here using the wildcard expression syntax. Which is non-partial.

The UI pattern used in Kate's File System Browser plugin though is that of narrowing-while-you-type. Where the expression supported usually does not support even wildcards. Rather acts as if every letter is wrapped with wildcards ("sf" matching also "somefile"). So IMHO Kate code would need to convert the expression entered in the field into the syntax used for classic wild card file system expressions, as so far used with class properties of type "name filter".

If you agree, please move the bug back to Kate :)
Comment 6 Pascal 2023-08-01 10:13:00 UTC
Interesting background and suggestion, Friedrich. Thanks for that. I see that you are on this issue for some time already. 

Since I'm new to this system, I'm not sure if your wish regarding the move addressed me or Waqar Ahmed, although I would assume the latter.
Comment 7 Friedrich W. H. Kossebau 2023-08-02 14:58:57 UTC
Moving back to Kate, MR upcoming...
Comment 8 Bug Janitor Service 2023-08-02 15:03:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1274
Comment 9 Christoph Cullmann 2023-08-03 14:04:28 UTC
Git commit 487b28b4de1bbf34cf730e9ff1a9a9f0d5b96efb by Christoph Cullmann, on behalf of Friedrich W. H. Kossebau.
Committed on 03/08/2023 at 15:37.
Pushed by cullmann into branch 'release/23.08'.

File Browser plugin: make search string partial-matching
FIXED-IN: 23.08.0

M  +10   -1    addons/filebrowser/katefilebrowser.cpp

https://invent.kde.org/utilities/kate/-/commit/487b28b4de1bbf34cf730e9ff1a9a9f0d5b96efb
Comment 10 Christoph Cullmann 2023-08-03 14:04:50 UTC
Git commit 8815056d7c9d203525a0a422bbbeb76495e844ce by Christoph Cullmann, on behalf of Friedrich W. H. Kossebau.
Committed on 03/08/2023 at 16:04.
Pushed by cullmann into branch 'master'.

File Browser plugin: make search string partial-matching
FIXED-IN: 23.08.0


(cherry picked from commit 487b28b4de1bbf34cf730e9ff1a9a9f0d5b96efb)

M  +10   -1    addons/filebrowser/katefilebrowser.cpp

https://invent.kde.org/utilities/kate/-/commit/8815056d7c9d203525a0a422bbbeb76495e844ce