Skip to content

Add URL params to control side panel state#83

Merged
CalNightingale merged 1 commit intoproductionfrom
cal/url-panel-closed-params
Mar 11, 2026
Merged

Add URL params to control side panel state#83
CalNightingale merged 1 commit intoproductionfrom
cal/url-panel-closed-params

Conversation

@CalNightingale
Copy link
Copy Markdown

Motivation

We're building a review service prototype that embeds the Gradient viewer in an iframe. In this context, the viewer always displays a single study/series selected from the review UI — so the left study list panel is redundant, and the right Google Sheets panel is not needed (the review service itself provides the review workflow). Having both panels open by default wastes screen real estate and requires the reviewer to manually close them every time a new series loads.

Rather than changing mode-level defaults (which would affect all viewer users), this adds URL parameter support so embedding consumers can control panel state per-load.

Summary

  • Adds support for leftPanelClosed and rightPanelClosed URL query parameters that override the mode's default panel open/closed state
  • Non-breaking: modes that don't pass these params behave exactly as before

Usage

/viewer/datasource/mode?StudyInstanceUIDs=...&leftPanelClosed=true&rightPanelClosed=true

Test plan

  • Load viewer normally (no new params) — panels should open/close per mode defaults
  • Load with ?leftPanelClosed=true — left panel (study list) should start closed
  • Load with ?rightPanelClosed=true — right panel should start closed
  • Load with both params set to true — both panels closed
  • Load with params set to false — panels open (overrides mode defaults if mode closes them)

🤖 Generated with Claude Code

Support `leftPanelClosed` and `rightPanelClosed` URL query parameters
to override the mode's default panel open/closed state. This enables
embedding consumers (e.g. the review service) to load the viewer with
panels closed without requiring mode-level config changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CalNightingale CalNightingale merged commit 23a7552 into production Mar 11, 2026
@CalNightingale CalNightingale deleted the cal/url-panel-closed-params branch March 11, 2026 13:11
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.

2 participants