fix: Fixed glance flashing when fully expanding, b=no-bug, c=folders, glance, tabs

This commit is contained in:
Mr. M
2025-08-15 14:34:07 +02:00
parent 4e2dfd8a13
commit 4304e19cbb
4 changed files with 11 additions and 14 deletions

View File

@@ -23,6 +23,10 @@ tab-group[split-view-group] {
transition: margin-inline-start 0.15s ease-in-out; transition: margin-inline-start 0.15s ease-in-out;
} }
& .tab-group-label {
height: 100% !important;
}
& .tab-group-container { & .tab-group-container {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@@ -208,7 +212,7 @@ zen-folder {
:root:not([zen-sidebar-expanded]) & { :root:not([zen-sidebar-expanded]) & {
width: var(--tab-min-width) !important; width: var(--tab-min-width) !important;
margin: var(--tab-block-margin) auto !important; margin: 0 !important;
& .tab-group-label { & .tab-group-label {
visibility: hidden !important; visibility: hidden !important;

View File

@@ -149,7 +149,6 @@
this.browserWrapper?.removeAttribute('animate'); this.browserWrapper?.removeAttribute('animate');
this.browserWrapper?.removeAttribute('animate-end'); this.browserWrapper?.removeAttribute('animate-end');
this.browserWrapper?.removeAttribute('animate-full');
this.browserWrapper?.removeAttribute('has-finished-animation'); this.browserWrapper?.removeAttribute('has-finished-animation');
this.overlay?.removeAttribute('post-fade-out'); this.overlay?.removeAttribute('post-fade-out');
@@ -610,7 +609,6 @@
finishOpeningGlance() { finishOpeningGlance() {
gBrowser.tabContainer._invalidateCachedTabs(); gBrowser.tabContainer._invalidateCachedTabs();
gZenWorkspaces.updateTabsContainers(); gZenWorkspaces.updateTabsContainers();
this.browserWrapper.removeAttribute('animate-full');
this.overlay.classList.remove('zen-glance-overlay'); this.overlay.classList.remove('zen-glance-overlay');
this._clearContainerStyles(this.browserWrapper); this._clearContainerStyles(this.browserWrapper);
this.animatingFullOpen = false; this.animatingFullOpen = false;
@@ -627,8 +625,6 @@
const browserRect = window.windowUtils.getBoundsWithoutFlushing(this.browserWrapper); const browserRect = window.windowUtils.getBoundsWithoutFlushing(this.browserWrapper);
this.#currentTab.removeAttribute('zen-glance-tab'); this.#currentTab.removeAttribute('zen-glance-tab');
this._clearContainerStyles(this.browserWrapper); this._clearContainerStyles(this.browserWrapper);
this.browserWrapper.removeAttribute('has-finished-animation');
this.browserWrapper.setAttribute('animate-full', true);
this.#currentTab.removeAttribute('glance-id'); this.#currentTab.removeAttribute('glance-id');
this.#currentParentTab.removeAttribute('glance-id'); this.#currentParentTab.removeAttribute('glance-id');
gBrowser.selectedTab = this.#currentTab; gBrowser.selectedTab = this.#currentTab;
@@ -651,6 +647,7 @@
return; return;
} }
// Write the styles early to avoid flickering // Write the styles early to avoid flickering
this.browserWrapper.style.opacity = 1;
this.browserWrapper.style.width = `${browserRect.width}px`; this.browserWrapper.style.width = `${browserRect.width}px`;
this.browserWrapper.style.height = `${browserRect.height}px`; this.browserWrapper.style.height = `${browserRect.height}px`;
await gZenUIManager.motion.animate( await gZenUIManager.motion.animate(
@@ -660,10 +657,13 @@
height: ['100%', '100%'], height: ['100%', '100%'],
}, },
{ {
duration: 0.4, duration: 0.5,
type: 'spring', type: 'spring',
} }
); );
this.browserWrapper.style.width = '';
this.browserWrapper.style.height = '';
this.browserWrapper.style.opacity = '';
gZenViewSplitter.deactivateCurrentSplitView({ removeDeckSelected: true }); gZenViewSplitter.deactivateCurrentSplitView({ removeDeckSelected: true });
this.finishOpeningGlance(); this.finishOpeningGlance();
} }

View File

@@ -142,13 +142,6 @@
transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
} }
&[animate-full='true'] {
transform: translate(-50%, -50%);
& .zen-glance-sidebar-container {
opacity: 0 !important;
}
}
&[animate='true'] { &[animate='true'] {
position: absolute; position: absolute;
} }

View File

@@ -331,7 +331,7 @@ var ZenPinnedTabsStorage = {
} }
if (!tabCheck[0].getResultByName('folder_parent_uuid')) { if (!tabCheck[0].getResultByName('folder_parent_uuid')) {
throw new Error(`Tab with UUID ${tabUuid} is not in a group`); return;
} }
const now = Date.now(); const now = Date.now();