feat: support portrait gallery cards - #24
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the static gallery renderer to support portrait and square screenshots by deriving an orientation from existing viewport dimensions (no manifest schema changes), and adjusting preview framing/rendering accordingly.
Changes:
- Add derived
data-orientation(landscape/portrait/square) to each rendered card based onviewportdimensions. - Update gallery card previews to use
object-fit: containand orientation-specificaspect-ratio(16:9, 3:4, 1:1), plus align mixed-height grid items to the start. - Add tests and documentation describing the orientation/rendering contract.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/render.ts |
Derives orientation from viewport and adjusts CSS/layout for portrait/square previews with contain fitting. |
test/vref.test.ts |
Adds contract tests asserting derived orientations and new CSS behavior. |
docs/VREF.md |
Documents the new gallery card orientation and preview rendering rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
putio-releaser Bot
pushed a commit
that referenced
this pull request
Aug 1, 2026
## [1.2.0](v1.1.1...v1.2.0) (2026-08-01) ### Features * support portrait gallery cards ([#24](#24)) ([92beb4a](92beb4a))
Contributor
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
10 tasks
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.
Summary
Make gallery cards usable for phone, tablet, and square references without changing the manifest contract.
Changed
Review aids
flowchart LR V["Manifest viewport"] --> O{"Derived orientation"} O -->|"width > height"| L["Landscape: 16:9"] O -->|"width < height"| P["Portrait: 3:4"] O -->|"width = height"| S["Square: 1:1"] L --> C["Complete image via contain"] P --> C S --> CRuntime proof used the real putio-ios gallery at 1440x1000 and 390x844. All 13 phone screenshots rendered fully, with three desktop columns collapsing to one mobile column.
Risks
Low. Existing manifests need no changes. Landscape cards retain the existing frame ratio, but object fitting now favors complete visual-reference content over edge-to-edge cropping.
Verification
pnpm run verifyComplexity
Small renderer-only behavior change with focused contract coverage.