-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
theming: Properly Apply Default Icon Theme #12419
Merged
vince-fugnitto
merged 2 commits into
eclipse-theia:master
from
FernandoAscencio:fa/FileIconProperlyApplied
Apr 20, 2023
Merged
theming: Properly Apply Default Icon Theme #12419
vince-fugnitto
merged 2 commits into
eclipse-theia:master
from
FernandoAscencio:fa/FileIconProperlyApplied
Apr 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit closes issue 11837. The Theme was not applying properly due to the editor reading the theme before it was changed. Signed-Off-By: FernandoAscencio <[email protected]>
vince-fugnitto
approved these changes
Apr 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I confirmed that:
- the file-icons for opened tabs are correctly applied when cycling through available themes
- the file-icons are properly applied for new tabs
- the file-icons are properly applied on restart
@FernandoAscencio @vince-fugnitto Can we merge this? |
This was referenced Nov 27, 2023
This was referenced Nov 28, 2023
This was referenced Dec 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Closes #11837
The issue was caused by the editor reading the theme before the active theme was changed.
In other words, the editor read the previous theme and placed the classes for those icons. Once the theme changed those class icons had no icons associated with them and as such were not able to load.
This commit solves the issue by changing the order of instructions. Assigning the new theme to the active parameter before moving on to the disposing and activating the theme.
How to test
Alternatively, you can use the mouse or arrow keys to select and change between themes.
Notes
Currently, disposing of the current theme triggers the editor to set labels and thus read the icon themes.
The plugins add another event trigger. The
none
theme has this event trigger twice. One in the middle of setting the new theme (the methodsetCurrent
which is default behavior) then another one after the method finishes. Probably due to being tied with theIconThemeService
. The Default/Theia theme only triggered this "reload" event once and thus was the one where the issue was noticeable. This double trigger in thenone
theme does not happen when plugins are not installed.Review checklist
Reminder for reviewers