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

Badges in Tree View don't work if iconPath is set on tree items #56477

Closed
sebastian-lenz opened this issue Aug 15, 2018 · 1 comment
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tree-views Extension tree view issues verified Verification succeeded
Milestone

Comments

@sebastian-lenz
Copy link

  • VSCode Version: 1.26.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create a TreeDataProvider
  2. Return tree items in getTreeItem that both have a resourceUri and iconPath set.

With the July update this great feature made it into the release of VS Code: #38426. However, as soon as you set a custom icon on the tree items, the feature breaks and badges are no longer shown.

@ramya-rao-a ramya-rao-a added the tree-widget Tree widget issues label Aug 15, 2018
@sandy081 sandy081 added tree-views Extension tree view issues and removed tree-widget Tree widget issues labels Aug 15, 2018
@sandy081 sandy081 added this to the August 2018 milestone Aug 15, 2018
@vscodebot vscodebot bot removed the new release label Aug 21, 2018
@sandy081 sandy081 added the bug Issue identified by VS Code Team member as probable bug label Aug 22, 2018
@sandy081
Copy link
Member

To verify:

treeItem.iconPath = {
			light: element.type === vscode.FileType.File ? path.join(__filename, '..', '..', '..', 'resources', 'light', 'document.svg') : path.join(__filename, '..', '..', '..', 'resources', 'light', 'folder.svg'),
			dark: element.type === vscode.FileType.File ? path.join(__filename, '..', '..', '..', 'resources', 'dark', 'document.svg') : path.join(__filename, '..', '..', '..', 'resources', 'dark', 'folder.svg')
		};
  • npm install
  • npm run watch
  • F5 to start debugging
  • Open a folder in that window
  • Custom File explorer view replicating the file explorer should be shown in the Explorer
  • Verify that you can see badges (Problems, Git) for the files in this view

@octref octref added the verified Verification succeeded label Aug 30, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tree-views Extension tree view issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants