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

change the size of webview icon #5723

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

kpge
Copy link
Contributor

@kpge kpge commented Jul 16, 2019

Fixes: #5722

Signed-off-by: kpge gekangping@126.com

Signed-off-by: kpge <gekangping@126.com>
@akosyakov
Copy link
Member

@kpge How do you test the change?

@akosyakov akosyakov added vscode issues related to VSCode compatibility webviews issues related to webviews labels Jul 18, 2019
@akosyakov akosyakov requested a review from olexii4 July 18, 2019 06:34
@kpge
Copy link
Contributor Author

kpge commented Jul 18, 2019

@kpge How do you test the change?

How to test:

  1. git clone the sample
  2. cd samples/webview-sample-plugin and perform yarn
  3. copy the directory webview-sample-plugin into the plugins folder in Theia
  4. start Theia
  5. run the command Cat: start
  6. move the opened webview widget to different panels (left, right, bottom, main) and verify the icon's size

BTW, the original icon is too small, you can replace it with a bigger icon, I change it to a cat png icon :)

image

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

It works well for me! :)

I tested using the test sample you mentioned and updated the icon myself as well:

Panel

Screenshot from 2019-07-19 07-34-16

Sidepanels

Screenshot from 2019-07-19 07-34-43

I'll give others a chance to review as well.

@akosyakov
Copy link
Member

akosyakov commented Jul 19, 2019

I believe the proper solution is to retrieve icons in the same way as we do in other places of the plugin system, i.e. iconPath should be properly turned into iconUrl by the plugin system, see how it is done for tree view icons

Otherwise we need an additional endpoint to fetch icons for webviews and the code deviate from the standard solution. I would look into this direction, maybe i'm wrong and webviews are special somehow. But If not these code can be simplified to use the proper implementation.

cc @olexii4 @evidolob

@akosyakov
Copy link
Member

@kpge @vince-fugnitto please file an issue regardless to my comment to investigate and proceed with merging

@vince-fugnitto vince-fugnitto merged commit f36c151 into eclipse-theia:master Jul 23, 2019
@kpge kpge deleted the kpge/webview-icon branch July 25, 2019 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility webviews issues related to webviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[webview] icon of webview should be change when it appears on the left or right
3 participants