observablehq / observablehq/plot
[Types] Wrong recursion in Mark’s _tip_ option
Open
Beginner friendly
Nobody has claimed this yet.
bug
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
MarkOption.tip is of type TipOptions. (This is a simplified statement, but true enough for this issue description).
TipOptions itself derives from MarkOptions.
This recursion lets us specify nested tips:
Plot.dot(penguins, {x: "culmen_length_mm", y: "culmen_depth_mm", tip: {tip: {tip: {tip: {tip: {tip: {}}}}}}}).plot()
TipOptions should probably exclude the tip property.
Related: #2423
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the MarkOption.tip and TipOptions type definitions, starting from the type declarations used for mark options. Exclude tip from TipOptions so nested tip values are no longer accepted, then verify that the example no longer type-checks and that valid tip options remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100