Skip to content

Photostrip format — vertical photo-booth strips#67

Merged
ankitsejwal merged 3 commits into
mainfrom
photostrip-format
Jun 30, 2026
Merged

Photostrip format — vertical photo-booth strips#67
ankitsejwal merged 3 commits into
mainfrom
photostrip-format

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

Closes #57.

What

Adds a Photostrip layout alongside the polaroid grid: classic photo-booth strips — four square photos stacked in a column with thin borders between them and a wider footer band — tiled across the sheet. Pick it from a new Format select (Grid / Photostrip) in the right rail; defaults to Grid, so nothing changes unless you switch.

How

  • lib/strip.ts — strip geometry as fractions of strip width (stripAspect ≈ 4.0), so one set of numbers drives the preview (px) and PDF (pt). Strips size to fit the page height and centre in a row; paginateStrips / toStrips chunk photos into pages of stripsPerRow × 4.
  • StripPage — renders a sheet of strips in the editor, reusing CroppedImage so each photo pans/zooms and is selectable exactly like a grid frame (the inspector's zoom + delete work on strip photos too).
  • buildStripPdf / downloadStripPdf — a row of strips per page, each a coloured card with four square photos + cut marks, reusing the shared sRGB rasterizer. Factored the blob-download into a triggerDownload helper shared with the grid export.
  • Right rail gains Format + Strips controls and hides the grid/caption options that don't apply to strips. New sheetFormat + stripsPerRow settings persist (old files fall back to grid).

Verification

Browser automation was unavailable this session, so I verified the strip geometry headlessly by rendering the layout (cards, four square photo boxes, footer, centring) to a PDF→PNG — looks like a proper photobooth strip. Typecheck + lint clean; dev-server HMR clean. The preview and PDF share the same stripLayout math, and the PDF image path reuses the proven grid rasterizer.

Please eyeball the live strip preview (Format → Photostrip) — that's the one bit I couldn't drive automatically.

Scope notes (v1)

  • Classic 4-up strip only; variable photos-per-strip can come later (per the issue).
  • Strips use the sheet border colour (the card is one colour); per-photo border overrides apply to the grid only.
  • Footer is a blank writable band; a date/branding line in the footer is a possible follow-up.

🤖 Generated with Claude Code

Strip layout math (lib/strip.ts): four square photos stacked over a
wider footer, sized to fit the page height and centred, plus pagination
helpers. New sheetFormat ('grid' | 'strip') and stripsPerRow settings,
persisted. No UI wiring yet.
buildStripPdf/downloadStripPdf draw a row of strips per page — a
coloured card per strip with four square photos over the footer, plus
cut marks — reusing the shared sRGB rasterizer. Factor the blob-download
into a triggerDownload helper shared with the grid export.
StripPage renders a sheet of strips in the editor, reusing CroppedImage
so each photo pans/zooms like a grid frame. A4Preview branches on
sheetFormat; the right rail gains a Format select (Grid / Photostrip)
and a Strips stepper, and hides the grid/caption controls that don't
apply to strips. Export routes to the strip PDF in strip mode.
@ankitsejwal ankitsejwal merged commit c315482 into main Jun 30, 2026
1 check passed
@ankitsejwal ankitsejwal deleted the photostrip-format branch June 30, 2026 10:05
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.

Photostrip format — vertical photo-booth strips

1 participant