Bug 502692 - Filename filter UX is confusing as it's not clear setting mimetypes is also required
Summary: Filename filter UX is confusing as it's not clear setting mimetypes is also r...
Status: ASSIGNED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 6.3.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-11 20:59 UTC by Mike
Modified: 2025-05-11 17:01 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2025-04-11 20:59:25 UTC
SUMMARY
Desktop Filter does not work with "Filter->Files" set to "Show matching" or "Hide matching"

STEPS TO REPRODUCE
1. From "Desktop Folder Settings", set Location to "Desktop folder"
2. Set filter to "Hide matching"
3. Enter a filename pattern, e.g. "*.png"

OBSERVED RESULT
Files matching "*.png" are still shown

EXPECTED RESULT
Files matching "*.png" should be hidden

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora Kinoite 41
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-04-16 17:34:44 UTC
This was just fixed the other day for Plasma 6.4.0, in fact!
Comment 2 cwo 2025-05-09 07:11:23 UTC
That commit only affects the buttons at the bottom of the list that allow the user to quickly check and uncheck all the items.

It is somewhat related, because the Filter functionality always requires the mimetypes to be set, even if you just want to filter by filename.

So to hide all *.png files, you need to select "Hide matching", set the filename filter to "*.png" and check  the image/png mimetype in the ListView.  Or select all of them, really, with slightly different behavior.

The conditions are AIUI:

1) "Hide all" selected,  "File name pattern" set to "*.png", no mimetypes checked in the ListView: Hides all files matching "*.png" that have no mimetype at all. Probably useless
2)  "Hide all" selected,  "File name pattern" empty, "image/png" checked in the ListView: Hides all files with png mimetype, regardless of whether they have a ".png" extension or not
3)  "Hide all" selected,  "File name pattern" set to "*.png", "image/png" checked in the ListView: Hides all files with png mimetype and a ".png" extension
4)  "Hide all" selected,  "File name pattern" set to "*.png", all mimetypes checked in the ListView: Hides all files with the extension ".png" even if it's a different file type (but not png-format files with a different extension)
5) "Hide all" selected,  "File name pattern" empty, all mimetypes checked in the ListView: Hides everything no matter the type and name

It's rather flexible, but non-trivial to understand and the likely most common thing that people want (4) is somewhat opaque.

Making it work more like users would expect might be non-trivial, but we could at least help the user a bit by showing an InlineMessage if "Hide all" or "Show all" are selected and  a filter pattern is set. I'm not sure if the message should always show in that case, show only if there's one or more unchecked mimetypes, or only if all mimetypes are unchecked.

I'd lean toward the second, and maybe a text like "The file name pattern will only apply to files of the selected file types" and maybe a button "Apply to All Files" that checks every type (like the button below the ListView does). What do you think, Nate?
Comment 3 cwo 2025-05-09 07:17:15 UTC
(wish we had an edit feature)

If the filename is empty, it only seems to match files with no name, which is pretty useless - probably needs an InlineMessage as well.
Comment 4 Bug Janitor Service 2025-05-11 17:01:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2987