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

Allow Shift+b to blink backwards #1558

Merged
merged 7 commits into from
Aug 11, 2022

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Aug 10, 2022

Description

This pull request is to add the ability to press Shift + b to blink backwards.

Fixes #1424

TODO

  • Do we also want to remove blink button from toolbar and make it an actual plugin so user can do blink backward, forward, or even auto blink on timer? Or is that out of scope here? No, right-click to blink backwards when tool is active works for now.
  • Do we want to future proof by having blink to ignore viewer load order but instead accept a list of data labels in arbitrary order that user can customize? This would allow user to reorder the blink order or is that out of scope here? Also see Imviz: Reorder layers #747 -- Let's defer as future work, as that issue impacts more than just blinking.

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 change log needed? If yes, is it added to CHANGES.rst?
  • Is a milestone set?
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@pllim pllim added the feature Feature request label Aug 10, 2022
@pllim pllim added this to the 2.9 milestone Aug 10, 2022
@pllim pllim requested a review from hcferguson August 10, 2022 00:15
@github-actions github-actions bot added documentation Explanation of code and concepts imviz labels Aug 10, 2022
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #1558 (a3a6518) into main (207f7a3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1558   +/-   ##
=======================================
  Coverage   85.44%   85.45%           
=======================================
  Files          94       94           
  Lines        9058     9061    +3     
=======================================
+ Hits         7740     7743    +3     
  Misses       1318     1318           
Impacted Files Coverage Δ
jdaviz/configs/imviz/plugins/tools.py 84.49% <100.00%> (ø)
jdaviz/configs/imviz/plugins/viewers.py 83.14% <100.00%> (+0.28%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@kecnry kecnry 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 having the tool in the toolbar is convenient, and that adding reversed functionality does not quite warrant the "overhead" of a full plugin (yet). Maybe just adding a note of the shift+B to the existing tool's tooltip would help make this a bit more discoverable? It might also be possible to have a right-click with the tool active to trigger reversed blink?

jdaviz/configs/imviz/plugins/viewers.py Outdated Show resolved Hide resolved
pllim and others added 2 commits August 10, 2022 16:32
Co-authored-by: Kyle Conroy <kyleconroy@gmail.com>
@pllim

This comment was marked as resolved.

@pllim pllim force-pushed the blink-back-to-the-future branch from a6980b5 to e1ed64c Compare August 10, 2022 20:42
@kecnry
Copy link
Member

kecnry commented Aug 10, 2022

I added a commit that implements support for right-click. Note that tool is still activated with a left click, but then right-clicking on the viewer blinks in the reversed direction.

@pllim pllim marked this pull request as ready for review August 10, 2022 22:22
Copy link

@hcferguson hcferguson left a comment

Choose a reason for hiding this comment

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

Looks good and works like a charm for me with both B and the right click!

@pllim
Copy link
Contributor Author

pllim commented Aug 11, 2022

Harry's approval counts as second approval? 😸

@pllim pllim merged commit feadcb9 into spacetelescope:main Aug 11, 2022
@pllim pllim deleted the blink-back-to-the-future branch August 11, 2022 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Explanation of code and concepts feature Feature request imviz Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Imviz: Blink backwards
3 participants