mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(ui): portable panels survive reloads and answer a real double-click
- The rail's startup move of panels into #right-context-rail cleared every panel's inline position, so a window restored as floating dropped back to its rail place after a reload. Floating panels now keep their geometry. - A header double-click never snapped a floating panel back in a real browser: the drag handler's pointerdown preventDefault() suppresses the mouse events a native dblclick is built from. Two presses within 400 ms and 6 px (no drag between) are now detected in pointerdown itself. - Portable specs can ask to dock when collapsed (dockOnCollapse), and PanelChrome exposes dockPanel(). Street Level opts in as a portable panel (min 320 x 280) with dockOnCollapse. - qa-panel-resize: the panel reader returns right/bottom (s/e handle points were NaN), counts only visible rail panels like the rail does, parks the window clear of the voice dock before the resize loop, and names the element under the pointer when an assertion fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
768f256720
commit
c69dd2e89c
5 files changed
+119
-8
No files matched your search
@@ -388,6 +388,15 @@ export class PanelChrome {
|
||||
this.shareLinkManager?.onPanelStateChange?.();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dock a floating portable panel back into its rail at its default size.
|
||||
* @param {string} panelId
|
||||
* @returns {boolean} Whether the panel was floating.
|
||||
*/
|
||||
dockPanel(panelId) {
|
||||
return this._panelPosition?.dockPanel?.(panelId) === true;
|
||||
}
|
||||
|
||||
setPanelCollapsed(
|
||||
panelId,
|
||||
collapsed,
|
||||
@@ -548,6 +557,7 @@ export class PanelChrome {
|
||||
}
|
||||
}
|
||||
panelEl.classList.toggle('collapsed', nextCollapsed);
|
||||
this._panelPosition?.onPanelCollapsed?.(panelId, nextCollapsed);
|
||||
if (
|
||||
nextCollapsed &&
|
||||
this.cockpitView?.active &&
|
||||
|
||||
Reference in new issue
Block a user