PHANTOM
🇮🇳 IN
Skip to content

confirm-actions: Add setting to ask for confirmation before signing out#8853

Open
iqnite wants to merge 4 commits intoScratchAddons:masterfrom
iqnite:confirm-signout
Open

confirm-actions: Add setting to ask for confirmation before signing out#8853
iqnite wants to merge 4 commits intoScratchAddons:masterfrom
iqnite:confirm-signout

Conversation

@iqnite
Copy link
Contributor

@iqnite iqnite commented Feb 19, 2026

Resolves #8741

Changes

Added a setting to the confirm-actions addon 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.

image

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

Copilot AI review requested due to automatic review settings February 19, 2026 22:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mxmou
Copy link
Member

mxmou commented Feb 22, 2026

Supports both Scratch 3.0 and 2.0 pages, but not the editor, since the addon only runs on the website and I don't know if I should expand the addon's scope.

The addon does run in the editor as well (because it uses the "https://scratch.mit.edu/*" match pattern), but it doesn't do anything there at the moment. I think it would make sense for the sign out confirmation to appear everywhere, including the editor. The addon can still have the community tag because it's primarily for the website.

Copy link
Member

@mxmou mxmou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to sign out in the editor, the confirmation appears, but when I click Yes, nothing happens.

@iqnite
Copy link
Contributor Author

iqnite commented Feb 23, 2026

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.

@DNin01
Copy link
Member

DNin01 commented Feb 23, 2026

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?

@mxmou
Copy link
Member

mxmou commented Feb 23, 2026

The addon should probably just disable that popup to avoid showing two confirmations in a row.

@DNin01
Copy link
Member

DNin01 commented Feb 24, 2026

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Option For Confirmation Addon

4 participants