Skip to content

Commit aec6bde

Browse files
cpsievertclaude
andcommitted
Add TODO tracking file for plotly.js upgrade
Tracks: - Potential regressions to test (pie rotation, selection events, SVG export, etc.) - Potential improvements/new features to expose in R package 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 76d5440 commit aec6bde

1 file changed

Lines changed: 245 additions & 0 deletions

File tree

PLOTLYJS_UPGRADE_TODO.md

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
# plotly.js Upgrade TODO
2+
3+
Items to address following the upgrade from v2.11.1 to v2.25.2.
4+
5+
---
6+
7+
## Potential Regressions to Test
8+
9+
These changes in plotly.js could potentially cause regressions in existing R package functionality. Each should be tested to ensure the R package continues to work as expected.
10+
11+
### HIGH PRIORITY
12+
13+
- [ ] **Pie chart rotation behavior** (v2.15.0)
14+
- Change: Updated pie chart `rotation` to use `angle` value type
15+
- Risk: Existing R code using pie chart rotation may behave differently
16+
- Test: Create pie charts with rotation values and compare before/after behavior
17+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.15.0
18+
19+
- [ ] **Selection event changes** (v2.13.0, v2.13.1, v2.13.2, v2.13.3)
20+
- Change: Major overhaul of selection handling - persistent/editable selections, `plotly_selected` event now emits on API calls and GUI edits
21+
- Risk: Shiny event handlers relying on selection events may receive different/additional events
22+
- Test: Test `event_data("plotly_selected")` in Shiny apps, ensure brushing behavior is unchanged
23+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
24+
25+
- [ ] **SVG export scaling** (v2.18.1)
26+
- Change: Removed vector-effect CSS for static plots to fix SVG export scaling
27+
- Risk: Static image export via kaleido/orca may produce different results
28+
- Test: Export plots to SVG and compare rendering
29+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.18.1
30+
31+
### MEDIUM PRIORITY
32+
33+
- [ ] **Multiple legend defaults** (v2.22.0, v2.24.2, v2.24.3)
34+
- Change: Added multiple legend support; several fixes to legend group/trace order defaults
35+
- Risk: Existing plots with legendgroups may have different default ordering
36+
- Test: Create plots with multiple legend groups and verify appearance
37+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.22.0
38+
39+
- [ ] **Automargin behavior changes** (v2.13.0, v2.15.0)
40+
- Change: More flexible `automargin` control on cartesian axes; fixed automargin axis title updates
41+
- Risk: Plot margins may differ slightly from previous versions
42+
- Test: Run visual regression tests on plots with long axis labels/titles
43+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
44+
45+
- [ ] **Hover label overlap fix** (v2.19.0)
46+
- Change: Fixed hover label overlap for `hovermode: 'x'` or `'y'`
47+
- Risk: Hover label positioning may change for existing plots
48+
- Test: Create plots with multiple traces and verify hover labels don't overlap
49+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.19.0
50+
51+
### LOW PRIORITY
52+
53+
- [ ] **Bundle size changes** (v2.17.0)
54+
- Change: Switched bundler from browserify to webpack
55+
- Risk: Bundle size may have changed; performance characteristics may differ
56+
- Test: Compare bundle sizes, check for any performance regressions
57+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.17.0
58+
59+
- [ ] **Static plot interactions** (v2.15.0, v2.16.5)
60+
- Change: Disabled interactions for static plot modes in treemap, icicle, sunburst; disabled slider interactions when staticPlot is true
61+
- Risk: `config(staticPlot = TRUE)` may behave differently
62+
- Test: Verify static plots are truly non-interactive
63+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.15.0
64+
65+
- [ ] **Heatmap rendering changes** (v2.21.0, v2.23.0, v2.23.1)
66+
- Change: Fixed heatmap `zsmooth: "fast"` rendering/performance; improved rendering when zsmooth is false; fixed iOS/Safari rendering
67+
- Risk: Visual differences in heatmap rendering
68+
- Test: Run visual tests on heatmaps with different zsmooth settings
69+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.21.0
70+
71+
---
72+
73+
## Potential Improvements / New Features
74+
75+
These are new plotly.js features that could be exposed or better supported in the R package. Not critical, but would enhance functionality.
76+
77+
### Legend Improvements
78+
79+
- [ ] **Multiple legends** (v2.22.0)
80+
- Feature: Support for `legend2`, `legend3`, etc. with separate positioning
81+
- R Impact: Could document how to use multiple legends via `layout()`
82+
- Priority: Medium - significant new capability
83+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.22.0
84+
85+
- [ ] **Legend visibility control** (v2.22.0)
86+
- Feature: Added `visible` option for legends
87+
- R Impact: Could add to `layout()` documentation
88+
- Priority: Low
89+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.22.0
90+
91+
- [ ] **Legend entry width** (v2.15.0)
92+
- Feature: `entrywidth` and `entrywidthmode` for legend items
93+
- R Impact: Document in legend customization examples
94+
- Priority: Low
95+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.15.0
96+
97+
- [ ] **Shape legends** (v2.25.0)
98+
- Feature: Legends can now include shapes and `newshape`
99+
- R Impact: Could enhance shape documentation
100+
- Priority: Low
101+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.25.0
102+
103+
### Axis/Layout Features
104+
105+
- [ ] **Grid dash styling** (v2.12.0)
106+
- Feature: `griddash` axis property for cartesian, polar, smith, ternary, geo, carpet
107+
- R Impact: Document new grid styling options
108+
- Priority: Low
109+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.12.0
110+
111+
- [ ] **Minor tick styling** (v2.12.0)
112+
- Feature: `minor.tickmode`, `minor.tickvals`, `minor.tickcolor`, etc.
113+
- R Impact: Could add helper functions or documentation for minor tick customization
114+
- Priority: Low
115+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.12.0
116+
117+
- [ ] **Y-axis shift/autoshift** (v2.17.0)
118+
- Feature: `shift` and `autoshift` properties to avoid y-axis overlapping
119+
- R Impact: Document for multi-y-axis plots
120+
- Priority: Medium - useful for complex plots
121+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.17.0
122+
123+
- [ ] **Sync tickmode** (v2.18.0)
124+
- Feature: New `sync` tickmode option for synchronized axes
125+
- R Impact: Document for subplots with shared axes
126+
- Priority: Low
127+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.18.0
128+
129+
- [ ] **Label alias** (v2.19.0)
130+
- Feature: `labelalias` for various axes types
131+
- R Impact: Could simplify axis label customization
132+
- Priority: Medium - useful feature
133+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.19.0
134+
135+
- [ ] **Title automargin** (v2.20.0)
136+
- Feature: `title.automargin` for automatic top/bottom margining
137+
- R Impact: Could reduce need for manual margin adjustments
138+
- Priority: Low
139+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.20.0
140+
141+
### Trace/Chart Features
142+
143+
- [ ] **Violin quartile methods** (v2.13.0)
144+
- Feature: Additional quartile computing algorithms for violin traces
145+
- R Impact: Could expose new quartile method options in violin trace helpers
146+
- Priority: Medium - enhances existing functionality
147+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
148+
149+
- [ ] **Marker angle properties** (v2.15.0)
150+
- Feature: `marker.angle`, `marker.angleref`, `marker.standoff`
151+
- R Impact: Could enhance marker customization documentation or helpers
152+
- Priority: Medium - useful for directional data
153+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.15.0
154+
155+
- [ ] **Scatter grouping** (v2.17.0)
156+
- Feature: `alignmentgroup` and `offsetgroup` for scatter traces
157+
- R Impact: Could enhance grouped scatter plot support
158+
- Priority: Medium - useful for grouped comparisons
159+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.17.0
160+
161+
- [ ] **Sankey arrows** (v2.14.0)
162+
- Feature: Support for sankey links with arrows
163+
- R Impact: Document new sankey link options
164+
- Priority: Low
165+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.14.0
166+
167+
- [ ] **Treemap corner radius** (v2.17.0)
168+
- Feature: `marker.cornerradius` for treemap trace
169+
- R Impact: Document styling option
170+
- Priority: Low
171+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.17.0
172+
173+
- [ ] **Pattern support expansion** (v2.24.0)
174+
- Feature: Pattern support for pie, funnelarea, sunburst, icicle, and treemap charts
175+
- R Impact: Document pattern fill options for these chart types
176+
- Priority: Low
177+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.24.0
178+
179+
### Shape Features
180+
181+
- [ ] **Shape labels** (v2.19.0, v2.21.0)
182+
- Feature: Shape `label` attribute and `label.texttemplate` for parametric shapes
183+
- R Impact: Could enhance shape annotation helpers
184+
- Priority: Medium - commonly requested feature
185+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.19.0
186+
187+
### Geo/Map Features
188+
189+
- [ ] **Equal Earth projection** (v2.25.0)
190+
- Feature: New "Equal Earth" projection for geo subplots
191+
- R Impact: Document new projection option for `plot_geo()`
192+
- Priority: Low
193+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.25.0
194+
195+
- [ ] **Scattermapbox clustering** (v2.16.0)
196+
- Feature: Clustering options and bounds support for scattermapbox
197+
- R Impact: Document clustering for `plot_mapbox()`
198+
- Priority: Medium - useful for large datasets
199+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.16.0
200+
201+
### Selection/Interaction Features
202+
203+
- [ ] **Editable selections** (v2.13.0, v2.14.0)
204+
- Feature: Persistent and editable selections; `editSelection` config option
205+
- R Impact: Could expose via `config()` and document for Shiny apps
206+
- Priority: Medium - enhances interactivity
207+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
208+
209+
### Indicator Features
210+
211+
- [ ] **Delta prefix/suffix** (v2.13.0)
212+
- Feature: `delta.prefix` and `delta.suffix` for indicator traces
213+
- R Impact: Document for indicator trace customization
214+
- Priority: Low
215+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
216+
217+
### Parallel Coordinates
218+
219+
- [ ] **Unselected line styling** (v2.13.0)
220+
- Feature: Unselected line color/opacity options
221+
- R Impact: Document for parallel coordinates customization
222+
- Priority: Low
223+
- Ref: https://github.com/plotly/plotly.js/releases/tag/v2.13.0
224+
225+
---
226+
227+
## Testing Checklist
228+
229+
Before merging the upgrade:
230+
231+
- [ ] Run full test suite: `devtools::test()`
232+
- [ ] Run visual tests: `Sys.setenv("VISUAL_TESTS" = "true"); devtools::test()`
233+
- [ ] Run R CMD check: `rcmdcheck::rcmdcheck()`
234+
- [ ] Test basic Shiny integration with event_data()
235+
- [ ] Manually test key plot types: scatter, bar, pie, heatmap, geo, mapbox
236+
- [ ] Compare bundle size before/after
237+
- [ ] Test static image export via kaleido
238+
239+
---
240+
241+
## Notes
242+
243+
- The IE9/phantomjs compatibility patch (001-revert-ie-fallbacks.patch) continues to apply successfully through all versions
244+
- Security fix in v2.25.2 addresses prototype pollution - important for production use
245+
- Many locale updates throughout the versions (Dutch, French, Norwegian, Slovak, Croatian, etc.)

0 commit comments

Comments
 (0)