Skip to content

More controls for media in lightbox #74

Description

@Darkkal

Overview

Enhance the lightbox with better media controls: full-height navigation zones, fit mode selection, zoom/pan capabilities, show/hide controls with auto-hide, and pinch-to-zoom on mobile. All new preferences are configurable in the existing /settings page.

Key Design Decisions

Fit Mode vs Zoom (Mutually Exclusive)

Two independent display modes for media:

  • Fit Mode: How media is sized to the container. Options: Fit Both (default, current object-fit: contain), Fit Width, Fit Height.
  • Zoom Mode: Raw scale percentage (e.g. 50%, 100%, 200%) within configurable min/max bounds. When zoomed, media is pannable.

Key rule: If fitting, the zoom level is not used. If zooming, the fitting behavior is not used.

Controls Visibility

  • Manual toggle via button, image click, or H key
  • Auto-hide after configurable inactivity delay
  • Master toggle: hiding controls also hides sidebar; showing restores prior state
  • Two-step Escape: first press shows controls, second closes lightbox

Navigation Zones

  • Full-height click zones on left/right edges, separate from media
  • Fixed position regardless of media dimensions
  • Subtle hover reveal with gradient + chevron

Resolved Decisions

Decision Resolution
Fit mode selector UI Icon button that cycles through modes (no dropdown)
Zoom level indicator Small transient numeric overlay (e.g., "150%") that fades after ~1.5s
Scroll wheel direction Scroll-up = zoom in (standard convention, not configurable)
Pinch-to-zoom Sub-Issue 5, shares zoom bounds from settings

Recommended Implementation Order

  1. Lightbox Settings — Adds the AppSettings fields that all other sub-issues depend on
  2. Full-Height Nav Zones — Simple structural change, establishes controls that show/hide will manage
  3. Show/Hide + Auto-Hide — Builds the controlsVisible framework that zoom buttons plug into
  4. Fit Mode & Zoom — Most complex feature, relies on settings, nav zones, and controls framework
  5. Pinch-to-Zoom — Mobile gesture layer on top of the zoom infrastructure

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions