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

Remove mini-browser dependency in plugin-ext #6644

Merged
merged 1 commit into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
vince-fugnitto marked this conversation as resolved.
Show resolved Hide resolved
this.transparentOverlay.style.display = 'none';
this.node.appendChild(this.transparentOverlay);

Expand Down