-
Notifications
You must be signed in to change notification settings - Fork 62
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
Discussion: add a way to show a modal #347
Comments
You don't need extensive permissions to do that, but just
I do this to inject sidebars, "cmd-k" palettes and other types of modal. For the visual part of the equation, the upcoming However I do agree that extensions are extremely limited UI-wise and they're always dependent on the host page (e.g. if the host navigates away, the extension is lost). It would be nice to have such a layer on top of tabs (not necessarily a modal) and as a standalone document. |
What upcoming |
That's pretty much it, but that page doesn't do it justice. Here it is, recently renamed to
That article has a demo with exactly for what you're suggesting: YZYZwDE0PQB9Qte16F7R.mp4 |
I see. This is quite similar to the dialog element. As you pointed out, hiding the popover when the page navigates is a genuine concern. Also, injecting a script still has the limitations I mentioned above: it can't run on internal pages (the new tab page and other |
If such a UI were to ever be implemented I'm going to assume those pages will be off-limits still because you know a malicious extension will eventually add an overlay onto |
Maybe Shadow DOM can be used? |
An extension doesn't need broad host permissions, but this approach still gives the extension full access to the document once invoked. Ideally, extensions would have a way to put UI in front of the user without receiving access to sensitive data unnecessarily. |
What's the incentive? The only reason would be that Chrome could then allow such overlays on I still agree that extensions would benefit from better UI access (popovers, sidebars) that doesn't require interacting with the current document, but "access" doesn't sound like an issue. |
Switching this to neutral. I am still very interested in such an API personally, but it isn't something Chrome is likely to prioritize and I don't think there are clear next steps right now. |
Existing extensions, such as Omni, inject a content script on every single website only to display a popup in the middle of the screen.
This is bad for several reasons:
As of today, Omni doesn't have any other way to display a modal (or chromeless window) in the middle of the screen.
I'm working on an extension that somewhat resembles Cmd-T UI from Arc:
Much like Omni, it displays a modal in the middle of the screen.
Modal API
How is it different from the dialog element?
How would the API look?
options:
Default to true
When present, top/left options are ignored
Events:
browser.modal.onOpened
browser.modal.onClosed
Prior work:
This is a continuation of #307, which we decided to close (as noted in the meeting notes).
The text was updated successfully, but these errors were encountered: