Skip to content

Per-case capture bounds, settle frames, frame clock and viewport size classes - #4

Merged
stamp-build[bot] merged 2 commits into
mainfrom
agent/sindresorhus/vcase-batch3-features
Nov 21, 2026
Merged

stamp-build[bot] merged 2 commits into
mainfrom
agent/sindresorhus/vcase-batch3-features

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

sindresorhus from raft opened this pull request through Stamp
opened from existing branch agent/sindresorhus/vcase-batch3-features @ 2939b5b4b7b1, which the agent did not push
View in Stamp →


Per-case capture settings so the remaining Raft mobile design-system screenshot tests can move to @VCase.

New optional @VCase parameters (sentinels mean "the host's", omitted from the manifest, so existing cases, manifests and goldens are unchanged):

  • maxWidth / maxHeight (dp, 0 = host bound): component captures wider than 1200 (ChoiceList 1600, ChoicePicker 1400, Combobox sheet 1600, ThemeDecor 1340).
  • settleFrames (-1 = host): capture-pass frames only; the measure pass keeps the host's count, as Raft's RaftScreenshot does.
  • frameIntervalMs (-1 = host; 0 = every frame at time 0). settleFrames = N, frameIntervalMs = 0 reproduces RaftScreenshot(settleFrames = N) exactly.

Core: ManifestCase.capture (ManifestCapture), ManifestViewport.sizeClass / VCaseViewport.sizeClass + VCaseSizeClass.COMPACT/WIDE (pin wide layout without deriving it from capture size; not an axis, never in file names). Diff and validation cover the new fields.

Tests: CaseCaptureTest (core), adapter tests for the wide bound, frame plan and a frame-probe of settle frames and frame clock; three sample cases with goldens (ds.toolbar.wide, ds.tooltip.open, ds.button.desktop). README, design doc and the Raft mobile pilot doc (old capture params → @VCase settings) updated. ci.yml gains workflow_dispatch.

sindresorhus added 2 commits November 21, 2026 06:05
…t size classes

What the remaining Raft design-system galleries need from vcase:

- @vcase(maxWidth, maxHeight): dp bounds of a component capture, replacing
  the host's CaptureSize.WrapContent bounds (galleries wider than 1200dp).
- @vcase(settleFrames, frameIntervalMs): frames rendered before the captured
  one, and a fixed frame step; frameIntervalMs = 0 renders every frame at
  time 0, as RaftScreenshot's scene.render() does. The measure pass keeps
  the host's settle count.
- ManifestViewport.sizeClass / VCaseViewport.sizeClass (VCaseSizeClass):
  the layout mode a host pins for a viewport (e.g. a wide type scale),
  combined with the existing pointer axis for mouse sizing.

All optional and omitted from the manifest while unset (cases[].capture,
viewport[].sizeClass), so existing manifests and goldens are unchanged.
Sample gains three cases (wide toolbar, settled tooltip, desktop buttons
with both pointers). ci.yml can be dispatched on a branch.

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
…on CI run 44873920166)

Signed-off-by: sindresorhus <raft+sindresorhus@agents.stamp.build>
@stamp-build
stamp-build Bot merged commit 00099d7 into main Nov 21, 2026
1 check passed
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.

0 participants