Skip to content

Double-click a tile to zoom it - #34

Merged
evandhoffman merged 1 commit into
mainfrom
feat/issue-29-zoom-card
Aug 19, 2026
Merged

Double-click a tile to zoom it#34
evandhoffman merged 1 commit into
mainfrom
feat/issue-29-zoom-card

Conversation

@evandhoffman

Copy link
Copy Markdown
Contributor

Summary

  • Double-click any card or dial to zoom it. Escape, Done, or another double-click closes it.
  • The zoom is a sheet over the panel, not a second window and not an in-place expansion. It is temporary in the way the other two are not: Escape already means dismiss, and nothing is left over to find later. A second window would need its own toolbar, its own history window and a relaunch story; expanding in place leaves the panel in a state that reads as a bug if you walk away.
  • Zoom is a mode the panel is in, not a property a tile carries. One @State value on DashboardView holds it, so opening a second tile closes the first by construction. It stays out of PanelArrangement — a zoom must not survive a relaunch or resize anything stored, and the tile comes back the size it was.
  • ZoomLayout (Sources/MonitorUI/ZoomedCard.swift) turns the measured panel size into the sheet's: 86% × 82%, bounded to 520×360 and 1400×900. The margin of panel left showing is what says "temporary"; the ceiling is where a zoom stops being reading a chart and starts being stretching one.
  • Sampling does not stop while the zoom is open. The buffer is shared, so the panel underneath keeps filling and comes back without a gap.
  • DashboardView.chartCard extracted so the grid and the zoom build the same card at different plot heights, and gaugeTile now takes its size so the caption scales with the dial.

Closes #29

Test plan

  • swift test — 185 tests in 21 suites pass, 10 of them new in Tests/MonitorUITests/ZoomLayoutTests.swift
  • swiftformat Sources Tests --lint --cache ignore clean
  • swift run monitor: double-click a chart, then a gauge — the second closes the first
  • Escape closes the zoom; so does Done; so does a second double-click
  • The three gestures on a tile do not fight: drag to reorder still works, right-click still opens Copy Image / Copy Data, and neither fires on a double-click
  • The panel behind the zoom has no gap in its history when the zoom closes

Out of scope

A zoomed chart has room for more than a bigger version of the same picture — more x-axis labels, and a longer history window than the panel's. Worth a follow-up; this PR draws the same card at a larger size.

The panel is sized to be glanced at. When one tile is the reason you opened
the app you want it big, and the size sliders resize every card instead.

The zoom is a sheet over the panel — temporary, and Escape already means
dismiss. One @State value on the dashboard holds it, so opening a second tile
closes the first by construction, and it stays out of PanelArrangement: a zoom
must not survive a relaunch or resize anything stored. Sampling keeps running
underneath, so the panel comes back without a gap.

ZoomLayout turns the measured panel size into the sheet's, bounded at both
ends, and is tested on its own.

Closes #29
@evandhoffman evandhoffman added enhancement New feature or request release:minor Merging this bumps the minor version labels Aug 19, 2026
@evandhoffman
evandhoffman merged commit ced2296 into main Aug 19, 2026
2 checks passed
@evandhoffman
evandhoffman deleted the feat/issue-29-zoom-card branch August 19, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release:minor Merging this bumps the minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double-click a card to zoom it

1 participant