Skip to content

Conversation

@ElianHugh
Copy link
Collaborator

What problem did you solve?

Resolves #757. This adds icons to the webviews contributed by VSCode-R. At present, VSC-R webviews use the default webview panel icon. I think it would be useful if we changed these to icons that better explain what the panel is at a glance.

As webview.iconPath currently requires a URI, we can't use the new ThemeIcon() call, so icons have been obtained from the vscode icon repo. This PR adds the following icons:

  • globe.svg (used by viewer and browser)
  • graph.svg (used by plot viewer)
  • open-preview.svg (used by data view)
  • preview.svg (used by rmd preview)
  • help.svg (used by help viewer)

Screenshot

image

- Use the UriIcon constructor to create icon uris
- Removes the search.svg icon, as open-preview.svg was used instead
Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

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

Works nicely!

LGTM

@renkun-ken renkun-ken merged commit 415a2a3 into REditorSupport:master Aug 19, 2021
ElianHugh added a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
* Add icons to webviews

* Use class for icon sourcing

- Use the UriIcon constructor to create icon uris

* Remove unused icon

- Removes the search.svg icon, as open-preview.svg was used instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use vscode icons for webview.iconPath

3 participants