Skip to content

feat(web): a panel can open in a browser tab of its own, the selection shared between tabs (F1.24) - #392

Merged
gx1400 merged 1 commit into
feat/f3.4-two-way-igatefrom
feat/f1.24-web-pop-out
Oct 26, 2026
Merged

gx1400 merged 1 commit into
feat/f3.4-two-way-igatefrom
feat/f1.24-web-pop-out

Conversation

@gx1400

@gx1400 gx1400 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Closes #212. Stacked on #391 (two-way IGate), the top of tonight's stack. Spec written first; the decisions are proposed.

What it does (browser only; the desktop's panels already float into windows of their own)

  • Open in a new tab on each panel's menu opens the page with ?panel=<kind>. The browser can show it as a window to drag to another monitor.
  • A popped-out tab shows its panel alone, filling the page. It can't be closed, floated, pinned or moved, since there's nowhere else for it to go. It doesn't load or save the layout, which stays with the tab it came from. Its title names the panel first. A typed or bookmarked ?panel=packets (any case) does the same.
  • The selection is shared: selecting a station in one tab selects it in the others, so Details in a pop-out follows the map. It uses BroadcastChannel, which stays inside the browser and the gateway's origin, and a selection received isn't echoed back.
  • Each tab is a viewer (decision 2): it has its own connection, so it counts toward the gateway's limit. A full gateway says so in the new tab.

How

  • UI: PlatformServices.PopOutPanel, OpenPopOut and SelectionChannel (ISelectionChannel), set only by the browser app.
  • The pop-out layout comes from ShellFactory.CreatePopOutLayout, applied by ShellViewModel.ShowOnly. App.StartLayout returns before wiring layout persistence.
  • MainViewModel.SelectionChannel publishes and receives selections, and PopOutTitle names the panel in the page title.
  • Browser: BrowserPopOut reads the query and uses window.open and BroadcastChannel through [JSImport]; the callback comes back as a marshalled Action<string>. Three small functions were added to main.js.

Decisions for review:

  1. Tabs, not in-page windows.
  2. Each tab counts as a viewer; tying a pop-out to its parent's slot can come later.
  3. Only the selection is shared; the View filter, range and layout stay each tab's own.

Tests

  • PopOutTests (3): Open in a new tab only where there are tabs, asking for that panel; the pop-out layout is the panel alone; the selection is shared without echoing; the pop-out's title.
  • Real browser: I published the trimmed WASM app and the gateway locally (engine off, temporary data folder, a private port) and opened the full app and ?panel=Packets side by side in headless Firefox. Both started, the pop-out showed the packet list alone, and there were no console errors from the app. That run caught a real bug: the panel id was case-sensitive, so ?panel=Packets showed the whole app. It's fixed here. The gateway and Firefox were stopped afterwards.

@gx1400
gx1400 force-pushed the feat/f1.24-web-pop-out branch from 9c40127 to e3ecf1e Compare October 26, 2026 05:27
@gx1400
gx1400 added this pull request to stack #395 October 26, 2026 10:17
@gx1400
gx1400 force-pushed the feat/f1.24-web-pop-out branch from e3ecf1e to fe4eb89 Compare October 26, 2026 10:18
…n shared between tabs (F1.24)

In the browser, each panel's menu gets Open in a new tab, which opens the
page with ?panel=<kind>: that tab shows the panel alone, filling the
page, and leaves the layout to the tab it came from. Selecting a station
in one tab selects it in the others, over a BroadcastChannel that stays
in the browser. Each tab counts as a viewer of the gateway.
@gx1400
gx1400 force-pushed the feat/f1.24-web-pop-out branch from fe4eb89 to ab2425b Compare October 26, 2026 12:43
@gx1400
gx1400 merged commit 5520d7c into main Oct 26, 2026
11 checks passed
@gx1400
gx1400 deleted the feat/f1.24-web-pop-out branch October 26, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F1.24 Web pop-out panels: a panel in its own browser tab or window

1 participant