crosstalk equality
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
I discovered this as I worked through an example of linking leaflet with DT and plotly through crosstalk (example). It seems plotly converts crosstalk keys to String and then uses exact equality match .indexOf (see lines). Thinking through how best to solve this, I came up with the following:
-
Not convert crosstalk key to string in plotly, but I am guessing there was a reason to do the conversion for plotly traces.
-
Perform match using something other than
indexOfor===. For the purposes of my example I used[].filter, but this is inefficient. -
Expect other
htmlwidgetauthors to also convert to string, or add both the string and non-string forms to crosstalk select.
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
Reproduce the linked crosstalk example in experiments/select_crosstalk.R and inspect the matching logic referenced at plotly.js line 739. Compare the key representations used by leaflet, DT, and plotly, then establish which matching behavior should be consistent across the example before changing anything. Done means the linked widgets select the same keys reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100