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

Fixes: stuck status bar, problems setting wording #199468

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/vs/workbench/contrib/markers/browser/markers.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ class MarkersStatusBarContributions extends Disposable implements IWorkbenchCont
) {
super();
this.markersStatusItem = this._register(this.statusbarService.addEntry(this.getMarkersItem(), 'status.problems', StatusbarAlignment.LEFT, 50 /* Medium Priority */));
this.markersStatusItemOff = this._register(this.statusbarService.addEntry(this.getMarkersItemTurnedOff(), 'error-kind', StatusbarAlignment.LEFT, 49));
this.markersStatusItemOff = this._register(this.statusbarService.addEntry(this.getMarkersItemTurnedOff(), 'status.problemsVisibility', StatusbarAlignment.LEFT, 49));
this._register(this.markerService.onMarkerChanged(() => {
this.markersStatusItem.update(this.getMarkersItem());
this.markersStatusItemOff.update(this.getMarkersItemTurnedOff());
Expand All @@ -595,15 +595,13 @@ class MarkersStatusBarContributions extends Disposable implements IWorkbenchCont

private getMarkersItemTurnedOff(): IStatusbarEntry {
const config = this.configurationService.getValue('problems.visibility');
if (config) {
return { name: '', text: '', ariaLabel: '', tooltip: '', command: '' };
}
this.statusbarService.updateEntryVisibility('status.problemsVisibility', !config);

const openSettingsCommand = 'workbench.action.openSettings';
const configureSettingsLabel = 'problems.visibility';
const configureSettingsLabel = '@id:problems.visibility';
const tooltip = !config ? localize('problemsOff', "Problems have been turned off.") : '';
return {
name: localize('status.problems.off', "Problems"),
name: localize('status.problemsVisibility', "Problems Visibility"),
text: '$(whole-word)',
ariaLabel: tooltip,
tooltip,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis
'type': 'object',
'properties': {
'problems.decorations.enabled': {
'markdownDescription': localize('markers.showOnFile', "Show Errors & Warnings on files and folder. Overwritten by `#problems.visibility#` when `{0}` is off.", `problems.visibility`),
'markdownDescription': localize('markers.showOnFile', "Show Errors & Warnings on files and folder. Overwritten by `#problems.visibility#` when it is off."),
'type': 'boolean',
'default': true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis
'default': 'alwaysExpand'
},
[OutlineConfigKeys.problemsEnabled]: {
'markdownDescription': localize('outline.showProblem', "Show errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when `{0}` is off.", `problems.visibility`),
'markdownDescription': localize('outline.showProblem', "Show errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when it is off."),
'type': 'boolean',
'default': true
},
[OutlineConfigKeys.problemsColors]: {
'markdownDescription': localize('outline.problem.colors', "Use colors for errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when `{0}` is off.", `problems.visibility`),
'markdownDescription': localize('outline.problem.colors', "Use colors for errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when it is off."),
'type': 'boolean',
'default': true
},
[OutlineConfigKeys.problemsBadges]: {
'markdownDescription': localize('outline.problems.badges', "Use badges for errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when `{0}` is off.", `problems.visibility`),
'markdownDescription': localize('outline.problems.badges', "Use badges for errors and warnings on Outline elements. Overwritten by `#problems.visibility#` when it is off."),
'type': 'boolean',
'default': true
},
Expand Down