Fix #1213 - improve render warning behavior#1249
Merged
Conversation
c64dc34 to
3f336f4
Compare
texodus
approved these changes
Dec 16, 2020
Member
texodus
left a comment
There was a problem hiding this comment.
Looks good!
I think this implementation is an improvement over whats on master currently, a few things stick out to me re: the UX itself, that I'd like to answer in a future PR:
- The
X("dismiss the warning") button does indeed remove any indication the visualization is compromised, but the actual current implementation crops the top 30px of the view. I can buy not wanting this to go away, but if its going to be persistent I think it needs a redesign - maybe integration with the upcoming status bar? - Is
render_warningkeyword a more obvious implementation of this feature than, e.g.,max_cells: Infinity? In essence,max_cellsis a conceit to Perspective's somewhat asymmetric performance w.r.t. columns vs rows, so I can imagine a future simplification of this feature that only exportsmax_cells. At minimum,render_warningandmax_*are exclusive and might benefit from some validation (and maybe also default totrue💯 ). Obviously, as this is a developer facing API, we have some room to iterate here!
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.
This PR fixes #1213 by improving the behavior of
perspective-viewer's render warnings, which display when the chart is attempting to render a dataset that is larger than specified bounds and might have performance implications.As outlined in #1213, render warnings would keep popping up even after a user has dismissed them, and it becomes an annoyance for the user. Additionally, the presence of the "Close" button allows there to be a state where the user has closed the warning that a subset of the data is being displayed, but if the viewer's config is not changed then there are no other indications that the user is looking at a subset of the data and not the whole.
This PR changes the behavior of the render warning in the following ways:
render_warningoption has been added to each plugin config, which allows the user to specify whether the warning should be shown at all (defaults totrue):perspective-viewer-d3fc.