mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
feat: Added better support for customizable UI, b=(no-bug), c=common, workspaces
This commit is contained in:
@@ -259,3 +259,13 @@
|
||||
:root:not([customizing]) #TabsToolbar-customization-target > #alltabs-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[customizing] #TabsToolbar-customization-target {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
:root[customizing] #zen-sidebar-top-buttons-customization-target {
|
||||
border: 1px dashed;
|
||||
border-radius: 2px;
|
||||
margin: 10px 2px 0 0;
|
||||
}
|
||||
|
@@ -832,6 +832,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
window.addEventListener('TabRemovedFromEssentials', tabUpdateListener);
|
||||
window.addEventListener('TabPinned', tabUpdateListener);
|
||||
window.addEventListener('TabUnpinned', tabUpdateListener);
|
||||
window.addEventListener('aftercustomization', tabUpdateListener);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2567,7 +2568,10 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
target = null;
|
||||
}
|
||||
// Only animate if it's from an event
|
||||
const animateContainer = target && target.target instanceof EventTarget;
|
||||
let animateContainer = target && target.target instanceof EventTarget;
|
||||
if (target?.type === 'TabClose') {
|
||||
animateContainer = target.target.pinned;
|
||||
}
|
||||
await this.onPinnedTabsResize(
|
||||
// This is what happens when we join a resize observer, an event listener
|
||||
// while using it as a method.
|
||||
@@ -2595,6 +2599,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (!this._hasInitializedTabsStrip || (this._organizingWorkspaceStrip && !forAnimation)) {
|
||||
return;
|
||||
}
|
||||
if (document.documentElement.hasAttribute('customizing')) return;
|
||||
// forAnimation may be of type "ResizeObserver" if it's not a boolean, just ignore it
|
||||
if (typeof forAnimation !== 'boolean') {
|
||||
forAnimation = false;
|
||||
|
Reference in New Issue
Block a user