Skip to content

All typing users are displayed above the text box when many people are typing #8722

@daitasu

Description

@daitasu

Description:

I checked the code of packages/rocketchat-ui-message/client/messageBox.js
The usersTyping() methods in this file shows :

let last = users.pop();
if (users.length > 4) {
    last = t('others');
}
let usernames = users.join(', ');
usernames = [usernames, last];
return {
    multi: true,
    selfTyping: MsgTyping.selfTyping.get(),
    users: usernames.join(` ${ t('and') } `)
};

This code means displaying username is typing... when some users is typing above the text box.
It displays username1 is typing when a person is typing and it also displays username1, username2 and username3 are typing when 3 persons is typing.
However, I'm wondering if this code is better in the case that many people is typing because this code use pop() methods only 1 time.
This code maybe indicate that only the name of last person change to others therefore it is caused that displaying like username1, username2, ..., username99 and others are typing when many people like a hundreds are typing.

Server Setup Information:

  • Operating System: CentOS 7
  • Deployment Method(snap/docker/tar/etc): from source
  • Number of Running Instances: 1
  • Node Version: 4

Steps to Reproduce:

  1. some people more than 5 persons open RocketChat and join same room.
  2. all of them in the room type the message in the same time.

Expected behavior:

The word of username1, username2 and others are typing... is displayed.

Actual behavior:

The word of username1, username2, username3, username4 and others are typing... is displayed in the case that 5 persons are typing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions