Repository navigation
Opening zoom: a fit within the opening check's 0.05 px of the floor opens fitted - #204
Closed
agorischek wants to merge 1 commit into
Closed
agorischek wants to merge 1 commit into
agorischek wants to merge 1 commit into
Conversation
…pens fitted The kit zoomed to the 8 px floor whenever a fit fell more than 0.4% short (0.032 px), while the opening check counts fitted text within 0.05 px of the floor as at it and fails a canvas that zooms there. graph/nuget-update at 390px fits at 7.956 px since #197, so it opened at zoom 1.0056 and the check failed it on main. The kit's slack is now the check's tolerance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The opening-zoom tolerance adjustment has no active review issues.
No open issues 🎉
What changed in this PR
Aligns the renderer kit’s opening-zoom tolerance with the built-in opening check to address the narrow-screen NuGet regression blocking v0.3.0. No public API changes.
Changes:
- Derives the zoom threshold from a 0.05 px tolerance below the 8 px text floor.
- Adds regression cases for the NuGet opening zoom and text that remains below the tolerance.
- Updates comments to document the relationship between the kit and check tolerances.
| File | Description |
|---|---|
packages/renderers/testing/src/checks/frame/opening.ts |
Comment-only clarification linking the check tolerance to the kit. |
packages/renderers/kit/test/layout.test.mjs |
Tests fitted opening within tolerance and continued zooming below it. |
packages/renderers/kit/src/zoom.ts |
Replaces fixed proportional slack with a threshold derived from the pixel tolerance. |
Review effort: Balanced
Collaborator
Author
|
Superseded by #200, which merged the identical fix (kit |
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
21d839e602fa556024c49588c721498732b5a896↑ New unit cases pin the nuget-update zoom (1.005587 opens fitted) and that 7.9 px still zooms.
↑
tools check --fastpasses.↓ Kit unit and harness browser suites not run locally (need built workspaces); CI runs them.
What changed
Main's
browser (packages/renderers/harness, …)failsgraph/nuget-update: built-in renderer checks passsince #197:The kit and the check disagreed about "a hair below the floor".
openingZoomzoomed whenever the fit fell more than 0.4% short of the floor (floorSlack = 0.004, 0.032 px of 8 px), while the opening check counts fitted text within 0.05 px of the floor (0.63%) as at it and fails a canvas that zooms there. #197's narrow-stage fit puts nuget-update's text at 7.956 px, between the two.The kit's slack is now the check's tolerance,
0.05 / (8 − 0.05), so a fit the check calls fitted opens fitted. Each constant names the other. No public API changes.This blocks v0.3.0 (#202, #203), which tags only a green main.
Evidence
npm run tools -- check --fast: pass.New cases in
packages/renderers/kit/test/layout.test.mjs: zoom 1.005587 opens fitted; 7.9 px still zooms to the floor.Documentation that this change affects is updated, and generated reference
pages are regenerated (
npm run docs:generate). (No exported API or TSDoc changed.)Fixes include a regression test.
No credentials, private source or machine-specific paths are included.