-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Improvements to table: restyle
fix, 0 row/column and misc. fixes; jasmine tests
#2107
Conversation
ddc2ebf
to
7a5b02c
Compare
I'll test out this branch on streambed, see if the restyle calls I need work now, thanks! |
ok, I see the improvements, here's a few observations:
I'd really like to see that extra [] wrapping fixed in this pr, would really help for the workspace integration. Thanks! |
test/jasmine/tests/table_test.js
Outdated
}); | ||
|
||
it('Calling `Plotly.relayout` with string should amend the preexisting parcoords', function(done) { | ||
expect(gd.layout.width).toEqual(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preexisting 'tables' instead of 'parcoords'
test/jasmine/tests/table_test.js
Outdated
}); | ||
|
||
it('Calling `Plotly.relayout` with object should amend the preexisting parcoords', function(done) { | ||
expect(gd.layout.width).toEqual(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a few tests testing some of those array attributes?
Hi @VeraZab yes #1 is the way |
Per column: as you did above |
@VeraZab this version replaces cell contents in one call, ie. not of just one column at a time: https://codepen.io/anon/pen/dVrKqb?editors=1010 - I'm adding jasmine test cases for such things, and what you're pointing out above as well. |
oh for #1, yeah sorry there's a bunch of things that I'm realizing are not working as expected in the workspace, so I was making the calls from the workspace console to test your pr, rather from the workspace ui, which already has those conventions pre-built, yeah I think that's fine.
yeah, both are supported right, from what I've seen in my tests, and that's great, should be that way, and yes, let's add some tests Ok, well, aside from a few extra tests, I'm good with this pr 💃 |
Oh shit, what Vera points out will be very tricky to fix. We can't rely on what we currently do for other 2d array trace types as table is column major. |
@etpinard I think I've made a mistake in that comment, about array wrapping. I've just checked for a scatter trace, and it's true that when I want to send an update to I wrap the [1, 2, 3] array into another array and the correct call is so my bad, I think this pr's good to go, after tests |
restyle
fix was urgent due to Restyling table traces #2092