-
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
Add missing StatusBarItem fields of VS Code API #11026
Add missing StatusBarItem fields of VS Code API #11026
Conversation
* Add missing properties `id`, `name`, `backgroundColor` to `StatusBarItem` API * Handle properties in implementation and forward to frontend * Add backgroundColor handling to `StatusBar` * In the plugin context, if no status bar item id is given, do NOT use the extension id as specified in the VS Code API. Instead, keep the current logic of generating a unique id. Contributed on behalf of STMicroelectronics Signed-off-by: Lucas Koehler <[email protected]>
b478610
to
8de4ba3
Compare
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.
Adapt Theia's light theme in your repository to have warning and error colors because the theme's in Theia do not have them, yet: Add to packages/monaco/data/monaco-themes/vscode/light_theia.json to colors property:
"statusBarItem.errorBackground": "#c72e0f", "statusBarItem.warningBackground": "#c7b50f", "statusBarItem.errorForeground": "#ffffff", "statusBarItem.warningForeground": "#000"
@lucas-koehler given that the changes rely on the following theming colors, part of the changes should be to register the defaults for these theming colors (so even if a theme does not set them they still work):
The commit registers the following theming colors for statusbar items: - `statusBarItem.errorBackground` - `statusBarItem.errorForeground` - `statusBarItem.warningBackground` - `statusBarItem.warningForeground` Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto Thanks for the feedback! I agree that it makes sense to add default colors. I cherry-picked and tested your commit. Is that alright with you? |
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.
The changes look good to me. I can confirm that the extension performs as expected 👍
@vince-fugnitto anything to add?
Of course, I tried to make it easy for you to consume :) |
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.
I also confirm that the changes work well using the example plugin 👍
What it does
Fixes #11019
id
,name
,backgroundColor
toStatusBarItem
APIStatusBar
Instead, keep the current logic of generating a unique id.
Contributed on behalf of STMicroelectronics
Signed-off-by: Lucas Koehler [email protected]
status-bar-item-properties.mp4
How to test
#0000FF
), for 3 or more lines the warning colors should be usedReview checklist
Reminder for reviewers