Skip to content

Commit f91682b

Browse files
committed
Fix flickering when toggling Show All mode
- Hide markers during layout transition to prevent position flicker - Add fade-in animation for sidebars - Increase timeout to allow layout to settle before repositioning
1 parent 16c85ea commit f91682b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

layouts/_default/list.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,12 @@
429429
overflow-y: auto;
430430
padding: 2px;
431431
scrollbar-width: thin;
432+
animation: sidebarFadeIn 0.2s ease-out;
433+
}
434+
435+
@keyframes sidebarFadeIn {
436+
from { opacity: 0; }
437+
to { opacity: 1; }
432438
}
433439

434440
body.frame-mode .frame-sidebar-left {
@@ -751,11 +757,18 @@
751757

752758
// Frame mode toggle
753759
frameToggle.addEventListener('click', function () {
760+
// Hide markers during transition to prevent flicker
761+
markers.forEach(m => m.style.visibility = 'hidden');
762+
754763
document.body.classList.toggle('frame-mode');
755764
this.classList.toggle('active');
756765
this.textContent = this.classList.contains('active') ? 'Hide All' : 'Show All';
757-
// Reposition markers after layout change
758-
setTimeout(positionMarkers, 50);
766+
767+
// Reposition markers after layout settles, then show them
768+
setTimeout(() => {
769+
positionMarkers();
770+
markers.forEach(m => m.style.visibility = '');
771+
}, 100);
759772
});
760773

761774
// Help toggle

0 commit comments

Comments
 (0)