Bug 462141 - Collapse entry button does nothing when clicked when there's only one item
Summary: Collapse entry button does nothing when clicked when there's only one item
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-22 21:18 UTC by ratijas
Modified: 2022-11-30 14:42 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2022-11-22 21:18:40 UTC
SUMMARY

Collapse entry button does nothing when clicked.

STEPS TO REPRODUCE
1. Add a custom program to Shortcuts page via "Add Application…" button.
2. Input a shortcut for it.
3. Click "collapse" button on the right of a program name, which is an icon-only button in the header.

OBSERVED RESULT
Button clicks, but nothing happens.

EXPECTED RESULT
Shortcut entry should collapse. If it shouldn't (because it's the only one there for a custom program), then the button should not be present in such section in the first place.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 6.0.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 Nate Graham 2022-11-30 03:48:35 UTC
This happens when there's only one shortcut in the list for that app/service/whatever. In this case, I guess we should remove the collapse button, since it doesn't serve a purpose and doesn't work anyway.
Comment 2 Bug Janitor Service 2022-11-30 03:53:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1269
Comment 3 Nate Graham 2022-11-30 14:41:21 UTC
Git commit f05593c29f968a14cf214d9dd6994f6150d6b8e0 by Nate Graham.
Committed on 30/11/2022 at 03:51.
Pushed by ngraham into branch 'master'.

kcm/keys: don't allow collapsing single shortcut ation list items

The purpose of collapsibility is to have only one item at a time
expanded in multi-item lists. But when there's only one item, this
doesn't make sense, and the button doesn't even do anythign when
clicked. So let's hide it.
FIXED-IN: 5.26.5

M  +2    -0    kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
M  +3    -1    kcms/keys/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/f05593c29f968a14cf214d9dd6994f6150d6b8e0
Comment 4 Nate Graham 2022-11-30 14:42:11 UTC
Git commit 753eff38aa2adb47bf1fbd848ef5004b7cbd37da by Nate Graham.
Committed on 30/11/2022 at 14:42.
Pushed by ngraham into branch 'Plasma/5.26'.

kcm/keys: don't allow collapsing single shortcut ation list items

The purpose of collapsibility is to have only one item at a time
expanded in multi-item lists. But when there's only one item, this
doesn't make sense, and the button doesn't even do anythign when
clicked. So let's hide it.
FIXED-IN: 5.26.5


(cherry picked from commit f05593c29f968a14cf214d9dd6994f6150d6b8e0)

M  +2    -0    kcms/keys/package/contents/ui/ShortcutActionDelegate.qml
M  +3    -1    kcms/keys/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/753eff38aa2adb47bf1fbd848ef5004b7cbd37da