Skip to content

Commit

Permalink
fix #10007: [core] fix typo for ApplicationShell method (#10020)
Browse files Browse the repository at this point in the history
The commit fixes a typo in the `ApplicationShell` method `setTopPanelVisibily`.
The method was renamed to `setTopPanelVisibility` and a note was added to the changelog as a potential breaking change.

Signed-off-by: Shraddha <[email protected]>
  • Loading branch information
5hraddha authored and RomanNikitenko committed Sep 16, 2021
1 parent 9445076 commit 0cf10ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- [core] added `BreadcrumbsRendererFactory` to constructor arguments of `DockPanelRenderer` and `ToolbarAwareTabBar`. [#9920](https://github.com/eclipse-theia/theia/pull/9920)
- [task] `TaskDefinition.properties.required` is now optional to align with the specification [#10015](https://github.com/eclipse-theia/theia/pull/10015)
- [core] `setTopPanelVisibily` renamed to `setTopPanelVisibility` [#10020](https://github.com/eclipse-theia/theia/pull/10020)

## v1.17.2 - 9/1/2021

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/browser/shell/application-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ export class ApplicationShell extends Widget {

if (!environment.electron.is()) {
this.corePreferences.ready.then(() => {
this.setTopPanelVisibily(this.corePreferences['window.menuBarVisibility']);
this.setTopPanelVisibility(this.corePreferences['window.menuBarVisibility']);
});
this.corePreferences.onPreferenceChanged(preference => {
if (preference.preferenceName === 'window.menuBarVisibility') {
this.setTopPanelVisibily(preference.newValue);
this.setTopPanelVisibility(preference.newValue);
}
});
}
Expand Down Expand Up @@ -301,7 +301,7 @@ export class ApplicationShell extends Widget {
this.activeChanged.connect(updateFocusContextKeys);
}

protected setTopPanelVisibily(preference: string): void {
protected setTopPanelVisibility(preference: string): void {
const hiddenPreferences = ['compact', 'hidden'];
this.topPanel.setHidden(hiddenPreferences.includes(preference));
}
Expand Down

0 comments on commit 0cf10ca

Please sign in to comment.