confirm-actions: Add setting to ask for confirmation before signing out#8853
confirm-actions: Add setting to ask for confirmation before signing out#8853iqnite wants to merge 4 commits intoScratchAddons:masterfrom
confirm-actions: Add setting to ask for confirmation before signing out#8853Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds a new setting to the confirm-actions addon to ask for confirmation when users attempt to sign out from their Scratch account. This helps prevent accidental sign-outs when users are navigating the user dropdown menu.
Changes:
- Added "Confirm signing out" setting to the confirm-actions addon
- Implemented sign-out detection for both Scratch 3.0 and 2.0 interfaces
- Added localization strings for sign-out confirmation messages
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| addons/confirm-actions/userscript.js | Added sign-out detection logic with selectors for both Scratch 3.0 (.account-nav dropdown) and Scratch 2.0 (logout form) |
| addons/confirm-actions/addon.json | Added "signingout" boolean setting with default false, updated version to 1.45.0 |
| addons-l10n/en/confirm-actions.json | Added English localization strings for sign-out confirmation title and message |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The addon does run in the editor as well (because it uses the |
mxmou
left a comment
There was a problem hiding this comment.
When I try to sign out in the editor, the confirmation appears, but when I click Yes, nothing happens.
Just noticed the same issue. Oddly, when instead of clicking Yes I press Enter, it signs me out. Will look into this later. |
|
I also want to mention some weird behavior on Scratch's end… If you have unsaved changes and you click "Sign out" in the editor, a confirmation alert will appear asking you if you want to leave the page. If you click cancel to stay on the page (so that you can save your changes first) then click save, the save will fail because you've actually already signed out; you only canceled the redirect to the home page. Should that be handled? |
|
The addon should probably just disable that popup to avoid showing two confirmations in a row. |
On top of that, the addon's confirmation popup could also warn the user that they'll lose unsaved changes if there are any or allow the user to choose whether or not to save their project before signing out (like in #8700). |
Resolves #8741
Changes
Added a setting to the
confirm-actionsaddon to ask for confirmation when clicking "Sign out" in the user dropdown. Supports both Scratch 3.0 and 2.0 pages, and the editor.Also fixed a bug that prevented the confirmation to show up when deleting projects.
Reason for changes
The confirmation prevents users from accidentally signing out while using the user dropdown.
Tests
Tested on Microsoft Edge 145.0.3800.65