When asked to switch sessions, jump to session creation if there's nothing to…

Authored by ngraham on Sep 17 2019, 5:34 PM.

Description

When asked to switch sessions, jump to session creation if there's nothing to switch to

Summary:
TL;DR version: whenever you currently would be taken to a session switcher page where the only possible action is to go to SDDM and start a new session, instead just show SDDM immediately instead.

Currently, the session switcher screen suffers from a few UX problems:

  • There's a fake "start new session" item that looks like a button but isn't clickable
  • Asking to switch users always goes to the screen where you can switch to existing sessions even if there are no existing sessions to switch to, which is an unnecessary extra step

This patch aims to solve those problems in the following ways:

  • Don't show a fake "start new session" item in the Breeze theme; instead add a real button in the UI to do this
  • When asked to show the session management screen and there is only one session so the on;y thing you could do on that screen is create another session, instead just go to session creation directly
  • For themes where the fake "start new session" button is shown, use a better icon that doesn't make it look like a clickable button

BUG: 386361
FIXED-IN: 5.17.0

Depends on D23279

Test Plan:

  1. Have only one session > Kickoff/Kicker/dash/Krunner > Switch User -> you go directly to SDDM where you can start a new session
  2. Start a new session, then Switch user again -> you go to the session management screen where you can switch to the other session, or start a new one

Videos:
Clicking "Switch User" when there are no other sessions:

Clicking "Switch User" when there is another session to switch to, and then switching to it:

Clicking "Switch User" when there is another session to switch to, and then starting a new session:

Switching between multiple sessions in the session switcher:

If the fake "New Session" item is shown (e.g in other themes), here's what it now looks like:

Reviewers: Plasma, VDG, GB_2, mart

Reviewed By: Plasma, VDG, GB_2, mart

Subscribers: GB_2, gregormi, broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D23283