openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

[Keyboard shortcuts ] Add Ctrl+Enter support to submit comment / confirm text / confirm markdown area #1840

Open rsvoboda opened 6 years ago

rsvoboda commented 6 years ago

Add Ctrl+Enter support to submit comment / confirm text / confirm markdown area

Noticed that when adding comment to Feature, wanted to just hit Ctrl+Enter to submit my comment, but had to use mouse and navigate to confirm tick button.

screenshot from 2018-01-10 13-59-40

Parent Experience

2146 Planning Experience placeholder

qodfathr commented 6 years ago

@catrobson can UXD please make a determination on this? And if this response is "yes, we should do this," so we need a plan to find all places where CTRL+ENTER needs to be consistently handled?

catrobson commented 6 years ago

It should actually just be "Enter" when in the textbox area, and Shift+Enter should create a new line. UXD had created an OSIO keyboard shortcuts document a while back that I don't believe we ever tested against. @ldimaggi, comments?

https://docs.google.com/spreadsheets/d/1KglEj4LHhSXO55ksfUgl3jZv6WihibTGFUQixwOMM5w/edit#gid=0

Some of these may need updating as things have changed since this was created.

aslakknutsen commented 6 years ago

@catrobson You know that's not how normal input work, right? That's not how this comment box work, not how GitHub descriptions work etc etc..

The normal behavior is:

TextArea(MultiLine): When NewLine is part of the normal input, Enter is newline, and ctrl+enter normally does 'Submit' of the form. This is normal for Descriptions / Comments etc.

Input[text](SingleLine): When NewLine is not allowed or useful, Enter works as 'Submit' of the form. This is normal for Titles, Names etc.. Newlines tend to either be removed in UI or the text just scrolls out side of view.

Input[text](Hybrid): When NewLine 'could' be part of the input, but the input is displayed as a single line, Enter works as 'Submit' and Shift+Enter adds a NewLine. This is normal for single line Comment boxes or Chat input, where 1 line is the norm, but multiline is possible. When newlines are added the single input line grows with the newlines to a certain size.

catrobson commented 6 years ago

@aslakknutsen thanks. So let's just say we need to revisit keyboard shortcuts - I didn't check the validity of that document at any point, it was assembled before I was leading. I'll create a UX issue around this.

catrobson commented 6 years ago

UXD Issue created for revisiting keyboard shortcuts: https://github.com/fabric8-ui/fabric8-ux/issues/842

qodfathr commented 6 years ago

PM is good with the proposed UX change. @joshuawilson is Platform Eng good?

joshuawilson commented 6 years ago

I agree with @aslakknutsen view. I'm good with UX taking on the task to record what keyboard shortcuts we want. (their issue only starts it, it doesn't present anything)

serenamarie125 commented 6 years ago

@catrobson I'd suggest that we start with a subset from this list : https://www.ssa.gov/accessibility/keyboard_nav.html

Veethika commented 6 years ago

@rsvoboda @aslakknutsen We have attempted to define many of the keyboard shortcuts here: https://docs.google.com/spreadsheets/d/1cATzs0UyUgeZ_cn32LCTQlVHJLsPcfmw3KUTYQN6n-E/edit#gid=2056972779 Please comment on the spreadsheet if you feel the need to swap or change any shortcut before they set out for implementation in Sprint 158

rsvoboda commented 6 years ago

@ppitonak @psrna you might be interested in Keyboard Controls list, see comment above