Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teammate name display client-side configuration #416

Closed
robbiemcmichael opened this issue Oct 31, 2018 · 4 comments
Closed

Teammate name display client-side configuration #416

robbiemcmichael opened this issue Oct 31, 2018 · 4 comments

Comments

@robbiemcmichael
Copy link

It would be nice to add a client-side setting in Matterhorn for overriding the way teammates' names are displayed. The Mattermost web client supports the following options:

  • Show username
  • Show nickname if one exists, otherwise show first and last name
  • Show first and last name

Currently there is a concept of a display name in Matterhorn, but it has some issues:

  • It only obeys the server-side setting, which most users won't be able to change
  • When nickname_full_name is used on the server-side setting, it actually displays nickname and username instead (which seems an odd combination to me even if it was intentional)
  • There is an issue with opening a DM from the channel list via a display name (see Can't open a new DM if the display name doesn't match the username #415)
@jtdaugherty
Copy link
Member

It only obeys the server-side setting, which most users won't be able to change

As of 9a50f08, matterhorn will now respect the account-specific setting for this if that setting is set to either Username or Nickname/first/last name. Matterhorn will pick up on the change in real time without a restart, so to observe the behavior, run Matterhorn and change the setting in the web browser for the same account and Matterhorn will redraw accordingly.

  • Note that this change does not add support for the "full name" setting yet, since that is part of a larger change that will take more time to make.
  • Also note that this change does not add a Matterhorn-specific client setting because the server already stores account settings set by the browser that we should honor.
  • Finally, note that this change does not add a settings UI to manage such settings, but we eventually want that; it's just too big a change to add right now just to make this behavior better.

When nickname_full_name is used on the server-side setting, it actually displays nickname and username instead (which seems an odd combination to me even if it was intentional)

This is mostly because full names (i.e. with spaces) interact poorly with the completion logic, but I will investigate that. Nicknames suffer from the same problem if they contain spaces. The issue with "display names" has been that you can't just display them: you have to recognize them as input in a variety of settings, and we haven't done that work for full names because whitespace makes that tedious. Anyway, I'll investigate.

@robbiemcmichael
Copy link
Author

I've got a change that implements the three display options in Matterhorn's configuration file. It ended up being a bit more invasive than I was expecting, but it seems to be working. I'm just cleaning up some of the implementation but then I'll push it to GitHub so you can have a look at it and decide whether you want to turn it into a feature branch.

Also note that this change does not add a Matterhorn-specific client setting because the server already stores account settings set by the browser that we should honor.

It might be worth asking whether Matterhorn should use the client settings that are stored server-side. My personal opinion is that Matterhorn has a configuration file and so all settings should be stored there so there is only one place to go to change settings. This would also allow you to have different settings for the web client and Matterhorn (e.g. usernames only in Matterhorn, but nickname/full name in the web client).

@jtdaugherty
Copy link
Member

jtdaugherty commented Oct 31, 2018

It might be worth asking whether Matterhorn should use the client settings that are stored server-side. My personal opinion is that Matterhorn has a configuration file and so all settings should be stored there so there is only one place to go to change settings.

Our aim is to respect options stored server-side in the web client to ensure that Matterhorn's behavior is (to the extent that we aim to have parity) the same as that of the web client. As a result, we only use the configuration file for settings that are not common to both clients or are not storable as server-side preferences.

Since this is already a web-client-configurable, server-side preference, we'll want Matterhorn to honor (and, ultimately, manage) that instead of adding another configuration file option.

@jtdaugherty
Copy link
Member

Since we've gone as far as we can go with this right now, I'm closing this in favor of the newer issue, #420. Thank you for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants