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) {
|
setActivePane(paneId) {
|
||||||
if (this.activePaneId === paneId) return;
|
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;
|
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();
|
this._highlightActive();
|
||||||
// Sync global state from this pane's active tab
|
// Sync global state from this pane's active tab
|
||||||
const tm = this.tabManagers[paneId];
|
const tm = this.tabManagers[paneId];
|
||||||
|
|||||||
@@ -176,14 +176,17 @@ class TestPaneManagerDOMFlow:
|
|||||||
content = path.read_text()
|
content = path.read_text()
|
||||||
assert "id === 0" in content or "i === 0" in content
|
assert "id === 0" in content or "i === 0" in content
|
||||||
|
|
||||||
def test_lazy_rendering_hides_inactive(self):
|
def test_panes_remain_visible_when_inactive(self):
|
||||||
"""setActivePane hides old pane content with display:none."""
|
"""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"
|
path = PROJECT_ROOT / "frontend" / "js" / "pane-manager.js"
|
||||||
content = path.read_text()
|
content = path.read_text()
|
||||||
active_section = content.split("setActivePane(paneId)")[1].split(" },")[0] \
|
active_section = content.split("setActivePane(paneId)")[1].split(" },")[0] \
|
||||||
if "setActivePane(paneId)" in content else ""
|
if "setActivePane(paneId)" in content else ""
|
||||||
assert "display" in active_section.lower(), \
|
# setActivePane should NOT hide inactive panes (they must stay visible)
|
||||||
"setActivePane must toggle display for lazy rendering"
|
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):
|
def test_collapse_restores_original_dom(self):
|
||||||
"""_collapseToSingle restores #tab-bar and #content-area IDs."""
|
"""_collapseToSingle restores #tab-bar and #content-area IDs."""
|
||||||
|
|||||||
Reference in New Issue
Block a user