Skip to content

[IMPROVE] Typing indicators now use Real Names#11164

Merged
ggazzo merged 5 commits intoRocketChat:developfrom
vynmera:realname-typing
Jul 19, 2018
Merged

[IMPROVE] Typing indicators now use Real Names#11164
ggazzo merged 5 commits intoRocketChat:developfrom
vynmera:realname-typing

Conversation

@vynmera
Copy link
Copy Markdown
Contributor

@vynmera vynmera commented Jun 15, 2018

Part of an attempt to improve #11145

If the admin has "Use Real Name" on, typing indicators now show the real name, making life a lot easier for those who auto-generate usernames or otherwise have usernames that don't correlate with the user.

Before, or with "Use Real Name" off
2018-06-15_21-52-59

After, with "Use Real Name" on
2018-06-15_21-53-15

Enjoy!

@ggazzo ggazzo added this to the 0.67.0 milestone Jun 20, 2018
@ggazzo ggazzo added the area: ui/ux Related to UI/UX, frontend code, accessibility, and user interaction label Jun 20, 2018
}
});
if (user != null && user.username === username) {
if (user != null && (user.username === username || (useRealNames() && (user.name === username)))) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you create a function called userRealNames if you use only one time? Why no put RocketChat.settings.get('UI_Use_Real_Name') directly on this if instead?

};

const shownName = function(user) {
if (useRealNames()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, just use RocketChat.settings.get('UI_Use_Real_Name')

@vynmera
Copy link
Copy Markdown
Contributor Author

vynmera commented Jun 20, 2018

@karlprieb That should do :---)

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11164 June 22, 2018 14:07 Inactive
karlprieb
karlprieb previously approved these changes Jun 25, 2018
Copy link
Copy Markdown
Contributor

@mrsimpson mrsimpson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notifications are broken in some cases - no typing notification is shown then at all

}
const user = Meteor.user();
return RocketChat.Notifications.notifyRoom(room, 'typing', user && user.username, false);
return RocketChat.Notifications.notifyRoom(room, 'typing', shownName(user), false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vynmera this broke the notifications in some cases.
Sometimes, user is missing completely - I believe if nobody is typing.
The earlier user && ... would evaluate to false, not notifying the stream - this was intended. Please restore this before merging

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11164 July 13, 2018 20:03 Inactive
@vynmera
Copy link
Copy Markdown
Contributor Author

vynmera commented Jul 13, 2018

@mrsimpson Should be fixed :)

mrsimpson
mrsimpson previously approved these changes Jul 17, 2018
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11164 July 19, 2018 15:09 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui/ux Related to UI/UX, frontend code, accessibility, and user interaction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants