Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

UI for manage Theia development mode #13

Merged
merged 2 commits into from
Jun 6, 2018
Merged

UI for manage Theia development mode #13

merged 2 commits into from
Jun 6, 2018

Conversation

vitaliy-guliy
Copy link

Adds a status bar element displaying the state of Theia instance with hosted plugin.
Adds a status bar element notifying that Theia is running in dev mode with hosted plugin.

Issues to be resolved
Add info about Dev mode instance to the main Theia one eclipse-che/che#9402
Add UI to differ developer mode in Theia eclipse-che/che#9214

screenshot from 2018-05-11 17-56-33

screenshot from 2018-05-11 17-57-03

screenshot from 2018-05-11 17-57-24

39516426-9f13191a-4e05-11e8-960a-774bf6c132c5 1

39516435-a15ccefa-4e05-11e8-9fc7-c1835e94d609

@benoitf
Copy link

benoitf commented May 12, 2018

are the changes for core packages proposed upstream ?

* Adds 'Development Host' status bar element and appends the same prefix to window title.
*/
@injectable()
export class HostedPluginInformer {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this class should implement FrontendApplicationContribution
and registered through
bind(FrontendApplicationContribution).to(HostedPluginInformer).inSingletonScope();

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix line ending please.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added new empty line to the end

@@ -87,6 +80,7 @@ export class StatusBarImpl extends VirtualWidget implements StatusBar {

async setElement(id: string, entry: StatusBarEntry): Promise<void> {
await this.ready;
(entry as any).elementId = id;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we apply elementId to the StatusBarEntry interface to prevent such casting: (entry as any)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been already reworked

@vitaliy-guliy
Copy link
Author

vitaliy-guliy commented Jun 4, 2018

PR to upstream containing proposals to core package merged!
eclipse-theia#1840

import { StatusBarAlignment, StatusBarEntry, FrontendApplicationContribution } from '@theia/core/lib/browser';
import { HostedPluginServer } from '../../common/plugin-protocol';
import { HostedPluginManagerClient, HostedPluginState, HostedPluginCommands } from './plugin-manager-client';
import { CommandRegistry } from "@phosphor/commands";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use " or ' - common for all

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

if (!pluginMetadata) {
this.frontendApplicationStateService.reachedState('ready').then(() => {
this.hostedPluginManagerClient.onStateChanged(e => {
if (e === 'starting') {
Copy link

@ashumilova ashumilova Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be moved to constants or enum

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

| 'running'
| 'stopping'
| 'failed';

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be better to use :
export enum HostedPluginState {
Stopped = 'stopped',
Starting = 'starting',
Running = 'running',
Stopping= 'stopping',
Failed = 'failed'
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vitaliy-guliy vitaliy-guliy merged commit 9b631db into master Jun 6, 2018
@vitaliy-guliy vitaliy-guliy deleted the dev-mode branch June 6, 2018 09:51
benoitf pushed a commit that referenced this pull request Jun 13, 2018
* UI for development mode

* Code improvements
benoitf pushed a commit that referenced this pull request Jun 18, 2018
* UI for development mode

* Code improvements
benoitf pushed a commit that referenced this pull request Jun 18, 2018
* UI for development mode

* Code improvements
benoitf pushed a commit that referenced this pull request Jun 19, 2018
* UI for development mode

* Code improvements
benoitf pushed a commit that referenced this pull request Jun 19, 2018
* UI for development mode

* Code improvements

Signed-off-by: Vitaliy Gulyy <vguliy@codenvy.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants