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

webview: add support for activeWebviewPanelId #12182

Merged
merged 4 commits into from
Feb 23, 2023

Conversation

vince-fugnitto
Copy link
Member

What it does

The pull-request adds support for the activeWebviewPanelId when context-clause which matches the viewType of the currently active webview panel.

How to test

  1. start the application with the cat-coding-0.0.2.zip plugin
  2. trigger the command cat coding: start cat coding session
  3. a webview should appear with a lightbulb toolbar item - clicking the toolbar should trigger an information notification
  4. open an editor - it should not show the lightbulb toolbar item
  5. switch back to the webview - the toolbar item should appear
activewebviewpanelid.mp4

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility webviews issues related to webviews labels Feb 14, 2023
@vince-fugnitto vince-fugnitto changed the title webiew: add support for activeWebviewPanelId webview: add support for activeWebviewPanelId Feb 14, 2023
Copy link

@Rodrigoplp-work Rodrigoplp-work left a comment

Choose a reason for hiding this comment

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

This is great!

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Seems like I didn't submit my review after I was done with it. Looks good to me 👍

vince-fugnitto and others added 4 commits February 23, 2023 08:04
The commit adds support for the `activeWebviewPanelId`
when-context-clause.

Signed-off-by: vince-fugnitto <[email protected]>
Instead of having every `WebviewWidget` try to update the same context
key, this commit adds a new component that listens for widget updates
once and updates the context key accordingly.
Signed-off-by: vince-fugnitto <[email protected]>
Signed-off-by: vince-fugnitto <[email protected]>
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.

5 participants