54

Status: 75% - We have a prototype to play with the UI

Previous RFC: RFC: Better chat @mentions

Problem Statement & Background

Please see the previous RFC.

Proposed solution

The feedback to the solution I proposed in the original RFC was overwhelmingly positive. We now have a prototype of the chat input box's behavior under the new regime. It incorporates some of the suggestions made in response to the original post.

This is just that: a prototype. I'm not looking for bug reports on every minor issue; rather, I'd like to know whether it feels comfortable and non-awkward for you to compose chat messages in this way, and if it in any way breaks your flow and muscle memory when chatting.

For now this is intended to work in desktop Chrome and Firefox, it may or may not work completely in other browsers. Again, finding cross-browser bugs is not the purpose of this RFC. Of course the final version is supposed to work in all our supported browsers, including mobile ones.

Link to the prototype: http://chat.meta.stackexchange.com/prototypes/mention

Known issues

  • Undo/redo is spotty at best. Not that it's great in the current chat input box, but I'd like it to be better before release.
  • The way that @mentions are displayed seems to suggest that you can interact with them (e.g. click on them to display the well-known user info popup), but that's not currently the case. See the next section for more.

Open questions

  • Can you work with this? Does it break the way that you're used to chatting? If so, how so?
  • If you use assistive technology (e.g. screen readers), does it work for you? I know our chat is anything but the archetype of an accessible web application, but I certainly don't want to make matters worse.
  • What should happen when you click a mention? Would you rather see the current behavior, which is closer to what you would expect from a normal text input box, or would you rather see the user info popup (or something else entirely)?
  • Relatedly: At the moment, the underlying @[123] is exposed when you move the text cursor onto a mention. On the one hand, this keeps the behavior closest to that of a "real" text box (in particular, Ctrl-A Ctrl-C Ctrl-V works in obvious way). On the other hand, this may be too much of a power user-only thing to expose (I am not suggesting to break copy&paste in either case). What are your thoughts on this?
  • Anything else?

If possible, when describing any behavior that felt irritating, also describe what you would've expected to happen instead.

  • 19
    On behalf of the International Society Of All The Tims (ISOATT) - we approve this message. – Tim Post Oct 23 '15 at 13:48
  • When I input an @ for a user that is not in the room (ie. @Marcs - extra 's'), it strikes it out. I assume this is expected and like that it makes it clear the mention won't go anywhere. Will it appear in the transcript with the strikeout though? – Andy Oct 23 '15 at 14:08
  • @Andy Probably not, but I haven't spent a lot of thought yet on how this will be displayed in the rendered message. – balpha Oct 23 '15 at 14:10
  • 1
    Love it. Much improved. Maybe I can finally stop being "Haney" in chat because David Fullerton stole my name. Who does that guy think he is, anyway? – Haney Oct 23 '15 at 18:02
  • Looks like periods don't result in an autocomplete, while other likely punctuation (comma, question mark, exclamation point) will. Intentional? – Shog9 Oct 24 '15 at 1:13
  • @Shog9 No, it's going to be smarter eventually. That just needs some extra logic (the problem with periods is that they are legal characters in user names). – balpha Oct 24 '15 at 6:51
  • @Shog9 Fixed, should behave as expected now. – balpha Oct 24 '15 at 9:21
  • Thanks @balpha! This does introduce another problem though; maybe don't autocomplete if the @ is preceded by an illegal character? – Shog9 Oct 24 '15 at 16:06
  • @Shog9 Yeah, I'll have to clearly define at what points this will work and where not. – balpha Oct 24 '15 at 16:30
  • FYI, It works in IE11 as well – rene Oct 24 '15 at 16:39
  • The mouse down handler seems to inject the current user which get replaced by the one you clicked on after mouse up. (so type @marc, mouse down on the last marc, MarcGravell gets added, on mouse up the correct Marc is shown) – rene Oct 24 '15 at 16:46
  • @rene Yeah, those a the kinds of small issues that I'm not worried about for a prototype. Re IE11, it mostly works, the only thing I know that doesn't is backwards selection (type a few characters, and the Shift+LeftArrow a couple of times). – balpha Oct 24 '15 at 17:56
  • 2
    @chmod711telkitty Yes, it's intentional, and not new: meta.stackexchange.com/questions/185317/… – balpha Oct 25 '15 at 8:05
  • 2
    The only thing I don't like is I can no longer ping someone without it transforming into their entire username. Sometimes it's nice to be a little less 'formal'. – ɥʇǝS Oct 29 '15 at 20:16
  • 1
    @balpha so can this please be tagged status-declined so that people won't get false hopes? – Shadow The Princess Wizard Sep 20 '17 at 12:10
24

Treat the element as a single unit when deleting and copying it.

If you type @Mar and then press tab to auto complete then immediately press the delete button (or backspace on windows) it should delete the entire UI element and not just the ] at the end of the text version. The same should go for copying; when it's highlighted I don't really want to see the text version either.

  • 3
    Unless you entered it as the [number] in which case you should be able to edit it. – Tim Oct 29 '15 at 20:57
9

Can you work with this? Does it break the way that you're used to chatting? If so, how so?

Oh, yes. It works very nicely. I don't like it flashing all text the entire time if you click anywhere near a user name, but I can live with that for now.

What should happen when you click a mention?

I would like to see single elements you can delete at once. Also, if possible, keep it the same size as the actual user name. That will prevent the flashing text.

would you rather see the user info popup (or something else entirely)?

That is a nice-to-have, but actually I seldom use it. Users I want to address are somewhere close in the chat log; I can always see their profile there.

Breaking copy/pasting is a bad idea, but the current repetitive clicks on backspace are just as annoying.


A minor bug now: when selecting all text, you can't unfocus it with your mouse. After a few clicks it works.

8

Something small but cool, aka nice to have, would be a tooltip suggesting a closest match when trying to ping a non-existent user, e.g.:

Doesn't have to be complicated algorithm, just a simple characters match. I'm used to Chrome auto correct suggestions when typing (hey, got one even now, typed "existant" by mistake) and having such suggestion(s) would be awesome.

4

Bugs:

  • When you press CTRL+A, you can no longer click anywhere on the textarea with the mouse. Or at least it looks like I can't. Can't deselect the text with mouse either.
  • The text is quite jumpy if you mouseclick on/off a username. Can be difficult to select a certain piece of text this way.

Relatedly: At the moment, the underlying @[123] is exposed when you move the text cursor onto a mention. What are your thoughts on this?

I personally do not see much use of replacing the username with their userID on selection. It seems more like a bother to me than a feature. If I need to know someone's userID, I can click their profile. Alternately, the userID could be shown above the username on hover perhaps.

0

Bugs:

  • If you cursor is near the mention, it shows as plain text.
  • When I insert a mention at the beginning then click space the space is pressed on the beginning instead of the end.
  • The cursor is too big at the beginning in iOS

I liked the autocomplete where you press space on regular mention it automatically becomes converted to the nearest possible mention.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .