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

plugin-ext: default the folderExpanded icon #12776

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

cdamus
Copy link
Contributor

@cdamus cdamus commented Jul 27, 2023

What it does

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.

This PR implements the same fall-back in Theia for consistency.

Fixes #12727

How to test

  1. Follow the OP's directions in Unexpected folder behavior with file icon theme contribution from VS Code extension #12727 to clone and build a same myext extension with a custom file icon theme.
  2. Link the myext extension package into your plugins/ folder.
  3. As directed in the issue description, launch Theia and select the "My File Icon Theme" file icon theme.
  4. See that the custom folder icon is shown in both expanded and collapsed states.

Furthermore, edit the file icon theme in the myext to

  • set a different icon (the extension resources/ conveniently includes additional icons) as the "folderExpanded" and see that it works as expected, showing that icon in expanded state and the other in collapsed state
  • set "folderExpanded": null or "folderExpanded": "" to explicitly ask for no icon for expanded state and see that this also works

Review checklist

Reminder for reviewers

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.

Looks good to me 👍

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 <cdamus.ext@eclipsesource.com>
@cdamus
Copy link
Contributor Author

cdamus commented Jul 31, 2023

Thanks, @msujew commit 54b363a implements a for TS-ish test expression.

@msujew msujew merged commit cd0aec7 into eclipse-theia:master Aug 1, 2023
6 checks passed
@cdamus cdamus deleted the issue/12727 branch August 1, 2023 12:14
@jcortell68
Copy link
Contributor

@cdamus Thanks for fixing this!

@vince-fugnitto vince-fugnitto added this to the 1.41.0 milestone Aug 31, 2023
@vince-fugnitto vince-fugnitto added the theming issues related to theming label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theming issues related to theming
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Unexpected folder behavior with file icon theme contribution from VS Code extension
4 participants