observablehq / observablehq/plot
easier copying of tip contents?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
Copying the contents of this tip
Plot.tip(["lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum lorem ipsum"]).plot({height:300})
results in zero-width whitespaces and words seem glued together lorem ipsum lorem ipsum lorem ipsumlorem ipsum lorem ipsum lorem ipsumlorem ipsum
The insertion of zwsp in
https://github.com/observablehq/plot/blob/30d6c9006978c85732ce969ec288f5b7f4b7a82f/src/marks/tip.js#L195
is meant to prevent words across newlines from being selected as one word.
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
Start in src/marks/tip.js at line 195 and reproduce the issue with the Plot.tip example in the report. Inspect the copied text to confirm where zero-width spaces are inserted and verify the intended selection behavior. Done means tip contents copy with normal word spacing while preserving the stated selection purpose.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100