-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove mini-browser dependency in plugin-ext #6644
Conversation
@@ -49,6 +47,8 @@ import { WebviewResourceLoader } from '../../common/webview-protocol'; | |||
import { WebviewResourceCache } from './webview-resource-cache'; | |||
import { Endpoint } from '@theia/core/lib/browser/endpoint'; | |||
|
|||
const TRANSPARENT_OVERLAY_STYLE = 'theia-mini-browser-transparent-overlay'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, but it won't work :( style declaration comes from the mini browser extension
@kittaakos Could we rename the style and move it to the core? It would be generally useful for iframes. We use it already for webview and mini-browser iframes. What would be the good name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to suggest the same thing, and that it should be a generic style moved to core to avoid the issue. Perhaps the style can be renamed as theia-transparent-overlay
(loses the mini-browser
in the name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, @vince-fugnitto please feel free to share the suggested changes for me to add or open a separate PR.
Alternatively I can switch this PR to a branch on Theia so we can collaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thegecko sure, all I would do is move this to an appropriate stylesheet in @theia/core
:
theia/packages/mini-browser/src/browser/style/index.css
Lines 162 to 170 in 0f16fe8
.theia-mini-browser-transparent-overlay { | |
background-color: transparent; | |
position: absolute; | |
top: 0; | |
left: 0; | |
height: 100%; | |
width: 100%; | |
z-index: 999; | |
} |
Rename the class theia-mini-browser-transparent-overlay
to theia-transparent-overlay
, and rename the following as well (to theia-transparent-overlay
):
export const TRANSPARENT_OVERLAY = 'theia-mini-browser-transparent-overlay'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Signed-off-by: Rob Moran <[email protected]>
4ae3cc4
to
28fa8f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Rob Moran [email protected]
What it does
This PR removes the direct dependency on
mini-browser
fromplugin-ext
.This means developers can use the
plugin-ext
extension without having to also accept themini-browser
functionality.How to test
Clone this branch and remove
@theia/mini-browser
and@theia/preview
from the example application.Run the application and confirm the mini-browser functionality no longer appears (e.g. f1 > url preview)
Review checklist
Reminder for reviewers