feat: Initially hide essentials that wont be required on the current workspace, b=(no-bug), c=workspaces

This commit is contained in:
mr. m
2025-05-22 11:26:19 +02:00
parent b6fc0e4db7
commit cce90e6ddc
2 changed files with 10 additions and 0 deletions

View File

@@ -423,6 +423,15 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
essentialsContainer.setAttribute('flex', '1');
essentialsContainer.setAttribute('container', container);
document.getElementById('zen-essentials').appendChild(essentialsContainer);
// Set an initial hidden state if the essentials section is not supposed
// to be shown on the current workspace
if (
this.containerSpecificEssentials &&
this.getActiveWorkspaceFromCache()?.containerTabId != container
) {
essentialsContainer.setAttribute('hidden', 'true');
}
}
return essentialsContainer;
}