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

Tree view item's have lost file icons #151663

Closed
mattseddon opened this issue Jun 10, 2022 · 2 comments
Closed

Tree view item's have lost file icons #151663

mattseddon opened this issue Jun 10, 2022 · 2 comments
Assignees

Comments

@mattseddon
Copy link

Does this issue occur when all extensions are disabled?: Yes/No -N/A

Version: 1.68.0
Commit: 4af164e
Date: 2022-06-08T11:44:00.250Z
Electron: 17.4.7
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin x64 21.5.0

Hi, I am one of the authors of the DVC extension for VS Code. Our public release is scheduled for next week.

After upgrading to 1.68.0 today I noticed that our "DVC Tracked" TreeView has lost all of its file icons:

image

Up until today, the view looked like this:

image

Downgrading to 1.67.2 does bring the icons back too:

image

What can I do to get these icons back? Are there some code changes that I can make?

Appreciate any help that you can give me.

Thanks!

Steps to Reproduce:

  1. Update to 1.68.0
  2. View extension's file explorer TreeView
@mattseddon
Copy link
Author

From TreeItem in the API:

        /**
         * The icon path or {@link ThemeIcon} for the tree item.
         * When `falsy`, {@link ThemeIcon.Folder Folder Theme Icon} is assigned, if item is collapsible otherwise {@link ThemeIcon.File File Theme Icon}.
         * When a file or folder {@link ThemeIcon} is specified, icon is derived from the current file icon theme for the specified theme icon using {@link TreeItem.resourceUri resourceUri} (if provided).
         */
        iconPath?: string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon;

Looks like the default value was dropped for files. I can fix the issue by specifically setting:

treeItem.iconPath = isDirectory ? ThemeIcon.Folder : ThemeIcon.File

image

Will leave this here for anyone else that runs into the issue.

@KarimGhallab
Copy link

Same problem here, thank you for the solution ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants