You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preview: type an exact zoom % and see a pixel grid at high zoom #5587
The preview shows its zoom as a percentage (packages/studio/src/components/nle/NLEPreview.tsx, PreviewZoomOverlay.tsx) but you cannot type a value, and at high zoom there is no way to see individual pixels.
Done when
Clicking the zoom readout lets you type a percentage (clamped to the existing limits); Enter applies, Esc cancels.
Above 800% a one-pixel grid is drawn over the preview. It is never part of a render or a snapshot.
Tests for the parsing and clamping and for the grid threshold.
Desktop candidate: this component is also used by the HyperFrames Desktop app, so the change reaches it with the next version bump.
Reviewer:@miguel-heygen. New to the repo? Start with CONTRIBUTING.md; run bun install, then the package's tests, before opening a PR.
I'd like to take this for my CS146S OSS contribution. Plan: make the zoom readout in PreviewZoomOverlay.tsx an editable input (Enter applies, Esc/blur cancels), parsing input like 250, 250% and clamping with clampPreviewZoomPercent. Then draw a CSS 1px grid overlay outside the composition iframe, so it never reaches renders or snapshots. Parsing, clamping and the threshold go in previewZoom.ts with tests in previewZoom.test.ts. One question: MAX_PREVIEW_ZOOM_PERCENT is currently 400, so a grid "above 800%" could never show. Should I raise the max (say to 3200%), or use a lower grid threshold?
Activity
mrmenon23 commentedon Oct 16, 2026
I'd like to take this for my CS146S OSS contribution. Plan: make the zoom readout in
PreviewZoomOverlay.tsxan editable input (Enter applies, Esc/blur cancels), parsing input like250,250%and clamping withclampPreviewZoomPercent. Then draw a CSS 1px grid overlay outside the composition iframe, so it never reaches renders or snapshots. Parsing, clamping and the threshold go inpreviewZoom.tswith tests inpreviewZoom.test.ts. One question:MAX_PREVIEW_ZOOM_PERCENTis currently 400, so a grid "above 800%" could never show. Should I raise the max (say to 3200%), or use a lower grid threshold?feat(studio): type an exact preview zoom and see a pixel grid at high…
feat(studio): type an exact preview zoom and see a pixel grid at high…
feat(studio): type an exact preview zoom and see a pixel grid at high…
feat(studio): type an exact preview zoom and see a pixel grid at high…