Files
SluijsensandClaude Opus 5.5 18bf0311ef Adds the shared gallery building blocks
A masonry photo grid that keeps the reading order (pure CSS, no measuring
in the browser), an accessible lightbox on Chakra's Dialog with wrap-around
browsing, keys, swipe and preloading, and a filter bar of toggle buttons.
They work on generic gallery items, so other pages can use them. The swipe
logic moves out of the hero into a shared hook; the hero behaves as before.
The rules behind them live in pure helpers with property-based tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 23:22:43 +01:00

1.5 KiB

Functional Design Plan — Unit 2: Gallery building blocks

Depth: standard. Scope from the execution plan: the rules and states of the generic PortfolioGrid, Lightbox, FilterBar and useSwipe, and the pure helpers behind them (wrapIndex, swipeDirection, masonryRowSpan, neighbourIndexes), with their testable properties (PBT-01). Questions: gallery-blocks-fd-questions.md.

  • Collect and analyse the answers in gallery-blocks-fd-questions.md
  • domain-entities.md — GalleryItem, ImageSource, FilterOption, lightbox state (open index or closed), swipe points; how they relate
  • business-rules.md — grid rules (order, columns, row spans, eager count, link fallback, intent), lightbox rules (open/close, wrap, keys, swipe, counter, caption, focus return, preloading, single item, loading and error states, reduced motion), filter bar rules (options, active state, fewer than two options), swipe rules (threshold, direction), hero behaviour unchanged
  • business-logic-model.md — event flows (open from tile, browse, close, swipe) and the lightbox state machine; the pure helpers with their properties per PBT category (round-trip, invariant, idempotence, oracle, stateful)
  • frontend-components.md — component hierarchy, props and state per component, accessible names and live regions, keyboard map, test ids, recipes and tokens
  • Validate against requirements.md, application-design.md and the extension rules (Security Baseline, PBT)