Skip to content

Commit 2ac1db0

Browse files
committed
chore: Fixed git conflicts for compact mode fix, b=no-bug, c=compact-mode
1 parent 00b132d commit 2ac1db0

File tree

1 file changed

+9
-45
lines changed

1 file changed

+9
-45
lines changed

src/zen/compact-mode/ZenCompactMode.mjs

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -359,47 +359,11 @@
359359
) {
360360
return;
361361
}
362-
<<<<<<< Updated upstream
363362
delete gZenVerticalTabsManager._hadSidebarCollapse;
364363
this.sidebar.style.setProperty('--zen-sidebar-width', `${sidebarWidth}px`);
365364
}
366365
return sidebarWidth;
367366
},
368-
=======
369-
if (document.documentElement.hasAttribute('zen-sidebar-expanded')) {
370-
sidebarWidth -= 0.5 * splitterWidth;
371-
if (elementSeparation < splitterWidth) {
372-
// Subtract from the splitter width to end up with the correct element separation
373-
sidebarWidth += 1.5 * splitterWidth - elementSeparation;
374-
}
375-
} else {
376-
sidebarWidth -= elementSeparation;
377-
}
378-
if (canHideSidebar && isCompactMode) {
379-
this._setElementExpandAttribute(this.sidebar, false);
380-
gZenUIManager.motion
381-
.animate(
382-
this.sidebar,
383-
{
384-
marginRight: [0, this.sidebarIsOnRight ? `-${sidebarWidth}px` : 0],
385-
marginLeft: [0, this.sidebarIsOnRight ? 0 : `-${sidebarWidth}px`],
386-
},
387-
{
388-
ease: 'easeIn',
389-
type: 'spring',
390-
bounce: 0,
391-
duration: 0.12,
392-
}
393-
)
394-
.then(() => {
395-
this.sidebar.style.transition = 'none';
396-
this.sidebar.style.pointEvents = 'none';
397-
const titlebar = document.getElementById('titlebar');
398-
titlebar.style.visibility = 'hidden';
399-
titlebar.style.transition = 'none';
400-
this.sidebar.removeAttribute('animate');
401-
document.documentElement.removeAttribute('zen-compact-animating');
402-
>>>>>>> Stashed changes
403367

404368
get canHideSidebar() {
405369
return (
@@ -456,16 +420,16 @@
456420
resolve();
457421
return;
458422
}
459-
if (canHideSidebar && isCompactMode) {
460-
if (document.documentElement.hasAttribute('zen-sidebar-expanded')) {
461-
sidebarWidth -= 0.5 * splitterWidth;
462-
if (elementSeparation < splitterWidth) {
463-
// Subtract from the splitter width to end up with the correct element separation
464-
sidebarWidth += 1.5 * splitterWidth - elementSeparation;
465-
}
466-
} else {
467-
sidebarWidth -= elementSeparation;
423+
if (document.documentElement.hasAttribute('zen-sidebar-expanded')) {
424+
sidebarWidth -= 0.5 * splitterWidth;
425+
if (elementSeparation < splitterWidth) {
426+
// Subtract from the splitter width to end up with the correct element separation
427+
sidebarWidth += 1.5 * splitterWidth - elementSeparation;
468428
}
429+
} else {
430+
sidebarWidth -= elementSeparation;
431+
}
432+
if (canHideSidebar && isCompactMode) {
469433
this._setElementExpandAttribute(this.sidebar, false);
470434
gZenUIManager.motion
471435
.animate(

0 commit comments

Comments
 (0)