fix: update themeId
settings after theme change
#1988
Merged
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.
Motivation
In Theia, the current theme ID is not always in sync with the persisted
workbench.colorTheme
preference value. For example, one can preview a theme with theCtrlCmd+K
+CtrlCmd+T
key chords. The theme changes on quick pick selection change events, but the change is persisted only on accept (user pressesEnter
).IDE2 has its way of showing and managing different settings in the UI. When the theme is changed outside the IDE2's UI, the model could get out of sync. This PR ensures that on
workbench.colorTheme
preference change, IDE2's settings model is synchronized with persisted Theia preferences.The theme does not revert on interface scale change:
1987_01.mp4
The theme
<select>
reflects the current theme when the dialog is open:1987_02.mp4
1987_03.mp4
<select>
in the settings dialog:1987_04.mp4
Change description
Other information
Closes #1987
Reviewer checklist