feat(bookslm): bouton toggle cacher/afficher la sidebar dans le header
CI / lint (push) Successful in 37s
CI / security (push) Successful in 24s
CI / test (push) Successful in 49s
CI / build (push) Successful in 22s
CI / e2e (push) Successful in 6m16s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

Même mécanisme que le sidebar de navigation gauche :
- Bouton .bookslm-btn-toggle dans le header (icône panel-right-close/open)
- Toggle la classe .hidden sur le panel, persiste dans localStorage
- État restauré au prochain open()
- Le panel reste monté (pas de teardown), juste slid off-screen
- CSS : .bookslm-panel.open.hidden → translateX(100%)
- CSS : .bookslm-btn-toggle suit le pattern .sidebar-toggle-btn

i18n : bookslm.toggle_sidebar ajouté (fr + en)
Import safeCreateIcons ajouté pour rafraîchir l'icône Lucide au toggle.

Vérifié :
- pytest : 504 passed (zéro régression)
- ruff : All checks passed
- frontend unit : 7 passed
- validate-imports : 30 modules / 204 exports
- pane-manager JSDOM : 9/9
This commit is contained in:
2026-09-07 13:59:00 -04:00
parent 0d29dd00fd
commit 5350738c22
4 changed files with 61 additions and 0 deletions
+13
View File
@@ -9021,6 +9021,19 @@ body.popup-mode .content-area {
box-shadow: -4px 0 20px rgba(0,0,0,0.3);
color: var(--text-primary); }
.bookslm-panel.open { transform: translateX(0); }
/* The `.hidden` class is applied by the header toggle button to collapse the
panel while keeping it mounted (so the toggle icon stays usable). When
hidden, the panel is slid fully off-screen and the open animation no
longer overrides the translateX. */
.bookslm-panel.open.hidden { transform: translateX(100%); }
.bookslm-btn-toggle {
display: flex; align-items: center; justify-content: center;
background: none; border: none; cursor: pointer;
color: var(--text-secondary); padding: 4px;
border-radius: 4px; flex-shrink: 0;
transition: color 200ms ease, background 200ms ease;
}
.bookslm-btn-toggle:hover { color: var(--accent); background: var(--surface2); }
.bookslm-header { display: flex; align-items: center; gap: 8px;
padding: 12px 16px; border-bottom: 1px solid var(--border);
font-size: 14px; font-weight: 600; }