Skip to content

Use intrinsic height for scroll snapshots - #196

Open
kyleve wants to merge 11 commits into
mainfrom
codex/intrinsic-height-scroll-snapshots
Open

Use intrinsic height for scroll snapshots#196
kyleve wants to merge 11 commits into
mainfrom
codex/intrinsic-height-scroll-snapshots

Conversation

@kyleve

@kyleve kyleve commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Posted by an AI agent on kve's behalf.

Summary

  • migrate confirmed scroll-backed snapshot matrices to SnapshotKit's full-content intrinsic-height presets
  • keep the normal device viewport as the minimum height for iPhone and iPad full-content presets, growing only when settled content is taller
  • preserve production navigation, tab, sheet, search, and toolbar chrome while a nested full-width scroller determines the settled height
  • fail snapshot assertions when intrinsic-height measurement does not converge, with regression coverage for an oscillating List layout
  • keep loaded snapshot fixtures pinned against production task refreshes and capture intentionally bounded map content through the same shared scrolling child production renders
  • preserve accessibility view-controller containment around AccessibilitySnapshot's temporary rehosting
  • establish the intrinsic-height, viewport-minimum, chrome-preservation, bounded-content, and convergence invariants in repository and SnapshotKit documentation
  • re-record and visually review affected LFS references, including the restored About/Data navigation chrome

Review notes

Device full-content sizing is now max(device viewport height, settled full-content height): 874 points for the iPhone preset and 1194 points for the iPad preset. Generic custom full-content frames continue to shrink-wrap unless callers explicitly provide a minimum height.

Full-content measurement adds a full-width scrolling descendant's content size and adjusted insets to the surrounding root chrome. Intentionally bounded split layouts snapshot their shared scrolling child instead of adding snapshot-only production sizing behavior.

A measurement that does not converge after the settling budget records a test issue and skips comparison/recording, so an arbitrary intermediate height can never be blessed as a reference.

Testing

  • ./swiftformat --lint
  • swift run bumper config .
  • swift run bumper test .
  • swift run bumper lint . --timings
  • ./test SnapshotKitTests SnapshotKitTestingTests --no-generate (69 tests passed)
  • ./test WhereUITests --no-generate (356 tests passed)
  • ./test --all --no-generate (1,644 tests passed)
  • ./test --snapshots --review
  • ./test --snapshots --record failed
  • ./test --snapshots --no-generate (34 snapshot tests passed)
  • visually reviewed standard, dark, iPad, Dynamic Type, and accessibility references for complete content, device-height floors, navigation/toolbars, safe-area chrome, and empty tails

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