Skip to content

Conversation

@CGNonofr
Copy link
Contributor

BREAKING CHANGE: the useColorTheme was returning a mutable instance which breaks the react contract

BREAKING CHANGE: the useColorTheme was returning a mutable instance which breaks the react contract
@CGNonofr CGNonofr self-assigned this Feb 21, 2023
const disposable = themeService.onDidColorThemeChange(() => {
setTheme(themeService.getColorTheme())
const disposable = StandaloneServices.get(IThemeService).onDidColorThemeChange(() => {
setColorValues(colors.map(getCurrentThemeColor))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onDidColorThemeChange is called when the user configuration workbench.colorCustomizations is changed but the IColorTheme instance doesn't change, so the setTheme doesn't trigger a new render

@CGNonofr CGNonofr merged commit 29eeb6a into main Feb 21, 2023
@CGNonofr CGNonofr deleted the replace-useColorTheme-by-useThemeColor branch February 21, 2023 15:06
@github-actions
Copy link

🎉 This PR is included in version 4.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants