Skip to content

types: Fix svelte-check issues in mark helpers#482

Merged
gka merged 1 commit intomainfrom
types/fix-svelte-check-issues-helpers
Feb 22, 2026
Merged

types: Fix svelte-check issues in mark helpers#482
gka merged 1 commit intomainfrom
types/fix-svelte-check-issues-helpers

Conversation

@gka
Copy link
Copy Markdown
Contributor

@gka gka commented Feb 22, 2026

Resolves #467
Resolves #457
Resolves #458
Resolves #459
Resolves #460
Resolves #464
Resolves #465
Resolves #469

This pull request focuses on improving type safety and robustness across several mark helper components, especially for canvas rendering and box plot handling. The changes mainly address stricter typing, better handling of optional and default values, and more reliable property resolution. These updates help prevent runtime errors and make the codebase easier to maintain.

Type Safety and Robustness Improvements

  • Updated mark prop types in RegressionX.svelte and RegressionY.svelte to use RegressionOptions, adding a new canvas property for flexibility in rendering. [1] [2]
  • Refined type handling in Box.svelte by enforcing array types for data, adding explicit type casts in data processing, and improving sorting and channel resolution logic for box plot calculations. [1] [2] [3] [4] [5] [6] [7] [8]
  • Enhanced type annotations and default value handling in canvas mark helpers (DotCanvas.svelte, GeoCanvas.svelte, LineCanvas.svelte) to ensure correct property resolution, safer color and opacity handling, and more robust rendering logic. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Marker and Multiline Text Improvements

  • Improved MarkerPath.svelte by adding support for reversed paths, handling optional and default values for marker properties, and ensuring correct rendering of markers and invisible paths for mouse access. [1] [2] [3] [4] [5]
  • Fixed type import and default value resolution in MultilineText.svelte for more reliable text alignment and style handling. [1] [2]

Resolves #467

Summary
- align `RegressionX/Y` props with the updated helper interface so they
import `RegressionOptions` now that the helper exports the shared props
- expand `helpers/Regression.svelte` to normalize regression inputs,
handle optional parameters, and tighten confidence-band logic with
better numeric conversions and comments
- cast regression example state types and silence ts-lint noise in the
regression tests so `pnpm lint:types` no longer errors
- passes canvas prop to Area + Line marks

Testing
- Not run (not requested)
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 22, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit b578d91
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/699a4d6b89002200080c22e5
😎 Deploy Preview https://deploy-preview-482--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions
Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.10.3-pr-482.0

Install it with:

npm install svelteplot@pr-482
# or install the specific version
npm install svelteplot@0.10.3-pr-482.0

@gka gka changed the title types: Fix regression mark helpers and tests (#480) types: Fix svelte-check issues in mark helpers Feb 22, 2026
@gka gka merged commit 29dd2dd into main Feb 22, 2026
9 checks passed
@gka gka deleted the types/fix-svelte-check-issues-helpers branch February 22, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment