-
-
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
Fix staticPlot behaviour for range slider and legend #5210
Conversation
These changes ensure that when `staticPlot` is active: 1. Items inside a legend cannot be toggled 2. The range slider cannot be interacted with, and the grab handles for adjusting the slider box are hidden. Fixes #5177
@miqh Thanks very much for the PR. |
The handles only make sense for interaction I think... so long as the shading is still present I'm ok with dropping the handles in static mode |
Great!
|
@miqh and if you had difficulty regenerating all these baselines, please let me know. |
@nicolaskruchten @alexcjohnson Secondly, we do display similar selection handle for |
Hmmm OK, let's leave them in as static elements I guess. |
@miqh would you mind revising this PR in a way that we don't need to change any baseline? |
Hello @archmoj, Apologies for the tardy follow-up. In any case, thanks for pointing out the instructions for running the image tests. Not quite sure how I missed them to begin with. As per your request, I've made another commit which backs out of hiding the range slider grabbers when However, I can't see how their visibilities would affect how plot margins are established. I had a look at d65674f, where you've presumably generated the baselines from my initial set of changes. I also can't locate the example you attached with the undesirable margin issue. If the presence of the grabbers does indeed affect the margin choice somewhere else in the codebase, then I guess this makes sense. The closest diff that looks like that attached screenshot is probably this one: |
It appears the element marked with `legendtoggle` contributes visually, which means it should not be skipped over when rendering in order to preserve the existing tests for image baselines. Fixes #5177
Thanks @miqh. To run those two test suites you ould use the following command:
|
Nicely done. |
Hi, do you know if this is a bug or not: even if the plot is in https://jsfiddle.net/1Lymg5jq/
|
@josephernest Please note |
Thanks @archmoj but the problem is still there with 2.16.4: https://jsfiddle.net/2mgzy38j/ The plot is static, but the slider is still active (it should not). |
Hello,
I dug into #5177 and eventually arrived at some changes which I believe should fix the issues described.
I used the existing
range_slider
test mock to check the effect of the changes, which I've attached previews of below.I suspect I also need to update some test fixture screenshots (i.e. baseline task?) because these changes effect visuals, but I'm not sure how to go about doing this.