feat(sidebar): Notion-style collapse/peek, desktop reopen button, Ctrl+\\ toggle
FlowDeck CI / lint (push) Successful in 45s
FlowDeck CI / test (push) Successful in 4m20s
FlowDeck CI / docker (push) Successful in 40s

Stop collapsing the sidebar on navigation (was hiding the nav when opening Shared pages). Show the hamburger in the top-left on desktop when collapsed, add a left-edge hover zone that floats the sidebar in and auto-collapses on mouse leave, and bind Ctrl/Cmd+\\ to toggle it.
This commit is contained in:
2026-09-12 22:41:22 -04:00
parent 61a33a7891
commit 9836c85e24
4 changed files with 67 additions and 8 deletions
+9 -1
View File
@@ -325,6 +325,14 @@
fdLoad(window.location.href, false);
});
// Ctrl/Cmd + \ : toggle the sidebar (Notion-style).
document.addEventListener('keydown', function(e) {
if ((e.ctrlKey || e.metaKey) && (e.key === '\\' || e.code === 'Backslash')) {
e.preventDefault();
document.dispatchEvent(new CustomEvent('fd-toggle-sidebar'));
}
});
// Programmatic navigation used by Alpine helpers.
window.fdNavigate = function(url, opts) {
opts = opts || {};
@@ -379,7 +387,7 @@
var doc = new DOMParser().parseFromString(d.serverResponse, 'text/html');
var mw = doc.querySelector('.main-wrapper');
if (mw) d.serverResponse = mw.outerHTML;
} catch (e) { /* keep original response on parse failure */ }
} catch { /* keep original response on parse failure */ }
});
document.body.addEventListener('htmx:afterSwap', function(evt) {