Make all gl traces show "no webgl message" and fail gracefully#2697
Merged
Make all gl traces show "no webgl message" and fail gracefully#2697
Conversation
- by making sure it scene creation returns early when WebGL context creation fails.
- gl2d was broken (fixed here) - all regl-based trace types (scattergl, scatterpolargl, splom and parcoords) were missing.
etpinard
commented
Jun 5, 2018
| checkNoWebGLMsg(false); | ||
| }) | ||
| .catch(failTest) | ||
| .then(done); |
alexcjohnson
reviewed
Jun 5, 2018
src/traces/scattergl/index.js
Outdated
| scene.error2d = false; | ||
| scene.line2d = false; | ||
| scene.scatter2d = false; | ||
| scene.fill2d = false; |
Collaborator
There was a problem hiding this comment.
what happens if we add some other component to support a new feature, would we also have to add it here? Will the tests below fail and force that, or would we need to add a new test for the new feature? Just wondering if there's some way we can preempt these concerns like
if(!success) {
for(var key in scene) {
if(something about key or scene[key]) scene[key] = false;
}
}
Contributor
|
Nice! with reference to the gif above, I would say that the error message should have an opaque background (white?) and a border (grey?) so it stands out a bit on top of the axes. Other than that 👍 |
Collaborator
|
Nicely done! 💃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


fixes #2665 (the fail gracefully part) and #2666 (the missing message part).
Most importantly, I found a pretty solid way to test no-webgl environments. Adding a
--disable-webglflag to the Chrome CLI in our Karma config did the trick.@alexcjohnson @nicolaskruchten