Skip to content

Commit

Permalink
Remove mini-browser dependency in plugin-ext
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Moran <[email protected]>
  • Loading branch information
thegecko committed Nov 27, 2019
1 parent 6f38e4f commit 28fa8f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
10 changes: 10 additions & 0 deletions packages/core/src/browser/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ textarea {
font-family: var(--theia-ui-font-family);
}

.theia-transparent-overlay {
background-color: transparent;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 999;
}

/*-----------------------------------------------------------------------------
| Import children style files
|----------------------------------------------------------------------------*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export namespace MiniBrowserContentStyle {
export const OPEN = 'theia-mini-browser-open';
export const BUTTON = 'theia-mini-browser-button';
export const DISABLED = 'theia-mini-browser-button-disabled';
export const TRANSPARENT_OVERLAY = 'theia-mini-browser-transparent-overlay';
export const TRANSPARENT_OVERLAY = 'theia-transparent-overlay';
export const ERROR_BAR = 'theia-mini-browser-error-bar';
}
10 changes: 0 additions & 10 deletions packages/mini-browser/src/browser/style/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,3 @@
flex-grow: 1;
border: none; margin: 0; padding: 0;
}

.theia-mini-browser-transparent-overlay {
background-color: transparent;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 999;
}
1 change: 0 additions & 1 deletion packages/plugin-ext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@theia/languages": "^0.12.0",
"@theia/markers": "^0.12.0",
"@theia/messages": "^0.12.0",
"@theia/mini-browser": "^0.12.0",
"@theia/monaco": "^0.12.0",
"@theia/navigator": "^0.12.0",
"@theia/output": "^0.12.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/plugin-ext/src/main/browser/webview/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import { injectable, inject, postConstruct } from 'inversify';
import { WebviewPanelOptions, WebviewPortMapping } from '@theia/plugin';
import { BaseWidget, Message } from '@theia/core/lib/browser/widgets/widget';
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
// TODO: get rid of dependencies to the mini browser
import { MiniBrowserContentStyle } from '@theia/mini-browser/lib/browser/mini-browser-content-style';
import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/application-shell-mouse-tracker';
import { StatefulWidget } from '@theia/core/lib/browser/shell/shell-layout-restorer';
import { WebviewPanelViewState } from '../../../common/plugin-api-rpc';
Expand All @@ -49,6 +47,9 @@ import { WebviewResourceLoader } from '../../common/webview-protocol';
import { WebviewResourceCache } from './webview-resource-cache';
import { Endpoint } from '@theia/core/lib/browser/endpoint';

// Style from core
const TRANSPARENT_OVERLAY_STYLE = 'theia-transparent-overlay';

// tslint:disable:no-any

export const enum WebviewMessageChannels {
Expand Down Expand Up @@ -176,7 +177,7 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget {
this.toDispose.push(this.onMessageEmitter);

this.transparentOverlay = document.createElement('div');
this.transparentOverlay.classList.add(MiniBrowserContentStyle.TRANSPARENT_OVERLAY);
this.transparentOverlay.classList.add(TRANSPARENT_OVERLAY_STYLE);
this.transparentOverlay.style.display = 'none';
this.node.appendChild(this.transparentOverlay);

Expand Down

0 comments on commit 28fa8f9

Please sign in to comment.