Photostrip format — vertical photo-booth strips#67
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/toStripschunk photos into pages ofstripsPerRow × 4.StripPage— renders a sheet of strips in the editor, reusingCroppedImageso 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 atriggerDownloadhelper shared with the grid export.sheetFormat+stripsPerRowsettings 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
stripLayoutmath, 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)
🤖 Generated with Claude Code