Enhance Zen styling and transitions for improved user experience

This commit is contained in:
mr. M
2025-01-19 13:55:57 +01:00
parent 25910c5189
commit 08cf77eb23
4 changed files with 13 additions and 6 deletions

View File

@@ -147,7 +147,7 @@ var gZenCompactModeManager = {
if (canHideSidebar && isCompactMode) {
window.requestAnimationFrame(() => {
this.sidebar.style.position = 'unset';
this.sidebar.style.transition = 'margin .25s ease-in-out';
this.sidebar.style.transition = 'margin .17s ease';
this.sidebar.style.left = '0';
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = `${-1 * sidebarWidth}px`;
@@ -172,7 +172,7 @@ var gZenCompactModeManager = {
this._isAnimating = false;
});
});
}, 450);
}, 170);
});
});
} else if (canHideSidebar && !isCompactMode) {
@@ -188,7 +188,7 @@ var gZenCompactModeManager = {
}
window.requestAnimationFrame(() => {
this.sidebar.style.transition = 'margin .25s ease, transform .275s ease, opacity .1s ease';
this.sidebar.style.transition = 'margin .17s ease, transform .275s ease, opacity .1s ease';
// we are in compact mode and we are exiting it
if (!this.sidebarIsOnRight) {
this.sidebar.style.marginLeft = '0';

View File

@@ -1290,6 +1290,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
async _performWorkspaceChange(window, { onInit = false, explicitAnimationDirection = undefined } = {}) {
const previousWorkspace = await this.getActiveWorkspace();
if (previousWorkspace && previousWorkspace.uuid === window.uuid && !onInit) {
return;
}
this.activeWorkspace = window.uuid;
const containerId = window.containerTabId?.toString();
const workspaces = await this._workspaces();