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

Added Return as shortcut to connect/login buttons. #1939

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

joernu76
Copy link
Member

Fix #1937

@joernu76 joernu76 requested a review from ReimarBauer August 24, 2023 23:59
Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

on the initial msui screen "return" does nothing for me, this is intended?

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 25, 2023

Is there a way to set focus on the buttons? with the tab key this is done and looks like this. The red border around the button. Because this is a common feedback to the user, I would prefer this. The execution happens then with the spacebar.

selected

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

we should use setFocus() of QPushButtons and use the space bar to execute it.
with the border around the button the user sees what is executed by the keyboard.

@joernu76
Copy link
Member Author

On the initial MSUI, I was unsure if "Return" should automatically connect to MSColab. The next two windows can be triggered by Return.
One could add Return also to the MainWindow. for three consecutive Returns to login.

I am not sure who tab/spacing relates to keyboard-shortcuts that we have for several functions/entries. E.g. "retrieve" in wms_control also has Return as keyboard shortcut.

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 25, 2023

I agree not to use space. we can use the focus to signal its function.

We have this focus already on many buttons which react on return.

example_cancel

example_send

@joernu76
Copy link
Member Author

OK, instead of having a keyboard shortcut, you propose to set the focus to a sensible button. I am not sure we have used that somewhere. Most people do not use tab/space when they have a mouse. Having a shortcut is the "typical" power-user feature, I think.

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 25, 2023

it is more both, enable return but "highlight" by setFocus the button which act.

similiar as in picture one. Return/Enter means "cancel", and in the second Return/Enter means "send"

@joernu76
Copy link
Member Author

The highlight typically refers to an act of "space" not "return". Also, typing in data, etc. will change the focus? In particular, one cannt enter text in chat, while the send button is focused...?

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 25, 2023

maybe look also here how return/enter are introduced. Two different keys, but should behave identical.

https://github.com/Open-MSS/MSS/blob/develop/mslib/msui/mscolab_chat.py#L53

@joernu76
Copy link
Member Author

Alternatively, we could focus on the server/login text-input-fields and also connect a "return" in there with a connect/login attempt...?

@ReimarBauer
Copy link
Member

we can do this too,

but here the send example

I always can do A [enter], B [enter] and so on

example

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 25, 2023

I think we should have a clean behaviour. Differences are typicallly difficult to describe.

Give "value" and "enter" is some common task

I am agreeing with any solution which is then refactored on all the others. Just not a different behaviour.

@ReimarBauer
Copy link
Member

ReimarBauer commented Aug 27, 2023

@joernu76 setFocus for login works, for the ConnectBtn also Disconnect can react on return. I don't know which one wins.
Not in all testcases I was able to disable setAutoDefault and setFocus() for "Disconnect" some tests showed always Diconnect focused too. I skipped that.

@joernu76
Copy link
Member Author

Ah, the disconnect button should not be the same as the connect button, for a variety of reasons.
I will modify it such as that we have two buttons, one of which is hidden, context-dependent.
I'll play around with the focus, but I do not understand this as most Windows-users I know are not even aware of keyboard based UI interaction.

@ReimarBauer
Copy link
Member

the button key is your "return", I just want to have the "marking" color ontop of the button as now here.

red_shaded

this is then identical to the other "return" dialogs.

Fix #1937

added a disconnect button

login btn needs autodefault and focus
@ReimarBauer
Copy link
Member

There is one small problem left over

when we are a new user or want to use a different account, then Disconnect is highligthed but shouldn't

disconnect_gets_highlighted

also clicking in the password field, when there is the password added changes the button logic to disconnect.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

We can also work on this little (complicated) problem in a follow up.

@joernu76
Copy link
Member Author

joernu76 commented Sep 7, 2023

We need to talk about this, because a "return"-shortcut is not the same as the focus, which defines what "space" is triggering...?
But I agree that we should settle this in a follow-up MR.

@joernu76 joernu76 merged commit c0e8b8b into develop Sep 7, 2023
@joernu76 joernu76 deleted the i1937 branch September 8, 2023 00:48
@ReimarBauer
Copy link
Member

ReimarBauer commented Sep 8, 2023

Now you can use "space" and you can use "return" on buttons.

I prefer that it is marked what gets done, simlilar to yes/no or the other buttons.

@joernu76
Copy link
Member Author

joernu76 commented Sep 8, 2023

after fixing everything up i have a slight idea about what you mean. The autoDefault is yet a bit beyond me, but setFocus makes sense, but was used a bit too freely in this MR.

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.

Logging into MSColab should require less mouse-clicks
2 participants