Skip to content

User Name Configurability

Jonathan Daugherty edited this page Sep 2, 2017 · 1 revision

User Name Configurability

Description: make it possible for users to configure how the client displays users, similarly to the web client, i.e., by nick name, username, etc.

Background

Relevant tickets:

Initial Investigation and Issues

Matterhorn uses "usernames" to represent users everywhere in the UI and in interactions, including:

  • DM channel headers
  • Username highlighting
  • Tab completion
  • Internal user matching for channel lookups (st^.csNames.cnToChanId.at(u^.uiName))
  • The user (channel) list and consequently C-g mode.
  • And probably others.

There are times when we want or need to deal in usernames, such as in tab completion, regardless of the user's display settings, since usernames are still a valid way to refer to users. Right now we don't distinguish between a user's username the user's display name except in DM channel headers (renderChannelHeader).

If we support other "name modes", it means that the user will begin to expect those names to be usable in other settings such as the channel list (C-g mode), tab completion, and mentions in messages.

The user "nickname" feature of Mattermost is optional, which means that if we support showing nicknames, we need a fallback name such as username in cases where nicknames aren't available.

Another issue is user name matching in messages: if the user decides to show nicknames and a nickname contains spaces, our current Markdown username matching algorithm will not work for these nickames because it assumes usernames have no spaces.