New Personal Message initial focus should be on user-selector

Continuing the discussion from Warning/notice that you're sending messages just to yourself:

Though warning people that there is no recipient of their message is a good failsafe, I’m continually confused when I start a new PM and the username isn’t completed and then I realize it’s because I’m typing the title. Then after I type the title, I just tab on down to the message body.

I think the UX problem is that the initial focus is on the title, when what I’d expect from a couple decades of writing email is for the user/recipient to be the first thing to enter.

1 Like

That’s because the recipient is usually pre-filled, e.g.

  • I click your avatar
  • I click Message
  • your username is already entered in the to: field
  • the focus is on the topic title

Why in the world would I need the focus on the recipients field at that point? Intent has already been demonstrated by action, e.g. “I clicked on a person” or “I am on someone’s user page that I wish to speak with”

Well then make Recipient the default focus when it’s empty?

This has caught me out before too.

1 Like

In what context is it ever empty? Repro steps?

I see.

The problem happens only when someone starts a message by clicking on the New Message button in the Personal message window.

3 Likes

Sure @eviltrout in this case, can you make a note next week to check and

  • if the recipients field is blank, focus that
  • otherwise, focus the title field
4 Likes

If the recipient field is blank or only yourself focus on it

5 Likes

Most of the logic was already in place. I just added the special case for when the username was blank:

https://github.com/discourse/discourse/commit/01ced67ab39a3055cced66e58c9fcf857f4db920

6 Likes