Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open items uncovered during Plotly.react push #2353

Closed
1 of 7 tasks
alexcjohnson opened this issue Feb 8, 2018 · 2 comments
Closed
1 of 7 tasks

open items uncovered during Plotly.react push #2353

alexcjohnson opened this issue Feb 8, 2018 · 2 comments

Comments

@alexcjohnson
Copy link
Collaborator

alexcjohnson commented Feb 8, 2018

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:

  • tick0, dtick -> default filled in late (After SD) - also for tickmode=array, not needed at all
  • camera doesn’t push back into _fullLlayout after drag, only layout?
  • tests for scatter3d with uneven or missing x/y/z
  • tests for surface with uneven, missing, or ragged x/y/z
  • autocolorscale: first time it gets set on, second time off - is that intentional? cauto sometimes shows a similar effect… see gl3d_scatter-color-mono-and-palette resolved in: Don't mutate colorscale, cmin/cmax and zmin/zmax into user traces #3341
  • contourcarpet: zmin/zmax get filled in (after supplyDefaults) but they aren't actually attributes of contourcarpet. They should be!
  • autorange: 'reversed' should get replaced in layout once it has been acted on. There's a polar mock where this doesn't happen until the second draw.
@etpinard
Copy link
Contributor

etpinard commented Feb 9, 2018

Referencing https://github.com/plotly/plotly.js/pull/2341/files#r166474049 about possibly improving implied edits.

Pasting content from https://github.com/plotly/plotly.js/pull/2341/files#r166675758:

think we should try and find a way to help the user access the recommendations we would make with impliedEdits and clearAxisTypes, but leave it up to them whether to follow those recommendations.

Perhaps all we need is to (under a certain config option) log whenever we mutate user data or user layout. Alternatively, Plotly.validate could be use here e.g.

Plotly.validate([{
  y: [1, 2, 1]
}], {
  xaxis: {
     autorange: true,
     range: [1, 2]
  }
})

could log something like: increasing range detected, range values ignored under autorange. Then together with #1741, it should make it fairly easy for plotly.js users to debug.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants