Skip to content

Make polar be more graceful on non sense inputs #3021

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

Merged
merged 7 commits into from
Sep 18, 2018

Conversation

etpinard
Copy link
Contributor

This PR fixes two issue-less bugs discovered by @dmt0:

This PR also:

  • adds a small perf boost on main-drag mouse-move,
  • fixes a bug-less typo in the splom defaults (discovered by @bpostlethwaite )
  • tags the plotly_webglcontextlost test in gl2d_plot_interact_test.js as @noCI.
  • tags a newly-added select test (in the click-to-select PR) as @flaky

The last two items should help with the (several) intermittent test failures we've been seeing lately.

cc @alexcjohnson @antoinerg

@etpinard etpinard added bug something broken type: maintenance labels Sep 17, 2018
y2: 0,
transform: trans
})
updateElement(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recall that updateElement is

function updateElement(sel, showAttr, attrs) {
if(showAttr) {
sel.attr('display', null);
sel.attr(attrs);
} else if(sel) {
sel.attr('display', 'none');
}
return sel;
}

@@ -215,7 +215,7 @@ describe('Test gl plot side effects', function() {
.then(done);
});

it('@gl should fire *plotly_webglcontextlost* when on webgl context lost', function(done) {
it('@noCI @gl should fire *plotly_webglcontextlost* when on webgl context lost', function(done) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 successes in 4 test-jasmine2 runs with this @noCI

}])
.then(function() { _assert('base', true); })
.then(function() { return Plotly.relayout(gd, 'polar.hole', 1); })
.then(function() { _assert('hole=1', false); })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it doesn't fail... does it work? ie draws all data on the rim regardless of radial value (within the radial range)? Do you want to include this in a mock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's hole=1 subplot:

peek 2018-09-17 17-11

where angular drag still drag still works.

ie draws all data on the rim regardless of radial value (within the radial range)?

it shows no data points.

Do you want to include this in a mock?

done in cb5b336

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it shows no data points.

This comment is nonblocking (perhaps add to #2255 if you don't want to address it here):

With cliponaxis: false (which is the default anyway for polar) I would have expected it to show the data - and it currently doesn't, even if you explicitly specify a range. The argument for this behavior is to have hole: 1 match hole: 0.9999 as closely as possible. Perhaps not useful, though I guess I could see someone wanting to just show where their data is on an angular scale without involving a radial scale at all. That said they can always just use hole: 0.9999 as a workaround, so it's not really any missing functionality... but it feels hacky.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argument for this behavior is to have hole: 1 match hole: 0.9999 as closely as possible.

Ah I see. Good point.

Perhaps not useful, though I guess I could see someone wanting to just show where their data is on an angular scale without involving a radial scale at all

I'll wait until someone complains about it (maybe @nicolaskruchten ?) before addressing this. Now in -> #2255 (comment)

@alexcjohnson
Copy link
Collaborator

Very nice bunch of cleanup @etpinard! 💃

@etpinard etpinard mentioned this pull request Sep 18, 2018
12 tasks
@etpinard etpinard merged commit 96950d5 into master Sep 18, 2018
@etpinard etpinard deleted the polar-fail-gracefully-on-non-sense-inputs branch September 18, 2018 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants