-
Notifications
You must be signed in to change notification settings - Fork 74
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
update rotation_angle when _add_orientation is called #2838
update rotation_angle when _add_orientation is called #2838
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2838 +/- ##
==========================================
+ Coverage 88.94% 88.96% +0.01%
==========================================
Files 111 111
Lines 17101 17104 +3
==========================================
+ Hits 15211 15217 +6
+ Misses 1890 1887 -3 ☔ View full report in Codecov by Sentry. |
if rotation_angle is not None: | ||
self.rotation_angle = rotation_angle |
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.
The rotation_angle
traitlet isn't necessarily the currently set rotation, but rather the rotation that will be used if creating a new entry from the UI, right? (Side note: maybe we need a separate ticket to clarify this in the API docs?). I'm not sure I'd expect a kwarg to add_orientation
from the API to change that value then (and if it does, we probably should do the same for east_left
and label
?).
Can you please remind me what buggy behavior this is aiming to fix? I am wondering if maybe the fix needs to be in footprints instead? EDIT: ah, it was with the automatic labeling not respecting the passed angle.
Maybe we can just refactor the labeling logic to act on the overrides instead of the traitlets? Although the API docs do say: "If None
, the value will follow self.new_layer_label
." which is exactly what happens before this PR 🤔
Description
This pull request is to address updating the orientation plugin's
rotation_angle
when_add_orientation()
is called via API.Screen.Recording.2024-04-30.at.10.39.27.PM.mov
Screen.Recording.2024-04-30.at.10.38.06.PM.mov
Fixes #
Change log entry
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, maintainershould 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.
trivial
label.