# Tab-completion should automatically add a space after a username

**URL:** https://meta.discourse.org/t/tab-completion-should-automatically-add-a-space-after-a-username/45155
**Category:** UX
**Tags:** pr-welcome
**Created:** [2 juni 2016 om 19:01 UTC](https://meta.discourse.org/t/tab-completion-should-automatically-add-a-space-after-a-username/45155 "2016-06-02T19:01:41Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jancborchardt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jancborchardt/32/57442_2.png) [@jancborchardt](https://meta.discourse.org/u/jancborchardt)
#### Post date: [30 april 2017 om 14:38 UTC](https://meta.discourse.org/t/tab-completion-should-automatically-add-a-space-after-a-username/45155/8 "2017-04-30T14:38:58Z")

</div>

I decided to spend my Sunday doing some more comprehensive research on how @mentions are handled on different other platforms. 🎉

## What do other platforms do?

There are two main ways of doing it, as mentioned before:

- Appending a space after the name.
- Not appending a space after the name.

(I took the liberty to link the names of platforms which are open source / free software to promote them a bit. 🙂 )

### Platforms which append a space

- **Twitter** appends " " (a space). Suggests names only with @. Uses handles.
- **WhatsApp** appends " " (a space). Suggests names only with @. Shows display names instead of handles, but does _not_ allow modification.
- **Instagram** appends " " (a space). Suggests names only with @. Uses handles.
- **Github** appends " " (a space). Suggests names only with @. Uses handles.
- **[GitLab](https://about.gitlab.com/)** appends " " (a space). Suggests names only with @. Uses handles.
- **Trello** appends " " (a space). Suggests names only with @. Uses handles.
- **Disqus** appends " " (a space). Suggests names only with @. Shows display names instead of handles, but does _not_ allow modification.
- **[Ghost](https://ghost.org/)** seems to mostly use/encourage Disqus for commenting, although **[Discourse](http://www.discourse.org/)** is possible.
- **[Mastodon](https://mastodon.social/)** appends " " (a space). Suggests names only with @.
- **[Taiga](https://taiga.io/)** appends " " (a space). Suggests names only with @.
- **Slack** appends " " (a space). Suggests names both with and without @, but only mentions them when an @ was used.
- **Asana** appends " " (a space). Suggests names only with @, but cuts the @ automatically. Shows display names instead of handles, but does _not_ allow modification.
- **[Riot](https://riot.im/)** appends ": " (a colon and a space). Suggests names both with and without @, but cuts the @ automatically. Shows display names instead of handles, but does _not_ allow modification.
- **[Nextcloud](https://nextcloud.com)** still needs to implement the auto-complete part and the current spec is to [add a space automatically](https://github.com/nextcloud/server/issues/2443).

### Platforms which append nothing

- **Facebook** appends nothing. Suggests names both with and without @, but cuts the @ automatically. Shows display names instead of handles, and allows modification of those while keeping the mention intact (like cutting the last name).
- **Facebook Messenger** appends nothing. Suggests names both with and without @, but prepends the @ automatically. Shows display names instead of handles, and allows modification of those while keeping the mention intact (like cutting the last name).
- **Medium** appends nothing. Suggests names only with @, but cuts the @ automatically. Shows display names instead of handles, and allows modification of those while keeping the mention intact (like cutting the last name).
- **LinkedIn** appends nothing. Suggests names only with @. Shows display names instead of handles, not sure if it allows modification (didn’t want to send an actual message cause I was testing on someone elses account).
- **Google Plus** appends nothing. Suggests names with + or @, but replaces @ with a + automatically. Shows display names instead of handles, but does _not_ allow modification.
- **[Diaspora](https://joindiaspora.com/)** appends nothing. Suggests names only with @, but cuts the @ automatically. Shows display names instead of handles, but does _not_ allow modification.

### Other ways of doing it

- **Skype** , **YouTube** , **[Reddit](https://www.reddit.com/)**, **[Wikipedia](https://www.wikipedia.org/)**, **Pinterest** , **Snapchat** , **Meetup** , **[Signal](https://signal.org/)** (to just include some other popular services) don’t do @mentioning or have their own mechanism for doing it which doesn’t use autocompletion (like Reddit’s /u/username).
- **[Discourse](http://www.discourse.org/) suggests names only with @. Shows handles. Funnily enough it appends a space but puts the cursor before the space instead of after:**  
Cursor position before @mention:  
 ![](https://global.discourse-cdn.com/meta/original/3X/b/8/b82d06aaa1c8cd30366af9aefbc749234fa488aa.png)  
Cursor position after @mention, note the extra space behind the name/cursor:  
 ![](https://global.discourse-cdn.com/meta/original/3X/c/7/c7f1cdab6d4d6b47118d8c2dab7c2c97a4553713.png)

## Conclusion

The two main ways of doing it have some different/opposing defining characteristics:

1. Appending " " (a space). In that case the common other characteristics are:

- **Mostly a user handle is shown, sometimes a full/display name.** This depends on which kind of name is prominently visible in other parts of the interface as otherwise it would be confusing.
- You need to use a @ to get suggestions.
- The @ is kept in front of the name.
- **You can not modify** the handle or display name or it will break the mention.

1. Appending nothing. In that case the common other characteristics are:

- **The full/display name is shown, not a user handle.**
- Names are suggested both with and without @.
- The @ is _cut_ from the front of the handle.
- **You can modify** the name while keeping the mention intact, which is useful for cutting the last name if you want to be less formal.

* * *

**In the case of Discourse, _all_ defining characteristics of case 1 (appending a space) are fulfilled. Hence I would recommend to add the space, or rather also put the cursor behind the space. Or if you want to go for appending nothing, drive forward full/display names.**

(Not appending a space based on anecdotal evidence that people like to add colons or apostrophes seems to be an edge-case. If you’re so inclined, you could run a metric across the Discourse Meta forum posts: What is the most common character after a user mention: 1) A space 2) A colon : 3) An apostrophe ’/’ 4) A sentence ending mark ./!/? 5) A slash / 6) A dash -/– 7) Something else?)

What do you think @erlend_sh @codinghorror?

---

_[View the full topic](https://meta.discourse.org/t/tab-completion-should-automatically-add-a-space-after-a-username/45155)._
