-
Notifications
You must be signed in to change notification settings - Fork 7
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: cease autoplay when maidr is deactivated (outside the plot) #526
Conversation
@ellvix It looks good to me. Please share your insight. One naive question: Why do we have to apply this fix to each of the plot types? Could we refactor our code to modularize this? |
@krishnanand5 Please go ahead with this solution and apply to the other plots. Will refactor later if needed later. |
… interactive plot
1726388
to
3942a4f
Compare
Greetings Professor, I have pushed some changes that help to address the ghost autoplay issue on Scatterplot and Heatmap. Heatmap in particular, required some additional changes which were a result of handling the case of empty plot data on the Standard barplots do not face this issue and hence no changes were required. Regards, |
Thanks, @krishnanand5. Have you tested the boxplot and histogram as well? |
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.
LGTM! Merge once you are ready.
Greetings Professor, Histogram was addressed as part of the draft PR. As far as boxplot is concerned, I experienced issues with the in-repo example where the components were not getting highlighted as I was traversing through the plot. I did not see the exceptions being thrown like how it was for the other plots. Having said that, I would like to investigate boxplot a bit further and address any issues I unearth separately. Regards, |
@krishnanand5 sounds like a plan! Thanks for your detailed description 👍 |
## [2.14.6](v2.14.5...v2.14.6) (2024-08-28) ### Bug Fixes * cease autoplay when maidr is deactivated (outside the plot) ([#526](#526)) ([dd564ec](dd564ec))
🎉 This PR is included in version 2.14.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request
Description
This Pull request aims to address a background issue where autoplay continues to execute even after maidr has been deactivated on the plot by a user click outside the plot area. Changes made in this pull request check for availability of
plotData
once maidr has been deactivated to handle exceptions thrown byautoplay()
gracefully.Related Issues
This Pull request aims to solve #522
Changes Made
Autoplay()
previously did not consider the state ofplot.plotData
when trying to access the plot components. Should the user click outside the interactive plot area, maidr would be deactivated which would result in destruction ofplot
object. Hence,Autoplay()
would be running in the background and attempt to access theplot
object components which were not present and therefore would emit exceptions incessantly.With the Heatmap, addressing the
Autoplay()
on inactive maidr is not sufficient. The heatmap itself needs to be prevented from accessing points once autoplay has ended and additionally, its related audio functions need to be handled should the plot data be empty.Checklist
ManualTestingProcess.md
, and all tests related to this pull request pass.Additional Notes
This PR addresses ghost autoplay issues with Histogram, Scatterplot and Heatmap.