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

Unexpected folder behavior with file icon theme contribution from VS Code extension #12727

Closed
jcortell68 opened this issue Jul 18, 2023 · 4 comments · Fixed by #12776
Closed
Assignees

Comments

@jcortell68
Copy link
Contributor

jcortell68 commented Jul 18, 2023

Bug Description:

I was playing around creating a file icon theme with a VS Code extension. My theme has but one icon--it tries to replace what's shown for a folder.

And it works...kind of. My icon is shown when the folder is collapsed, but isn't shown when the folder is expanded. In VS Code, my icon override is shown in both collapsed and expanded states.

In Theia, it ends up looking like this:
image
image

BTW, when the default icon theme is active, the folder icon is shown in both states.

Steps to Reproduce:

git clone -b icon_themes https://github.com/jcortell68/theiasandbox
cd theiasandbox
yarn
yarn start:electron

Choose My File Icon Theme as the icon theme in Theia's preferences.

Additional Information

  • Operating System: Windows
  • Theia Version: 1.39
@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

I'll be happy to look into this.

cdamus added a commit to cdamus/jcortell68-theiasandbox that referenced this issue Jul 27, 2023
Fixes eclipse-theia/theia#12727

Signed-off-by: Christian W. Damus <[email protected]>
@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

Hi, @jcortell68 . This appears to be working as expected. VS Code (and also Theia) distinguishes between "folder" and "folderExpanded" in the icon themes, to allow for visual differentiation of the expansion state. See the VS Code API documentation for details.

I've created a PR on your sandbox repo that fixes the problem: jcortell68/theiasandbox#2

@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

Oops, sorry, I did not observe (or forgot) that this shouldn't be necessary as it is not required in VS Code, where the expanded icon defaults to the folder icon if absent from the theme definition. Theia should provide the same fall-back behaviour.

cdamus added a commit to cdamus/theia that referenced this issue Jul 27, 2023
In file icon themes, VS Code will use the
"folder" icon also for expanded folders
in the case that the theme omits the
"folderExpanded" entry. Theia should
do the same for consistency.

Fixes eclipse-theia#12727

Signed-off-by: Christian W. Damus <[email protected]>
@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

Oops, sorry, I did not observe (or forgot) that this shouldn't be necessary as it is not required in VS Code, where the expanded icon defaults to the folder icon if absent from the theme definition. Theia should provide the same fall-back behaviour.

I've created PR #12776 to implement ape the VS Code fall-back behaviour.

cdamus added a commit to cdamus/theia that referenced this issue Jul 31, 2023
In file icon themes, VS Code will use the
"folder" icon also for expanded folders
in the case that the theme omits the
"folderExpanded" entry. Theia should
do the same for consistency.

Fixes eclipse-theia#12727

Signed-off-by: Christian W. Damus <[email protected]>
msujew pushed a commit that referenced this issue Aug 1, 2023
In file icon themes, VS Code will use the
"folder" icon also for expanded folders
in the case that the theme omits the
"folderExpanded" entry. Theia should
do the same for consistency.

Fixes #12727

Signed-off-by: Christian W. Damus <[email protected]>
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 a pull request may close this issue.

2 participants