Implement user confirmation when logging out.
This should have a user preference since not everyone would like this extra step.
Wish: Logout Confirmation
This task was created as part of Wikimedia Wishathon 2024
Implement user confirmation when logging out.
This should have a user preference since not everyone would like this extra step.
Wish: Logout Confirmation
This task was created as part of Wikimedia Wishathon 2024
This might be a good use case for the Codex Dialog, making sure to only load the subset of components you need for better performance, assuming this will be rendered on most (if not all?) pages.
Change 1011369 had a related patch set uploaded (by HMonroy; author: HMonroy):
[mediawiki/core@master] Add temporary feature flag for logout confirmation
@CCiufo-WMF We'll look at implementing it in Codex :)
@JSengupta-WMF Any idea what the confirmation logout should say?
What are the implications of accidental logout? Do users lose any unsaved data? I can write the message according to that.
Change 1011369 merged by jenkins-bot:
[mediawiki/core@master] Add temporary feature flag for logout confirmation
@HMonroy I'd like to work on this, but need some guidance given the latest commit you made https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1011369.
@JSengupta-WMF we were review the UX for this project and it would probably makes sense to send users that want to confirm the logout to Special:UserLogout page. This already happens for users that do not have Javascript enabled.
So users that want to confirm their logout can be redirected to Special:UserLogout where they can confirm logging out.
Please let me know your thoughts on this :)
@BamLifa Awesome! Would you be interested in working on a patch that introduces a user preference for this feature? Something like ConfirmLogoutEnabled.
@HMonroy I'm interested in that. I'd like to have some guidance and documentation to help get started with easy.
Does this really need a user preference? (cf T54777: user_properties table bloat and others over time), Logouts in theory shouldn't be happening enough that having to click a verify button to logout should be a large issue.
Change 1011413 had a related patch set uploaded (by HMonroy; author: HMonroy):
[mediawiki/core@master] Send user to Special:UserLogout when they activate confirm logout
@BamLifa My apologies for the delay. I believe we are in a very different timezones (mine is UTC-8) so we are having trouble connecting. I submitted the patch above which includes the user preference. Please take a look and let me know if you have any questions.
@Peachey88 We did discuss whether this should be a user preference. We determined that since there are different opinions about adding the confirmation logout step, we want to allow users to opt-in to this feature. Since this is a bool, it will not increase by much the size of the table.
@HMonroy can the confirmation be on a popup instead of sending the user to a Special page? We can also include a setting on the same pop up saying "Do not ask me for confirmation in the future". But in that case we have to include the option to enable it again in the user preference. WDYT?
We can also include a setting on the same pop up saying "Do not ask me for confirmation in the future".
I get the impression that the idea here should be to add this new preference but default it to off. That way, the only people who will get shown the confirmation step are those who have already opted in to it. So it might be a bit redundant to then ask those people whether they actually want the confirmation. That said, I think this is a good idea, it's just more work than not doing it. :)
The main things I like about sending people to the special page are that it doesn't involve loading much extra code (on every page) to handle the process, and that it matches the experience of people who have JS disabled. If we add the dialog, there will have to be a separate loading state after clicking while it loads an extra module (this is similar to how the watchstar works, before it shows the expiry popup). That extra delay isn't a huge issue, but for people on slow connections it might be noticible (although they're also wanting a confirmation step so presumably waiting a couple of seconds after clicking logout won't be too painful).
Another thing we can do is to improve Special:UserLogout so that the confirmation can be disabled from there (perhaps via a checkbox that immediately updates the user preference). The logout page could also be improved — currently it says "Do you want to log out? [Submit]" which reads quite strangely I think. There's also no 'cancel' option.
Change #1015611 had a related patch set uploaded (by Krinkle; author: Krinkle):
[mediawiki/core@master] MainConfigSchema: Consistently mark unstable flags as `@unstable`
Change #1015611 merged by jenkins-bot:
[mediawiki/core@master] MainConfigSchema: Consistently mark unstable flags as `@unstable`
Updates on the progress made during Wishathon (March 2024) by @BamLifa and team:
https://meta.wikimedia.org/wiki/Community_Tech/Wishathon/March_2024/Logout_confirmation