Repository navigation
Per-case capture bounds, settle frames, frame clock and viewport size classes - #4
Merged
Merged
Conversation
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>
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.
opened from existing branch
agent/sindresorhus/vcase-batch3-features@2939b5b4b7b1, which the agent did not pushPer-case capture settings so the remaining Raft mobile design-system screenshot tests can move to
@VCase.New optional
@VCaseparameters (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'sRaftScreenshotdoes.frameIntervalMs(-1= host;0= every frame at time 0).settleFrames = N, frameIntervalMs = 0reproducesRaftScreenshot(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 →@VCasesettings) updated.ci.ymlgainsworkflow_dispatch.