8000 Change naming of 'pan/zoom' mode to 'Move camera' to clarify functionality differences in 2D and 3D by TimMonko · Pull Request #7569 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Change naming of 'pan/zoom' mode to 'Move camera' to clarify functionality differences in 2D and 3D #7569

8000
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

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

TimMonko
Copy link
Contributor
@TimMonko TimMonko commented Jan 30, 2025

References and relevant issues

Closes #7467 by clearing up confusion about how to activate and move camera/layer in various circumstances including 2D vs 3D and labels layers. Thank you in particular for additional information @psobolewskiPhD and @brisvag (and for the 'Move camera' suggestion, for which I could not think of anything more appropriate).

I will open a PR to update the name used in the docs if this PR ends up being merged.

image

Description

  1. Updates name of qt button from 'Pan/zoom' to 'Move camera'. Corresponding keybindings auto update
  2. Changes extra tooltip to clarify 2D vs 3D behavior of moving the camera, especially for temporary mode. Updates keybinding tooltip for temp mode.
  3. Minorly updates docstrings for things like panzoom_button to call reflect change to camera move mode. Does not change any attribute/method names.

Alternatives

  1. Only change extra tooltip in qt_layer_controls_base.py to clarify 2D vs 3D usage

Copy link
codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.91%. Comparing base (a6d3eb5) to head (1df16dc).
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7569      +/-   ##
==========================================
- Coverage   92.95%   92.91%   -0.04%     
==========================================
  Files         628      628              
  Lines       58820    58820              
==========================================
- Hits        54676    54655      -21     
- Misses       4144     4165      +21     

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

@psobolewskiPhD psobolewskiPhD added this to the 0.6.0 milestone Jan 30, 2025
Copy link
Member
@psobolewskiPhD psobolewskiPhD left a comment

Choose a reason for hiding this comment

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

I like it! I think there is a difference between moving the layer and the camera, so this makes it more clear.

@@ -578,7 +578,7 @@ def _mode_setter_helper(self, mode_in: Union[Mode, str]) -> StringEnum:

if mode == TRANSFORM:
self.help = trans._(
'hold <space> to pan/zoom, hold <shift> to preserve aspect ratio and rotate in 45° increments'
'hold <space> to move camera, hold <shift> to preserve aspect ratio and rotate in 45° increments'
Copy link
Member

Choose a reason for hiding this comment

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

BTW, i can't figure out how/when to see this message! Making a note here for further investigation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unable to find this message either. From what I understand it should be in the bottom right for the status bar message, but seems to only ever show different tooltips (like when in Transform mode it suggests pressing hotkey to switch to Move camera mode)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think I've got a lead on the culprit. will make an issue or pr once I've sorted it -- probably not till the weekend though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@psobolewskiPhD, I think it shows up when 'Show Layer Tooltips' is ticked on in the settings -- I checked for 10 seconds before leavign the lab. Sorry, sending from my phone at the moment but it popped into my head and didn't want to forget to pass it on.

Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure layer tooltips are something different.
Try:
python examples/add_labels_with_features.py
And then hover over the labeled coins with that option ticked on or off (it's also in the View menu)

@psobolewskiPhD
Copy link
Member

I'd like one more core dev to chime in on this before we merge.

@psobolewskiPhD psobolewskiPhD added UI/UX ready to merge Last chance for comments! Will be merged in ~24h labels Feb 5, 2025
@DragaDoncila
Copy link
Contributor

We discussed this at last week's Eurasia meeting and were all happy with the change. I'm merging now! Thanks @TimMonko 🎉

@DragaDoncila DragaDoncila merged commit 1d3be14 into napari:main Feb 11, 2025
46 checks passed
@github-actions github-actions bot removed the ready to merge Last chance for comments! Will be merged in ~24h label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pan/zoom is spacebar in most instances except 3D view, where it is shift
3 participants
0