Skip to content
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

render selected plot for export offscreen #1

Conversation

kecnry
Copy link

@kecnry kecnry commented Apr 3, 2024

This pull request addresses the issue where exporting figure widgets not rendered to screen fails by:

  • rendering the selected plugin plot offscreen
  • ensuring the plot's plugin is considered active when clicking the export button
  • giving a small amount of time to ensure that the plot can update (but this is hardcoded and may not always be sufficient)

This "solution" still will not catch the case where the API is used to export a plot, but that same issue is known for the viewer plots as well and was present in the original export plot plugin.

Copy link
Owner

@cshanahan1 cshanahan1 left a comment

Choose a reason for hiding this comment

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

This solves the exporting plots when plugin is not active issue for me.

I don't know if this is a problem per se, but the highlight around an aperture will flash when exporting since the plugin is briefly active.

@kecnry
Copy link
Author

kecnry commented Apr 3, 2024

I don't know if this is a problem per se, but the highlight around an aperture will flash when exporting since the plugin is briefly active.

Hmmm, good point. We could eventually make as_active more fine-grained to update plots but not show the indicators, or we could instead filter on active plugins instead of forcing it to be active when exporting. But for now, this might be the easiest path forward with the least downsides? I'll let you decide - and we can file follow-up tickets to refine anything remaining.

@cshanahan1
Copy link
Owner

I think filtering on active plugins would be very confusing. I personally think it fine to merge this as a fix, since the plugin is only very briefly active and it doesn't actually impact anything, and follow up with some fine tuning to make it more seamless.

@cshanahan1 cshanahan1 merged commit 134dfe7 into cshanahan1:export-plugin-plot Apr 3, 2024
1 of 2 checks passed
@kecnry kecnry deleted the export-plugin-plot-render-offscreen branch April 3, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants