Bug 450182

Summary: Removing user results in visually broken UI
Product: [Applications] systemsettings Reporter: Nicolas Fella <nicolas.fella>
Component: kcm_usersAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate, notmart, uhhadd
Priority: NOR    
Version: 5.24.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.24.2
Attachments: Screenshot

Description Nicolas Fella 2022-02-13 23:02:24 UTC
STEPS TO REPRODUCE
1. In Users KCM, create a second user 
2. Open that user
3. Delete the user

OBSERVED RESULT
Right half of the UI disappears, including the header. See screenshot

EXPECTED RESULT
Another user's details are opened, or at least the header fills the full width 

SOFTWARE/OS VERSIONS
KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 5.15-kde
Comment 1 Nicolas Fella 2022-02-13 23:03:10 UTC
Created attachment 146687 [details]
Screenshot
Comment 2 Marco Martin 2022-02-14 08:30:54 UTC
IIRc those are 2 kirigami pages, one for the sidebar one for the user details must be that eleting an user removes or hides also the page, while it should either go to an empty state or load a different user
Comment 3 Bug Janitor Service 2022-02-14 10:04:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1454
Comment 4 Marco Martin 2022-02-22 14:17:01 UTC
Git commit 0a3c947fa27f472a2d532bc5f65d83d029946c99 by Marco Martin.
Committed on 22/02/2022 at 14:16.
Pushed by mart into branch 'master'.

Always ensure there is an user selected

when creating or deleting a user is not enough to pop the old page,
but a new user needs to be selected (either the newly created one or the
one just on top of the deleted one) so that the kcm doesn't stay
half empty with an ui that looks broken

M  +2    -4    kcms/users/package/contents/ui/CreateUser.qml
M  +2    -6    kcms/users/package/contents/ui/UserDetailsPage.qml
M  +22   -1    kcms/users/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/0a3c947fa27f472a2d532bc5f65d83d029946c99
Comment 5 Marco Martin 2022-02-22 15:13:30 UTC
Git commit 3e32e78ece5f416c0d2b38a0951232ce86686a92 by Marco Martin.
Committed on 22/02/2022 at 15:13.
Pushed by mart into branch 'Plasma/5.24'.

Always ensure there is an user selected

when creating or deleting a user is not enough to pop the old page,
but a new user needs to be selected (either the newly created one or the
one just on top of the deleted one) so that the kcm doesn't stay
half empty with an ui that looks broken

M  +2    -4    kcms/users/package/contents/ui/CreateUser.qml
M  +2    -6    kcms/users/package/contents/ui/UserDetailsPage.qml
M  +22   -1    kcms/users/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/3e32e78ece5f416c0d2b38a0951232ce86686a92