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

Allow to use HTTP resources for webview tabs #6270

Merged
merged 1 commit into from
Sep 27, 2019
Merged

Conversation

vitaliy-guliy
Copy link
Contributor

Signed-off-by: Vitaliy Gulyy vgulyy@redhat.com

What it does

Makes it possible to use HTTP icons for webview tabs opened by plugins.
Adds unimplemented functionality. WebView plugin API describes that any URI referencing on an image can be used for tab icon.

How to test

It's a part of the plugin system.
To test you have to

  • open a webview from your plugin
  • update tab icon with an URI referencing on a remote HTTP image resource

Review checklist

Reminder for reviewers

Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review September 26, 2019 14:38
@akosyakov akosyakov requested a review from olexii4 September 27, 2019 02:04
@akosyakov
Copy link
Member

@vitaliy-guliy sample VS Code extension would help to verify

@olexii4 Could you have a look please?

@akosyakov akosyakov requested a review from benoitf September 27, 2019 02:04
@akosyakov akosyakov added vscode issues related to VSCode compatibility webviews issues related to webviews labels Sep 27, 2019
@akosyakov
Copy link
Member

Would it work with CORS thing btw? It is not related to VS Code extensions?

@akosyakov akosyakov added plug-in system issues related to the plug-in system and removed vscode issues related to VSCode compatibility labels Sep 27, 2019
@vitaliy-guliy
Copy link
Contributor Author

@akosyakov I don't think there will be any problems with CORS. The URI affects only on background image for tab icon

.webview-icon.webview-widget-1-file-icon::before {
    background-image: url(http://host/any/image.png);
}

It also related to VS Code extensions
https://github.com/eclipse-theia/theia/blob/master/packages/plugin/src/theia.d.ts#L2836

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

seems compliant with

$setIconPath(handle: string, iconPath: { light: string; dark: string; } | string | undefined): void {

@vitaliy-guliy
Copy link
Contributor Author

@akosyakov our welcome plugin uses this update
https://github.com/eclipse/che-theia/tree/labeling/plugins/welcome-plugin

You can try to build it and run. It does not use Che plugin API. I suppose it will work perfectly on your side.

PR with updates in Welcome plugin eclipse-che/che-theia#454

Icon field from branding.json is used for tab icon.

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

@vitaliy-guliy thanks, tried, it seems to work

@vitaliy-guliy vitaliy-guliy merged commit 02c5c1d into master Sep 27, 2019
@vitaliy-guliy vitaliy-guliy deleted the labeling branch September 27, 2019 13:02
@nickboldt
Copy link

When will this be included in a release? When is 0.11.1 or 0.12.0 planned to go live?

@benoitf
Copy link
Contributor

benoitf commented Oct 1, 2019

releases of theia are planned each 'last thursday of the month'

@nickboldt
Copy link

Oct 24 is too late if we 're still targeting Oct 29 GA. So this becomes something we have to apply as a patch to 0.11.0 in Che-Theia 7.3

@benoitf
Copy link
Contributor

benoitf commented Oct 1, 2019

@nickboldt we cut che-theia release whenever we want BTW (no need to have upstream tag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system webviews issues related to webviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants