Repository navigation
fix(types): allow scriptable and indexed grid tick widths - #12321
Conversation
Signed-off-by: Jake Wang <jakezwang@users.noreply.github.com>
|
The test failure might be real |
|
Seems this test is failing on all pr's lately |
|
I reproduced the same 293-pixel (0.11%) fixture failure on pristine master and this PR in Ubuntu Firefox 155 and 156; within each browser, the captured canvas pixels and point-label geometry are identical between master and this types-only change. I opened #12328 with a fixture-only repair: disable image smoothing for the overlapping glyph sprites through the existing run callback and regenerate that fixture’s PNG. The comparison threshold/tolerance, all 50 visible labels, 35 overlapping label pairs, and the per-browser chart geometry are preserved. A one-pixel label-padding change still fails the image comparison. Linux validation passes the complete 1703-test Karma CI suite separately on Chrome 154, Firefox 155, and Firefox 156, plus the isolated fixture checks. This PR’s approved type patch is unchanged. After #12328 is merged, I can sync this branch to pick up the shared CI fix. AI assistance: investigation, testing, and this update were prepared with OpenAI Codex. |
|
Merged current upstream master, including the accepted #12328 fixture repair, into this branch at The full type/build checks and changed-file ESLint pass. Validation of the exact updated head on Ubuntu passes all 1703 Karma tests in each of Chrome 154, Firefox 155, and Firefox 156, using the normal CI coverage flags. The existing macOS radial-tick image mismatch reproduces unchanged on pristine master and is recorded in the updated description. AI assistance: this validation and update were prepared with OpenAI Codex. |

Fixes #12320.
grid.tickWidthalready supports scriptable and indexable values at runtime and in the axis styling documentation, butGridLineOptionsonly accepts a number. UseScriptableAndArray<number, ScriptableScaleContext>, matching the neighboringlineWidthdeclaration.The type regression covers a callback in
Partial<GridLineOptions>, an inferred callback in a chart configuration, an array of widths, and a scalar width. The first three cases fail type checking before this change.Synchronized with upstream master at
714b48c, including the accepted Firefox fixture repair from #12328. The diff against master remains the original two type-related files.Validation at head
934d2b71d7b27a4d1a35f2af23decc904e7a8f19: pinnedpnpm@8.13.0 lint-types(build, declaration generation, and full type suite passed), changed-file ESLint, andgit diff --check. The actual-head Ubuntu validation checks out this exact commit and runs the complete Karma CI suite with the repository's coverage flags: 1703/1703 passed in each of Chrome 154, Firefox 155, and Firefox 156. Every test command must return zero for that diagnostic run to pass. Upstream CI and Compressed Size also pass on this updated revision.The local macOS Chrome run stopped at the existing
scale.radialLinear/ticks-below-zero.jsimage difference (281 pixels / 0.11% against 0.1% tolerance). That same fixture reproduces the identical failure on pristine current master; the Ubuntu suites all pass.AI assistance: implementation, testing, and this description were prepared with OpenAI Codex.