Skip to content

Add the Pixel 9 Pro Fold as a snapshot device - #9

Open
PetrPol wants to merge 2 commits into
mainfrom
feat/pixel-9-pro-fold-device
Open

PetrPol wants to merge 2 commits into
mainfrom
feat/pixel-9-pro-fold-device

Conversation

@PetrPol

@PetrPol PetrPol commented Sep 24, 2026

Copy link
Copy Markdown
  • Screens can now be snapshot on an unfolded foldable — the band between a phone and a tablet, where a width-driven layout is most likely to break.
  • Pinned the snapshot-name contract for every device, so a future one cannot silently produce broken golden file names.

An unfolded foldable sits in a band no existing device covered: wider
than Material's Expanded breakpoint (840dp) yet far narrower than a
tablet in landscape, and nearly square, so both orientations land on
the same side of most width breakpoints. A layout that branches on
width can therefore behave differently there than on either device the
library already offered.

Paparazzi already ships the device, so the mapping is exact rather than
hand-rolled: 2076x2152px at 390dpi, i.e. 852x883dp.

The snapshot-name label is Pixel9ProFold, and a new test pins the label
contract for every enum entry, so a future device cannot silently
introduce an underscore into a golden file name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PetrPol
PetrPol requested a review from mottljan September 24, 2026 09:52
@PetrPol PetrPol self-assigned this Sep 24, 2026
@PetrPol PetrPol added the enhancement New feature or request label Sep 24, 2026

test("every device has a snapshot-name label that is unique and free of underscores") {
val labels = Device.entries.map { DeviceConfig(it, DeviceOrientation.PORTRAIT).name }
labels.forEach { it shouldNotContain "_" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use forAll instead of forEach

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 f0cfb31

Used forAll instead of forEach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants