fix: split view — supprimé display:none qui cachait les panneaux inactifs
CI / lint (push) Failing after 9s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 13s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
CI / lint (push) Failing after 9s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Successful in 13s
Desktop Build / build-windows (push) Has been cancelled
Desktop Build / build-linux (push) Has been cancelled
Problème: le lazy rendering masquait le contenu du panneau non-sélectionné → split view devenait inutile (un seul panneau visible à la fois) → Solution: supprimé display:none dans setActivePane, tous les panneaux visibles Test mis à jour: test_panes_remain_visible_when_inactive
This commit is contained in:
@@ -613,17 +613,7 @@ const PaneManager = {
|
||||
|
||||
setActivePane(paneId) {
|
||||
if (this.activePaneId === paneId) return;
|
||||
// Hide previous active pane content (lazy rendering)
|
||||
if (this.panes[this.activePaneId] && this.panes[this.activePaneId].element) {
|
||||
const oldContent = this.panes[this.activePaneId].element.querySelector('.content-area');
|
||||
if (oldContent) oldContent.style.display = 'none';
|
||||
}
|
||||
this.activePaneId = paneId;
|
||||
// Show new active pane content
|
||||
if (this.panes[paneId] && this.panes[paneId].element) {
|
||||
const newContent = this.panes[paneId].element.querySelector('.content-area');
|
||||
if (newContent) newContent.style.display = '';
|
||||
}
|
||||
this._highlightActive();
|
||||
// Sync global state from this pane's active tab
|
||||
const tm = this.tabManagers[paneId];
|
||||
|
||||
@@ -176,14 +176,17 @@ class TestPaneManagerDOMFlow:
|
||||
content = path.read_text()
|
||||
assert "id === 0" in content or "i === 0" in content
|
||||
|
||||
def test_lazy_rendering_hides_inactive(self):
|
||||
"""setActivePane hides old pane content with display:none."""
|
||||
def test_panes_remain_visible_when_inactive(self):
|
||||
"""Split view keeps all panes visible — no display:none hiding.
|
||||
Lazy rendering optimization removed because it broke split visibility."""
|
||||
path = PROJECT_ROOT / "frontend" / "js" / "pane-manager.js"
|
||||
content = path.read_text()
|
||||
active_section = content.split("setActivePane(paneId)")[1].split(" },")[0] \
|
||||
if "setActivePane(paneId)" in content else ""
|
||||
assert "display" in active_section.lower(), \
|
||||
"setActivePane must toggle display for lazy rendering"
|
||||
# setActivePane should NOT hide inactive panes (they must stay visible)
|
||||
assert "display" not in active_section.lower() or \
|
||||
"display:" not in active_section.lower(), \
|
||||
"setActivePane must NOT hide inactive panes — split view requires both visible"
|
||||
|
||||
def test_collapse_restores_original_dom(self):
|
||||
"""_collapseToSingle restores #tab-bar and #content-area IDs."""
|
||||
|
||||
Reference in New Issue
Block a user