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

[vscode] Support ViewBadge and tree/web view badge property #72

Closed
wants to merge 1 commit into from

Conversation

rschnekenbu
Copy link

What it does

Adds support for ViewBadge and badge for tree views and Webview views

Fixes #12020

Contributed on behalf of STMicroelectronics

How to test

This PR adds a badge to Tree based views and webviews contributed by extensions. Thus 2 extensions based on vscode samples are to be tested with this patch.

custom-view-samples-0.0.2.zip This one provides a tree view with 2 actions (change badge value and change tooltip value). The first one will ask for a new value, the second for a new tooltip.

tree-view-badge

calico-colors-0.0.13.zip This one slightly updates the webview view vscode extensions sample, to change the tooltip when the add color is triggered, and to remove the tooltip (set to undefined) when the clear colors is triggered.

webview-view-badge

To test, install the extensions and trigger the action:

  • 'Test View: change badge/tooltip value' to change the badge or its tooltip on the Test View
  • 'Calico Colors: Add color' to add a tooltip to the calico colors test view. The first color does not add a badge, it only shows after the second one.
  • 'Calico Colors: Clear color' to set the badge to undefined, and as indicated by the doc of ViewBadge, the badge is deleted.

Review checklist

Reminder for reviewers

@rschnekenbu rschnekenbu requested a review from sgraband March 21, 2023 13:39
Copy link

@sgraband sgraband left a comment

Choose a reason for hiding this comment

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

Thank you @rschnekenbu! Works great and looks good to me! Just one minor nitpick:
Could you add a note to the test description that the Add Color button inside the view does not increase the badge number? I was a bit confused by this at first.

@rschnekenbu
Copy link
Author

Thanks @sgraband ! Indeed, I forgot to mention the 'Add Color' button not increasing the badge. This will be updated in the official PR.

Extend BadgeWidget with tooltip support
Provide support for badge on tree based views and webview views

Contributed on behalf of STMicroelectronics

Signed-off-by: Remi SCHNEKENBURGER <[email protected]>
@rschnekenbu
Copy link
Author

Close PR, replaced by eclipse-theia#12330

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.

[vscode] Support ViewBadge
2 participants