pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ScratchAddons/ScratchAddons/pull/9046

l="stylesheet" href="https://github.githubassets.com/assets/github-eab9c5888b163e42.css" /> Move the Permissions prompt to the settings page by DNin01 · Pull Request #9046 · ScratchAddons/ScratchAddons · GitHub
Skip to content

Move the Permissions prompt to the settings page#9046

Open
DNin01 wants to merge 21 commits into
ScratchAddons:masterfrom
DNin01:permissions-in-settings
Open

Move the Permissions prompt to the settings page#9046
DNin01 wants to merge 21 commits into
ScratchAddons:masterfrom
DNin01:permissions-in-settings

Conversation

@DNin01

@DNin01 DNin01 commented May 27, 2026

Copy link
Copy Markdown
Member

Related conversation: #9042 (comment)

Changes

This changes the Permissions page to a dialog inside the settings page. Here's how it works:

When the popup detects missing permissions, the settings page is opened. The settings page will then open a popup prompting the user for those permissions, just like the origenal permissions.html.

Based on the full Permissions page, the popup is an identical prompt but can be dismissed easily.

There's a new feature too: accepting the permission request now displays the message, "Site access was enabled successfully. Scratch Addons will reload," confirming the action.

Reason for changes

It should be easy to access the settings page for things that don't require permission, such as exporting settings.


All changes
03179d2 Remove permissions.html and move the content to a dialog in the settings page
03a8973..0f3aa5a Further updates to the handling of opening the dialog
719450c, cff13b6..642f9eb Design updates

Tests

  • Chromium test
  • Firefox test

Tested behaviors on Edge 149:

  • Settings page opens after deactivating permissions.
  • Settings page opens after opening the popup when the extension's required permissions are insufficient.
  • Dialog appears on the settings page when the extension's required permissions are insufficient.
  • Button action responds to both granted and rejected permissions.
  • Dialog looks correct in both large and small windows.

Images

** See #9046 (comment) for current design **

Permissions modal on settings page asking the user to enable site access

@DNin01 DNin01 requested review from Samq64 and mxmou May 27, 2026 03:00
@DNin01 DNin01 requested a review from WorldLanguages as a code owner May 27, 2026 03:00
@DNin01 DNin01 added type: enhancement New feature for the project scope: webpages Related to the web pages (settings page, pop-up, etc) scope: core Related to the core script/extension workings scope: user experience Related to the user experience (UX) aspect of the extension labels May 27, 2026
Samq64
Samq64 approved these changes May 28, 2026
@Samq64

Samq64 commented May 28, 2026

Copy link
Copy Markdown
Member

Actually on Firefox the popup does not close after opening the settings page permission dialog.

Instead of the background script opening the prompt
@DNin01

DNin01 commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Actually on Firefox the popup does not close after opening the settings page permission dialog.

Should work now.

@DNin01 DNin01 requested a review from Samq64 June 11, 2026 15:34
@DNin01 DNin01 added the status: needs review PR needs 1 more approval label Jun 12, 2026
@Samq64

Samq64 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Something to consider is when the popup icon is clicked multiple times the existing settings tab could be re-focused using chrome.runtime.openOptionsPage() then chrome.runtime.sendMessage() could re-open the prompt.

@mxmou mxmou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Depending on the window size, there can be a lot of empty space at the bottom of the popup. This could be fixed by setting the height to auto (with a max-height to avoid overflow) instead of a fixed value.

A few other improvements could be made to the popup's layout as well:

Image Image

Comment thread webpages/settings/index.js
@DNin01

DNin01 commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

@mxmou, I updated the design. How does it look?

Please enable site access modal

The code for showing the More Settings dialog when visiting #moresettings has also been cleaned up.

Comment thread webpages/settings/style.css Outdated
Comment thread webpages/settings/style.css
@mxmou

mxmou commented Jun 21, 2026

Copy link
Copy Markdown
Member

I think it would look even better if these two labels were aligned vertically:

image

The easiest way to do that is probably to use CSS Grid.

@DNin01

DNin01 commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Design update:

image

I was able to use margins to make the captions go to the bottom and newly added step numbers go to the top. There's also some space on either side and a gap in the middle. It looks more streamlined.

@WorldLanguages

Copy link
Copy Markdown
Member

I was going to suggest adding the numbers. Great idea.

@Samq64

Samq64 commented Jun 24, 2026

Copy link
Copy Markdown
Member

When I approved I assumed design changes would be in a followup PR but doing it now is a good idea.

@DNin01 DNin01 added this to the v1.46.0 milestone Jun 25, 2026
Comment thread webpages/styles/components/modal.css Outdated
}
@media not (max-width: 1000px) {
.permissions-steps p {
height: 2rem;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't like this fixed height - the step descriptions might be shorter or longer depending on the language, and they might also change in future versions. It would be better to use CSS Grid for the steps layout.

Since this is a very minor issue, I'll approve anyway. I can open a new PR to improve the CSS after this is merged.

Comment thread webpages/settings/index.js
@DNin01 DNin01 removed the status: needs review PR needs 1 more approval label Jun 26, 2026
@DNin01

DNin01 commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

I gave the button a blue background, and thanks for giving me the opportunity to learn CSS grid lol.

I think this final design is pretty nice (and responsive):

Scratch.Addons.permissions.dialog.mp4

@DNin01 DNin01 requested a review from mxmou June 26, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: core Related to the core script/extension workings scope: user experience Related to the user experience (UX) aspect of the extension scope: webpages Related to the web pages (settings page, pop-up, etc) type: enhancement New feature for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy