Skip to content

Shrink card snapshots, move screens to a tall device - #205

Merged
dzid26 merged 2 commits into
mainfrom
work/paparazzi-shrink-and-tall
Oct 12, 2026
Merged

dzid26 merged 2 commits into
mainfrom
work/paparazzi-shrink-and-tall

Conversation

@dzid26

@dzid26 dzid26 commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Test-only follow-up to #194: cards render SHRINK-wrapped, screens move to a tall phone.

  • Cards (snapCard): RenderingMode.SHRINK on the default NEXUS_5 device, so bitmaps come out full-width x content-height (1000x311..664 depending on state) with no black void. Card width is unchanged, only the void goes away.
  • Screens (snapScreen): full-device NORMAL mode on the Pixel 7 Pro preset (1440x3120, 19.5:9 portrait — the exact S24-Ultra-like match in this Paparazzi version), giving scrolled content vertical room.
  • Snapshot names are identical (<card>_<state>_light/dark.png, screen-*_light/dark.png), so the pr-paparazzi byte-compare flow needs no changes. No workflow/script/doc changes in this PR.

Implementation note: the brief asked for a second Paparazzi rule for the cards, but two rules cannot coexist in one class on Paparazzi 2.0.0-alpha05.1 — layoutlib acquires a single scene per thread, so the nested rules fail every test with IllegalStateException: Acquiring different scenes from same thread without releases (verified). The version-correct equivalent is one rule plus unsafeUpdateConfig(deviceConfig, renderingMode) at the top of each helper; each helper sets both values every call, so renders never depend on test order.

CONSEQUENCE: the first PR run after merge will post ALL snapshots as changed because dimensions change — one noisy round, expected, then quiet.

Verify:

  • :app:recordPaparazziDebug green; fresh --rerun-tasks re-record from zero is byte-identical across all 30 PNGs (SHRINK sizing is deterministic for the byte-compare diff flow).
  • :core:test :app:testDebugUnitTest :app:lintDebug ktlintCheck detekt green. No workflow/script changes, so actionlint is unaffected.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dzid26
dzid26 force-pushed the work/paparazzi-shrink-and-tall branch from 6731841 to 1b2a4ea Compare October 12, 2026 00:34
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Snapshots

No visual change in the snapshots at d25bf9a (vs 1b2a4ea).

Full-screen emulator shots: Actions → PR screenshots → Run workflow, choosing the head branch of this PR.

Debug APK: still building in Android CI (GitHub sign-in needed)

@dzid26
dzid26 merged commit d498399 into main Oct 12, 2026
6 checks passed
@dzid26
dzid26 deleted the work/paparazzi-shrink-and-tall branch October 12, 2026 01:20
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.

1 participant