Bug 447847

Summary: Display style 'Grid', unnecessary entries
Product: [Applications] plasma-systemmonitor Reporter: Stefan Lux <stefan.lux>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: ahiemstra, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.23.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.24
Sentry Crash Report:

Description Stefan Lux 2022-01-02 17:06:10 UTC
SUMMARY
When using the display style 'Grid', below the field 'Number of columns', another selection field (combo box) 'Display style' is displayed. This contains the same entries as the primary one, not all of which make sense here. IMO only 'Bar Chart', 'Horizontal Bars', 'Line Chart', 'Pie Chart' and 'Text Only' are applicable here. The values 'Applications Table' and 'Process Table' show one application/process table per selected sensor, which is not very useful. The value 'Grid' duplicates the configuration area for grid, showing yet another 'Display Style' selection field, which can yet again be set to 'Grid', and so forth.

STEPS TO REPRODUCE
1. Click button 'Edit Page'
2. Select a sensor for editing; example CPU Total Usage
3. Change display style to 'Grid'
4. (optional) Change the new display style that has appeared below 'Number of Columns' to 'Grid'
5. (optional) GOTO 4

OBSERVED RESULT
Every time 'Grid' is selected, another display style field is displayed. If Applications Table' or 'Process Table' are selected, those tables are shown for each selected sensor instead of a sensor value.

EXPECTED RESULT
The second 'Display Style' selection should only contain values that make sense for the grid to display.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Comment 1 Bug Janitor Service 2022-01-28 11:10:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libksysguard/-/merge_requests/212
Comment 2 Nate Graham 2022-01-28 18:14:51 UTC
Git commit 685a43af094a66cc629caa8f7255ed633a95c9c9 by Nate Graham, on behalf of Arjen Hiemstra.
Committed on 28/01/2022 at 18:14.
Pushed by ngraham into branch 'master'.

faces/facegrid: Filter out some display styles from the config

Selecting grid as display style for the grid just leads to useless
recursion. The process and applications tables also don't make a whole
lot of sense to display in a grid, so exclude those as well.
FIXED-IN: 5.24

M  +34   -9    faces/facepackages/facegrid/contents/ui/Config.qml

https://invent.kde.org/plasma/libksysguard/commit/685a43af094a66cc629caa8f7255ed633a95c9c9
Comment 3 Nate Graham 2022-01-28 18:20:43 UTC
Git commit 6b91d8ab6be0db90fcd8a1873863c526874b73ff by Nate Graham, on behalf of Arjen Hiemstra.
Committed on 28/01/2022 at 18:20.
Pushed by ngraham into branch 'Plasma/5.24'.

faces/facegrid: Filter out some display styles from the config

Selecting grid as display style for the grid just leads to useless
recursion. The process and applications tables also don't make a whole
lot of sense to display in a grid, so exclude those as well.
FIXED-IN: 5.24


(cherry picked from commit 685a43af094a66cc629caa8f7255ed633a95c9c9)

M  +34   -9    faces/facepackages/facegrid/contents/ui/Config.qml

https://invent.kde.org/plasma/libksysguard/commit/6b91d8ab6be0db90fcd8a1873863c526874b73ff