Skip to content

Conversation

@lcaouen
Copy link
Contributor

@lcaouen lcaouen commented Nov 28, 2025

In the alarm configuration "Enter" key must be pressed to validate the text in the guidance, displays, commands and actions tables.
This way to validate could be annoying because if we forget to press the "Enter" key, all the text typed is lost.

This PR add another way to validation when the focus is lost.

It has been tested manually as it's a GUI change by @achoqt and @lcaouen

Issue related : #3656

@georgweiss
Copy link
Collaborator

georgweiss commented Nov 28, 2025

Nice improvement, but I can see some regression issues in the UI. The Title column in the Guidance section is not rendered correctly.

PR:
Screenshot 2025-11-28 at 19 03 17

Master:
Screenshot 2025-11-28 at 19 04 22

@shroffk shroffk requested a review from kasemir December 1, 2025 14:54
@shroffk
Copy link
Member

shroffk commented Dec 1, 2025

I think the use of "Enter" is a pattern across Phoebus where any text input for the user is applied after and explicit "Enter"
This makes a lot of sense when you think about it from a control system point of view... you have started typing out a value to write to the PV and you accidentally or inadvertently click the mouse causing a change in focus... you do not want the incorrect/incomplete value to be written to the control system.

Coming to this PR.
I guess there is merit in not applying this rigid text input/editing rule to places like the alarm configuration, log entry dialog, save and restore desc/comment, etc...even if it means inconsistent text input behaviors across apps ( and at times within the same app )

@kasemir what are your thoughts?

@kasemir
Copy link
Collaborator

kasemir commented Dec 1, 2025

We do want confirmation (via ENTER) in text entry fields and similar at runtime. In there, when you leave the text field (move out of focus), staying at the previous PV value is the safe thing to do. In comparison, running a motor to a half-typed position because somebody accidentally moved the mouse might shear somebody's arm off.

In the editor, we already accept text when leaving the field for PV names or a Label text. So I'm OK with generally accepting text in the editor. Amazon accepts my credit card number when I leave the text field, so that's industry standard. Still, for the display runtime, we need confirmation.

@lcaouen
Copy link
Contributor Author

lcaouen commented Dec 1, 2025

In this case when you press the enter key, the new configuration is not sent to kafka until you press the OK button of the dialog box. In my opinion, there is no risk to validate when you click somewhere else. as the ok button is the true validation.

However, a lot of users at CEA are "Windows" users and do not use so much the keyboard but the mouse. If you type a long text in the edit and then you forget (or don't know you have to) to validate with the Enter key, then you loose all your text which can be a bit annoying, particularly if you also forget the second time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants