-
Notifications
You must be signed in to change notification settings - Fork 26
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
ENH: add notes field in TyphosDisplayTitle #557
Conversation
insert_into_data(env_data_path, device_name, data) | ||
|
||
|
||
class TyphosNotesEdit(QtWidgets.QLineEdit): |
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.
Is the intention single-line notes and not multi-line?
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.
That was my intention, but I'm not particularly tied to it. Longer descriptions should probably be covered by the bevy of other help displays (docstring, confluence), right?
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.
Seems logical to me
A brief summary of discussions had on slack about
We decided to:
|
…r handling and priority fixes
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.
Added my thoughts from reading the code
I need to give this a spin myself
@@ -1651,3 +1651,56 @@ def raise_window(widget): | |||
window.raise_() | |||
window.activateWindow() | |||
window.setFocus() | |||
|
|||
|
|||
class FrameOnEditFilter(QtCore.QObject): |
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.
What's the breakpoint on moving something like this to a utility module vs vendoring it everywhere it is needed? It's pretty short and might want to be customized a bit so I'm not sure. (I recognize this from atef)
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.
I did have to tweak it a bit actually, though maybe we should be putting things into pcdswidgets
more often?
(sidebar, using the finishedEditing
signal requires the FocusIn/FocusOut events to pass through, which mucks around with some of the formatting)
Co-authored-by: Zachary Lentz <[email protected]>
Co-authored-by: Zachary Lentz <[email protected]>
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.
This passes the feels/vibes test for sure, it felt good to use.
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.
LGTM - notes will be very useful 👍
Description
One proposal for how one might add descriptions to devices.
Searches in the following places for a device notes yaml:
<user_data_path>/device_notes.yaml
PCDS_DEVICE_NOTES
environment variableThe above list is also the priority ranking, where higher priority sources shadow/overwrite lower priority information. (aka if both of the above exist, information from
DEVICE_NOTES
will take precedence). In general more local information will shadow more global informationIf nothing exists, we default to the user_data_path, where we also write new note information
All of this is up for debate and subject to change.
Motivation and Context
https://jira.slac.stanford.edu/browse/ECS-1039 , but also dovetailing off of pcdshub/lucid#124
How Has This Been Tested?
interactively, opening typhos and lucid
Where Has This Been Documented?
this PR.