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

Offer ability to add permission when using @pixiebrix/get and other bricks #3054

Closed
1 task
fregante opened this issue Mar 29, 2022 · 3 comments · Fixed by #3672
Closed
1 task

Offer ability to add permission when using @pixiebrix/get and other bricks #3054

fregante opened this issue Mar 29, 2022 · 3 comments · Fixed by #3672
Labels
page editor user experience Improve the user experience (UX)
Milestone

Comments

@fregante
Copy link
Contributor

The error surfaced by the @pixiebrix/get is not actionable:

Screen Shot 2

Current fix:

  1. Visit the URL (hoping you won't be redirected elsewhere)
  2. Open editor
  3. Click on the "Enable PB" button

Ideal fix:

  • Show "Enable PB on this domain" button next to the error (or in its place). Maybe via ErrorDisplay?

Side quest:

  • Make it work even if it redirects across domains. 😬 For example the url https://fregante.com redirects to https://twitter.com, so I think adding a permission for fregante.com/* is not enough or not necessary at all. I'm not sure whether this is fixable since we don't have access to the final URL that fetch requests.
@fregante fregante added the user experience Improve the user experience (UX) label Mar 29, 2022
@twschiller
Copy link
Contributor

twschiller commented Mar 30, 2022

Current fix

This fixes it for your current browser install, but does not fix it if you were to redeploy on another computer.

Ideal fix

When the user clicks the button , the Page Editor needs to add the origin to the permissions.origins declaration on the extension: https://docs.pixiebrix.com/developer-guide/multi-page-automation#e9f10aaf9a7d4127ad0af9106b6b5297

We'll need to update the:

Other considerations:

  • We want this to work for both @pixiebrix/get and @pixiebrix/http bricks. (Or composite bricks that use those under the hood)
  • From a security perspective: in the case of a redirect, the Page Editor should prompt 2x: first time for the initial URL, and for the redirected URL.

Related Issues:

@fregante
Copy link
Contributor Author

@twschiller twschiller added this to the 1.6.4 milestone May 17, 2022
@twschiller twschiller modified the milestones: 1.6.4, 1.6.5 May 26, 2022
@fregante fregante changed the title Offer ability to add permission when using @pixiebrix/get Offer ability to add permission when using @pixiebrix/get and other bricks Jun 6, 2022
@twschiller twschiller modified the milestones: 1.6.5, 1.7.0 Jun 7, 2022
@twschiller twschiller self-assigned this Jun 12, 2022
twschiller added a commit that referenced this issue Jun 13, 2022
twschiller added a commit that referenced this issue Jun 13, 2022
@fregante
Copy link
Contributor Author

fregante commented Aug 2, 2022

Reopening because there's still no way to add a permission. It's clear (even to me) how to add a permission. Can we add this button when the error is detected?

Screen Shot

@fregante fregante reopened this Aug 2, 2022
@twschiller twschiller removed their assignment Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
page editor user experience Improve the user experience (UX)
Development

Successfully merging a pull request may close this issue.

3 participants