Skip to content

docs: add JSDoc to BaseMarkProps and BaseRectMarkProps#360

Merged
gka merged 1 commit into
svelteplot:mainfrom
ljodea:docs/jsdoc-base-mark-props
Feb 14, 2026
Merged

docs: add JSDoc to BaseMarkProps and BaseRectMarkProps#360
gka merged 1 commit into
svelteplot:mainfrom
ljodea:docs/jsdoc-base-mark-props

Conversation

@ljodea

@ljodea ljodea commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds JSDoc comments to 61 undocumented fields in BaseMarkProps (25 styling/positioning props, 30 event handlers, cursor) and BaseRectMarkProps (6 inset/border-radius props) in src/lib/types/mark.ts
  • Regenerates src/routes/api/marks/+page.md so the auto-generated API docs have populated description columns instead of empty cells
  • These two base types are inherited by every mark in the library, so this is the highest-leverage batch of JSDoc additions

Test plan

  • node scripts/generate-api.js --marks runs without errors
  • Verified 0 empty description cells in BaseMarkProps and BaseRectMarkProps sections of generated docs
  • Spot-checked inherited props on Dot, Area, Rect, Cell marks — all reference BaseMarkProps/BaseRectMarkProps correctly
  • Existing JSDoc on filter, class, style, and LinkableMarkProps unchanged

🤖 Generated with Claude Code

Add descriptions to 61 undocumented fields in BaseMarkProps (25 styling/
positioning props, 30 event handlers, cursor) and BaseRectMarkProps
(6 inset/border-radius props). These base types are inherited by every
mark in the library, so this fills the most empty description cells in
the auto-generated API docs.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@netlify

netlify Bot commented Feb 10, 2026

Copy link
Copy Markdown

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit e3ffcf2
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/698a7e5cb5d76c000856e153
😎 Deploy Preview https://deploy-preview-360--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.

gka pushed a commit that referenced this pull request Feb 14, 2026
## Summary
- Add JSDoc comments to undocumented props in all remaining mark
components
- Also documents the shared `RegressionMarkProps` type in the Regression
helper
- Fixes a `/*` (non-JSDoc) comment on DifferenceY's `x1` prop to use
`/**`
- Follows the same pattern established in #360, #361, #362, and #363

## Details

| Component | Props documented |
|-----------|-----------------|
| Geo | 3 props (data, geoType, svgFilter) |
| Graticule | 3 props (step, stepX, stepY) |
| BollingerX | 3 props (data, x, y) |
| BollingerY | 3 props (data, x, y) |
| BoxY | 3 props (data, x, y) |
| DifferenceY | 4 props (data, x, y, fillOpacity) |
| WaffleX | 6 props (data, x, x1, x2, y, stack) |
| WaffleY | 5 props (data, x, y, y1, y2) |
| Frame | 11 props (fill, stroke, fillOpacity, strokeOpacity, opacity,
automatic, inset, insetLeft/Right/Top/Bottom) |
| CustomMark | 11 props (data, type, x, x1, x2, y, y1, y2, r, mark,
marks) |
| CustomMarkHTML | 6 props (data, x, y, frameAnchor, class, children) |
| ColorLegend | 1 prop (class) |
| Regression helper | 5 props (x, y, type, base, span, confidence) |

**Not touched** (no new props to document):
- Sphere (inherits all from BaseMarkProps/LinkableMarkProps)
- BoxX (thin wrapper around BoxY)
- RegressionX/Y (re-export RegressionMarkProps from helper)
- SymbolLegend (no props interface)

## Test plan
- [x] `pnpm run lint` passes
- [ ] Verify hovering over component props in editor shows JSDoc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <[email protected]>
gka pushed a commit that referenced this pull request Feb 14, 2026
## Summary
- Add JSDoc comments to undocumented props in **Brush**, **Pointer**,
**HTMLTooltip**, **Vector**, **Trail**, **Spike**, and **Link** mark
components
- BrushX/BrushY are thin wrappers with no additional props to document
- Follows the same pattern established in #360, #361, and #362

## Details

| Component | Props documented |
|-----------|-----------------|
| Brush | 4 props (brush, onbrushstart, onbrushend, onbrush) |
| Pointer | 7 props (data, children, x, y, z, fx, fy) |
| HTMLTooltip | 7 props (data, x, y, r, fx, fy, children) |
| Vector | 8 props (data, x, y, r, length, rotate, shape, children,
canvas) |
| Trail | 11 props (data, x, y, z, r, curve, tension, sort, defined,
canvas, cap) |
| Spike | 6 props (data, x, y, r, length, rotate) |
| Link | 3 props (data, sort, y2) |

## Test plan
- [x] `pnpm run lint` passes
- [ ] Verify hovering over component props in editor shows JSDoc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <[email protected]>
gka pushed a commit that referenced this pull request Feb 14, 2026
## Summary
- Add JSDoc comments to all undocumented props in **AxisX**, **AxisY**,
**GridX**, **GridY**, **TickX**, and **TickY** mark components
- Fix incorrect scale references in TickY JSDoc (x/y were swapped)
- Follows the same pattern established in #360 and #361

## Details

| Component | Props documented |
|-----------|-----------------|
| AxisX | 13 props (data, automatic, title, anchor, interval,
facetAnchor, labelAnchor, tickSize, tickFontSize, titleFontSize,
tickPadding, tickFormat, tickClass) |
| AxisY | 15 props (same as AxisX + lineAnchor, textAnchor) |
| GridX | 4 props (data, automatic, y1, y2) |
| GridY | 4 props (data, automatic, x1, x2) |
| TickX | 2 props (data, canvas) |
| TickY | 2 props (data, canvas) + fixed existing x/y JSDoc |

## Test plan
- [x] `pnpm run lint` passes
- [ ] Verify hovering over component props in editor shows JSDoc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <[email protected]>
@gka gka merged commit 31318c5 into svelteplot:main Feb 14, 2026
4 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.

2 participants