@theia/core 1.71.0-next.51 → 1.71.0-next.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -718,8 +718,8 @@ export class CommonFrontendContribution implements FrontendApplicationContributi
718
718
  execute: title => title?.owner && this.shell.toggleMaximized(title?.owner),
719
719
  }));
720
720
  commandRegistry.registerCommand(CommonCommands.SHOW_MENU_BAR, {
721
- isEnabled: () => !isOSX,
722
- isVisible: () => !isOSX,
721
+ isEnabled: () => !this.isElectron() || !isOSX,
722
+ isVisible: () => !this.isElectron() || !isOSX,
723
723
  execute: () => {
724
724
  const menuBarVisibility = 'window.menuBarVisibility';
725
725
  const visibility = this.preferences[menuBarVisibility];
@@ -205,7 +205,7 @@ export class ApplicationConnectionStatusContribution extends DefaultFrontendAppl
205
205
  protected handleOffline(): void {
206
206
  this.statusBar.setElement(this.statusbarId, {
207
207
  alignment: StatusBarAlignment.LEFT,
208
- text: nls.localize('theia/core/offline', 'Offline'),
208
+ text: nls.localizeByDefault('Offline'),
209
209
  tooltip: nls.localize('theia/localize/offlineTooltip', 'Cannot connect to backend.'),
210
210
  priority: 5000
211
211
  });
@@ -143,7 +143,14 @@ export class DynamicMenuBarWidget extends MenuBarWidget {
143
143
  protected previousFocusedElement: HTMLElement | undefined;
144
144
 
145
145
  constructor() {
146
- super();
146
+ // Disable Lumino's overflow menu feature. The feature has a bug where
147
+ // `onUpdateRequest` consumes a stale `_overflowIndex` (only recomputed at the
148
+ // end of the method), which causes a RangeError when the menu bar is rendered
149
+ // at zero width. Additionally, Theia's CSS does not constrain the menu bar's
150
+ // offsetWidth to the available space, so the overflow detection never triggers.
151
+ // See https://github.com/eclipse-theia/theia/issues/17352
152
+ // See https://github.com/jupyterlab/lumino/issues/811
153
+ super({ overflowMenuOptions: { isVisible: false } });
147
154
  // HACK we need to hook in on private method _openChildMenu. Don't do this at home!
148
155
  DynamicMenuBarWidget.prototype['_openChildMenu'] = () => {
149
156
  if (this.activeMenu instanceof DynamicMenuWidget) {