fix: Hide 'Change Name' for Spaces in collapsed toolbar mode, p=#10896, c=workspaces

* fix: Hide 'Change Name' for Spaces in collapsed toolbar mode

* fix: remove CSS, move comment and run lint:fix
This commit is contained in:
Ryosuke
2025-10-21 22:57:01 +09:00
committed by GitHub
parent e449fc6e2e
commit c59f7fdbc0
2 changed files with 6 additions and 8 deletions

View File

@@ -618,12 +618,6 @@
--tab-min-width: 48px !important;
--zen-toolbox-padding: 6px !important;
--zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2);
/* We can't show the rename input properly in collapsed state,
so hide the workspace edit input */
#context_zenEditWorkspace {
display: none;
}
}
#navigator-toolbox:not([zen-sidebar-expanded='true']) {

View File

@@ -1225,9 +1225,13 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
};
const workspaceName = document.getElementById('context_zenEditWorkspace');
const themePicker = document.getElementById('context_zenChangeWorkspaceTheme');
/* We can't show the rename input properly in collapsed state,
so hide the workspace edit input */
const isCollapsed = !Services.prefs.getBoolPref('zen.view.sidebar-expanded');
workspaceName.hidden =
this.#contextMenuData.workspaceId &&
this.#contextMenuData.workspaceId !== this.activeWorkspace;
isCollapsed ||
(this.#contextMenuData.workspaceId &&
this.#contextMenuData.workspaceId !== this.activeWorkspace);
themePicker.hidden =
this.#contextMenuData.workspaceId &&
this.#contextMenuData.workspaceId !== this.activeWorkspace;