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

spinner while stretch histogram data updating #2644

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

kecnry
Copy link
Member

@kecnry kecnry commented Jan 2, 2024

Description

This pull request implements a spinner showing when the data for the stretch histogram is updating.

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@kecnry kecnry added this to the 3.9 milestone Jan 2, 2024
@github-actions github-actions bot added the plugin Label for plugins common to multiple configurations label Jan 2, 2024
@kecnry kecnry force-pushed the stretch-hist-spinner branch from d425cf1 to 9102864 Compare January 2, 2024 21:31
@kecnry kecnry marked this pull request as ready for review January 2, 2024 21:32
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8b997fb) 91.52% compared to head (4362f11) 91.52%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2644      +/-   ##
==========================================
- Coverage   91.52%   91.52%   -0.01%     
==========================================
  Files         161      161              
  Lines       19989    19995       +6     
==========================================
+ Hits        18295    18300       +5     
- Misses       1694     1695       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

I think I saw it but I can't be sure. It comes and goes too fast. I saw the histogram blink and what I thought is part of a spinner for a split second.

@camipacifici
Copy link
Contributor

Tested with a very big image and it worked really well. Thank you!

@camipacifici
Copy link
Contributor

And now I broke it... :( I will try to reproduce the problem and see if it is just a glitch or an actual problem.

@camipacifici
Copy link
Contributor

Ok, the problem is with the toggle "limit histogram to current zoom limits". When toggling it, the spinner is just a flash, but the histogram is taking a longer time to settle.

@kecnry
Copy link
Member Author

kecnry commented Jan 3, 2024

I think I managed to fix the main issue as well as the flickering spinner sometimes seen for updates that are immediately skipped. Sometimes though the image viewer seems to process its update before the callback is sent to the stretch histogram, resulting in a "delayed" start of the spinner. I'm not sure there is much we can do about these cases. But the spinner should show whenever the histogram itself is processing an update.

Here is what I currently see on my end.

Screen.Recording.2024-01-03.at.3.52.07.PM.mov

@camipacifici
Copy link
Contributor

Works on my end too! Thank you for fixing it.

Copy link
Contributor

@gibsongreen gibsongreen left a comment

Choose a reason for hiding this comment

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

This is also working for me when data is first loaded and when the zoom is updated and the histogram is limited to said zoom!

@pllim pllim merged commit 78c3c21 into spacetelescope:main Jan 3, 2024
13 of 15 checks passed
@kecnry kecnry deleted the stretch-hist-spinner branch January 4, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin Label for plugins common to multiple configurations Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants