Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A button on an addon card to actually enable the addon #259

Closed
penguinmoose opened this issue Sep 10, 2022 · 7 comments · Fixed by #461
Closed

A button on an addon card to actually enable the addon #259

penguinmoose opened this issue Sep 10, 2022 · 7 comments · Fixed by #461
Labels
scope: content Related to the contents of the website, excluding blog and docs type: enhancement New feature or request

Comments

@penguinmoose
Copy link
Contributor

penguinmoose commented Sep 10, 2022

Problem
If I find an addon on the Addons page that I like (and I have Scratch Addons installed), I would want to use it. However, this means finding the addon elsewhere, which is not too hard but still a few extra steps.

Proposed solution
A button that says something like + enable addon on each addon card, probably at the bottom after the description would be nice (if addons are viewed as a list, the button would probably be a + icon placed somewhere). It would enable the addon by doing the following:

  1. Button gets pressed.
  2. Page appends a parameter to the URL that includes the addon id - something like ?enableaddon={addon-id}. This can be done using this method.
  3. Extension will recognize this URL and enable the addon. When this is done successfully, the parameter will be removed from the URL.
  4. When there is no longer a parameter, the addons page will show a "success" message.

Alternative methods

  • Instead of the extension constantly checking for the parameter, there can be instructions directing the user to click on the extension icon, and only will the extension check when it is clicked. Instead of a success message displayed on the page, the extension can display it. This also eliminates the problem of the user trying to enable an addon through this method when Scratch Addons is not installed.
  • (credit to WorldLanguages) The button would instead simply link to the corresponding addon on the full screen settings.
@WorldLanguages
Copy link
Member

Best solution right now is that addon cards could link to https://scratch.mit.edu/scratch-addons-extension/settings#addon-editor-dark-mode

@penguinmoose
Copy link
Contributor Author

penguinmoose commented Sep 13, 2022

@WorldLanguages True, that could be a possibility. It's probably the most simple solution. I think it's the best way to do this.

@Hans5958 Hans5958 changed the title In addons page, a button on an addon card to actually enable the addon A button on an addon card to actually enable the addon Sep 13, 2022
@Hans5958 Hans5958 added type: enhancement New feature or request scope: content Related to the contents of the website, excluding blog and docs labels Sep 13, 2022
@Hans5958
Copy link
Member

I would also think that a parameter to automatically turn on the addon, so it takes one click instead of two, would be better, but I guess that's just me.

@WorldLanguages
Copy link
Member

I would also think that a parameter to automatically turn on the addon, so it takes one click instead of two, would be better, but I guess that's just me.

That could work, if the extension had a way to check the authenticity of the "enable request". Alternatively, we could consider the case where no one tries to use a feature like this maliciously.
As of now, users can only enable addons while on the chrome-extension:// context, which has extra protections, such as no other browser extension being able to interact with those pages. Currently, no other browser component can toggle addons on the user's behalf.

@penguinmoose
Copy link
Contributor Author

penguinmoose commented Sep 18, 2022

That could work, if the extension had a way to check the authenticity of the "enable request". Alternatively, we could consider the case where no one tries to use a feature like this maliciously. As of now, users can only enable addons while on the chrome-extension:// context, which has extra protections, such as no other browser extension being able to interact with those pages. Currently, no other browser component can toggle addons on the user's behalf.

Good point. If some script could add this parameter without the user’s consent or knowledge, that could lead to problems.

One way to solve the “user may not know” problem that may occur if this is used maliciously is for the addon to show a small confirmation popup when an addon is enabled this way. This can also be made so that the user can turn the feature on or off through Scratch Addons if problems arise.

@GrahamSH-LLK
Copy link
Member

At that point it's still taking 2 clicks and is probably easier just to manually enable (plus less complexity)

@penguinmoose
Copy link
Contributor Author

@GrahamSH-LLK By confirmation popup, I mean a simple message in the corner alerting you that the addon has been enabled. If you ignore the popup for a few seconds, it will automatically go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: content Related to the contents of the website, excluding blog and docs type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants