Some rules that were good ideas before but become crucial with Plotly.react so that we recognize a non-change correctly:
- Never create new arrays in the
supplyDefaults step - for example reshaping 1D to 2D arrays. That should be done in a calc step and NOT pushed back into _fullData.
- Don't modify attributes after finishing
supplyDefaults, unless you're going to push the results back to the input (data/layout) as well, like autorange/range.
- When you're stashing things on
_full*, always make _private attributes.
Most of the instances of this are taken care of in #2341, but a few are open:
Some rules that were good ideas before but become crucial with
Plotly.reactso that we recognize a non-change correctly:supplyDefaultsstep - for example reshaping 1D to 2D arrays. That should be done in acalcstep and NOT pushed back into_fullData.supplyDefaults, unless you're going to push the results back to the input (data/layout) as well, likeautorange/range._full*, always make_privateattributes.Most of the instances of this are taken care of in #2341, but a few are open:
tick0,dtick-> default filled in late (After SD) - also for tickmode=array, not needed at allcameradoesn’t push back into_fullLlayoutafter drag, onlylayout?scatter3dwith uneven or missing x/y/zsurfacewith uneven, missing, or ragged x/y/zautocolorscale: first time it gets set on, second time off - is that intentional? cauto sometimes shows a similar effect… seegl3d_scatter-color-mono-and-paletteresolved in: Don't mutate colorscale, cmin/cmax and zmin/zmax into user traces #3341contourcarpet:zmin/zmaxget filled in (aftersupplyDefaults) but they aren't actually attributes ofcontourcarpet. They should be!autorange: 'reversed'should get replaced inlayoutonce it has been acted on. There's a polar mock where this doesn't happen until the second draw.