Skip to content

[Media] Add a content Gallery that reuses Image Zoom #10

Description

@Vonng

Goal

Add a semantic responsive grid for related documentation images after the shared media contract and zoom runtime are stable.

Tracking issue: #3
Blocked by shared media contract: #8
Blocked by Image Zoom: #9

Authoring API

  • gallery: strict integer columns in the range 1-4; optional author-provided label.
  • gallery/image: required src and meaningful alt; optional caption.
  • Use standard shortcode notation and validate parent/child relationships.
  • Preserve author order.

Rendering approach

  • Reuse the shared media resolver for URLs, dimensions, alt text, captions, lazy loading, and subpath behavior.
  • Render a responsive static grid with semantic figure/caption markup.
  • Reuse the Image Zoom eligibility and dialog runtime; do not add a second lightbox.
  • If zoom is disabled or JavaScript is unavailable, images and captions remain complete.

Output behavior

  • HTML: responsive grid, intrinsic dimensions where known, loading=lazy, and no layout-breaking long captions.
  • Print: static complete figures with sensible pagination.
  • Markdown: ordinary images followed by readable captions; no Gallery HTML.
  • RSS: static sequential figures.

Acceptance criteria

  • Cover 1-4 requested columns, narrow viewports, mixed aspect ratios, long captions, CJK, RTL, local/static/remote sources, and missing/invalid parameters.
  • Gallery does not load a separate runtime or duplicate dialog.
  • axe and keyboard tests pass with zoom enabled and disabled.
  • Production output remains useful with JavaScript disabled.

Non-goals

  • Carousel behavior, reordering, uploads, filtering, fullscreen slideshows, or build-time remote image fetching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions