WordPress.org

Making WordPress.org

Opened 2 years ago

Last modified 10 months ago

#2920 new enhancement

Keyboard Shortcut to reply

Reported by: hardeepasrani Owned by:
Milestone: Priority: normal
Component: Support Forums Keywords: dev-feedback 2nd-opinion ux-feedback
Cc:

Description

It'll be great to have a quick shortcode to jump straight to the textarea to reply, when you've read the entire convo or when the message is small so you just wanna move to replying without touching your mouse.

var bbPressReply = document.getElementById( 'bbp_reply_content' );

jQuery( document ).on( 'keydown', function ( e ) {
	if ( e.keyCode === 82 ) {
		if ( document.activeElement.nodeName !== 'INPUT' ) { 
			bbPressReply.focus();     
		}
	}
});

I wrote the above JavaScript, not sure if it's the best practice, but seems like a good start. Wanted to submit a patch but can't find any JS files where I could add it in the Fourm's meta.

Quick preview: When you press the key r it takes you straight to the textarea.

Any thoughts?

Change History (5)

This ticket was mentioned in Slack in #forums by hardeepasrani. View the logs.


2 years ago

#2 @hardeepasrani
2 years ago

  • Summary changed from Shortcut to reply to Keyboard Shortcut to reply

#3 @hardeepasrani
2 years ago

  • Keywords dev-feedback 2nd-opinion ux-feedback added

This ticket was mentioned in Slack in #design by boemedia. View the logs.


10 months ago

#5 @mindmantra
10 months ago

  • Type changed from defect to enhancement

We discussed this ticket in yesterday's design ticket triage. As in its current state there is no UI for which a feedback can be given.

Though following are some UX concerns.

How user would be made aware of such shortcut is also needs to be considered. May be a message can be added somewhere to highlight the new shortcut?

Another concern would be about accidental key-press by an uninformed user. It may actually degrade UX. We can do an opt-in when said key is pressed first time. May be show a toast message like "Press 'r' again to enable it as shortcut for quick reply."

Note: See TracTickets for help on using tickets.