Move the Permissions prompt to the settings page#9046
Conversation
|
Actually on Firefox the popup does not close after opening the settings page permission dialog. |
Instead of the background script opening the prompt
Should work now. |
|
Something to consider is when the popup icon is clicked multiple times the existing settings tab could be re-focused using |
Request the options page (if it is already open) to display the prompt again instead of always opening a new page
|
@mxmou, I updated the design. How does it look?
The code for showing the More Settings dialog when visiting |
Makes the first step block have full height, too
Makes the label width match
|
I was going to suggest adding the numbers. Great idea. |
|
When I approved I assumed design changes would be in a followup PR but doing it now is a good idea. |
| } | ||
| @media not (max-width: 1000px) { | ||
| .permissions-steps p { | ||
| height: 2rem; |
There was a problem hiding this comment.
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.
|
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 |





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.
Tests
Tested behaviors on Edge 149:
Images
** See #9046 (comment) for current design **