Bug 426970

Summary: Filter button is somewhat buggy and confusing as a ToolButton; consider making it a ComboBox
Product: [Plasma] plasmashell Reporter: Andres Betts <anditosan1000>
Component: Widget ExplorerAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, nate
Priority: NOR Keywords: usability
Version: 5.19.90   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=431953
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description Andres Betts 2020-09-25 19:01:53 UTC
SUMMARY
When clicking the "All Widgets" button, the button needs to show that it is selected by showing the pressed state. It currently does not.

Another issue appears to be that the button will not close the submenu when pressed a second time. It should if it uses the pressed state.

Another expected behavior is for the submenu to show directly below the button rather than outside the panel. When the user clicks one of the filter options, the submenu should disappear and the widgets should be sorted.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2020-09-26 15:40:55 UTC
It should probably look like a combobox rather than a toolbutton, which is how the Filter feature is presented in the colors KCM. It's much clearer there. This would fix all of those issues. Looks non-trivial to port though.
Comment 2 Andres Betts 2020-09-27 13:17:17 UTC
That would make more sense.
Comment 3 David Redondo 2020-09-28 12:23:47 UTC
If we make it a combobox, we can't have the filter icon there. (The color kcm uses a hack specific to the desktop style). We can make the button not flat, but then we don't have the arrow in button. We could the arrow symbol (▼) in the text but then we again have the issue that it is rendered as an emoji for some people.
Comment 4 Nate Graham 2021-03-04 19:11:21 UTC
An alternative approach would involve implementing the proposal at Bug 431953 and using a combobox for the filter functionality only. Then we could use more text (e.g. "Show Installed" instead of the filter icon).
Comment 5 Bug Janitor Service 2024-08-22 20:45:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2467
Comment 6 Niccolò Venerandi 2024-08-22 20:54:56 UTC
Git commit 8488c4b7d5cc8d8c492178882fda4c0aed7d0f59 by Niccolò Venerandi.
Committed on 22/08/2024 at 20:54.
Pushed by niccolove into branch 'master'.

Make widgets filter ToolButton work as ComboBox

M  +3    -0    desktoppackage/contents/explorer/WidgetExplorer.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/8488c4b7d5cc8d8c492178882fda4c0aed7d0f59