Skip to content

fix: pass class name to base axis helper components#331

Merged
gka merged 2 commits into
mainfrom
fix/axis-class
Jan 18, 2026
Merged

fix: pass class name to base axis helper components#331
gka merged 2 commits into
mainfrom
fix/axis-class

Conversation

@gka

@gka gka commented Jan 18, 2026

Copy link
Copy Markdown
Contributor

This pull request updates how custom CSS classes are applied to axis components and improves type safety for axis props. It also adds new tests to ensure that custom classes are correctly set on both X and Y axes.

Axis component improvements:

  • Changed AxisX.svelte and AxisY.svelte to pass the CSS class using the class attribute instead of className, aligning with Svelte conventions. [1] [2]
  • Updated the prop types for the class attribute in BaseAxisX.svelte and BaseAxisY.svelte to allow string | undefined, improving type safety and flexibility. [1] [2]

Testing enhancements:

  • Added tests to axisX.test.ts and axisY.test.ts to verify that custom class names are correctly applied to axis elements, ensuring the new behavior works as expected. [1] [2]

@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 859
  • main branch: 1114
  • Difference (PR - main): -255 🎉

Svelte TypeScript error report:

  • This branch: 2112
  • main branch: 2112
  • Difference (PR - main): 0 ℹ️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-331.0

Install it with:

npm install svelteplot@pr-331
# or install the specific version
npm install [email protected]

@netlify

netlify Bot commented Jan 18, 2026

Copy link
Copy Markdown

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 035aeb2
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/696d669566c7aa00087b6da7
😎 Deploy Preview https://deploy-preview-331--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.

@github-actions

Copy link
Copy Markdown

TypeScript error report:

  • This branch: 859
  • main branch: 1114
  • Difference (PR - main): -255 🎉

Svelte TypeScript error report:

  • This branch: 2112
  • main branch: 2112
  • Difference (PR - main): 0 ℹ️

@github-actions

Copy link
Copy Markdown

📦 Preview package for this PR is published!

Version: 0.9.1-pr-331.1

Install it with:

npm install svelteplot@pr-331
# or install the specific version
npm install [email protected]

@gka gka merged commit 436571d into main Jan 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant