Skip to content

Spec: Expand image toggle (#171)#172

Merged
IanMayo merged 3 commits into
mainfrom
claude/affectionate-euler-1a44hu
Jun 25, 2026
Merged

Spec: Expand image toggle (#171)#172
IanMayo merged 3 commits into
mainfrom
claude/affectionate-euler-1a44hu

Conversation

@IanMayo

@IanMayo IanMayo commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the feature specification for #171 — Add toggle for expand image at specs/156-expand-image-toggle/spec.md. This is spec-only; no component code changes yet.

The toggle lets an analyst expand a landscape gram's image to fill the GramFrame component width and consume most of the available viewport height, while the navigation, page title, and control panel stay visible. Portrait verniers get no toggle.

Key decisions captured

  • Rendered size decoupled from natural size — all coordinate transforms and persistent features (markers/harmonics/doppler) use the rendered size, so annotations stay locked to their data coordinates across expand/collapse.
  • Aspect ratio is not locked — expanded width and height are computed independently from available space.
  • Only the image expands — axis margins/label text and the control panel keep their normal size.
  • Viewport-aware height — fills from the image's top edge to near the viewport bottom; expanding a lower gram pushes content below it down (normal flow).
  • In-memory, per-instance, default off — not persisted to browser storage.
  • Zoom/Pan independent — continue to operate on the current rendered size.
  • Toggle floats top-left of the image; offered only when natural width > natural height.

Acceptance testing

Documents a self-contained demonstrator rebuilt from the published Pub-10 page (out/pub-10/Grams/gram1.html) — published shell/CSS/JS reused, published bundle swapped for the local build, landscape gram-1.png (902×237) — so Playwright can verify the 7 success criteria at a fixed viewport without running OxygenXML.

Next steps (not in this PR)

  • Build the demonstrator under sample/ + Playwright fixture
  • Optional speckit plan.md / tasks.md
  • Implementation

🤖 Generated with Claude Code

https://claude.ai/code/session_017qyAAJ2oJo8uF5EaV3H3gd


Generated by Claude Code

Specify a per-instance toggle that expands a landscape gram's image to
fill the GramFrame component width and consume available viewport height,
with rendered size decoupled from natural size so coordinate transforms
and persistent features stay locked to their data coordinates. Portrait
verniers receive no toggle. Includes acceptance criteria and a
demonstrator-based testing approach rebuilt from the published Pub-10 page.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qyAAJ2oJo8uF5EaV3H3gd
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

PR Preview

Preview deployment is ready! View Preview

Last updated: 2026-06-25T13:42:39.420Z

claude added 2 commits June 25, 2026 12:58
speckit.plan output for feature 156: plan.md, research.md, data-model.md,
contracts/ (state shape + toggle UI), and quickstart.md. Constitution
check passes (SVG-first, test-first, modular modes, declarative config all
satisfied). Core approach: decouple rendered image size from natural size
via renderWidth/renderHeight so coordinate transforms and persistent
features stay locked to data coordinates; expand composes with the existing
zoom transform.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qyAAJ2oJo8uF5EaV3H3gd
speckit.tasks output: 32 dependency-ordered tasks across Setup,
Foundational (render-size decoupling as a no-op refactor), and the three
user stories (P1 expand/collapse MVP, P2 annotation lock, P3 portrait
guard), plus polish. Tests included per the Test-First constitution
principle and the spec's Playwright acceptance approach.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qyAAJ2oJo8uF5EaV3H3gd
@IanMayo IanMayo merged commit 6f05929 into main Jun 25, 2026
3 checks passed
@IanMayo IanMayo deleted the claude/affectionate-euler-1a44hu branch June 25, 2026 13:45
github-actions Bot added a commit that referenced this pull request Jun 25, 2026
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