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

show offline users #337

Closed
haosdent opened this issue Jul 24, 2015 · 19 comments
Closed

show offline users #337

haosdent opened this issue Jul 24, 2015 · 19 comments
Labels
Feature: Request Requested Feature ui/ux

Comments

@haosdent
Copy link
Contributor

I suggest change the code from

        if status in ['online', 'away', 'busy']
            return {username: username, status: status}
        return

to

        if status not in ['online', 'away', 'busy']
            status = 'offline'
        return {
            username: username
            status: status
        }

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@sampaiodiego
Copy link
Member

@haosdent doing this on demo server could break clients =P there is so much users to show that it is not a good idea.

we'll optimize the members list soon ;)

@haosdent
Copy link
Contributor Author

LoL. Does the config part is OK now? If it's OK, could config this through settings. I could add it.

@sampaiodiego
Copy link
Member

yes, it's working. you could try to do it. =)

only for you to know, will be there a button to toggle offline users' visibility.. later your settings may control if this button will displayed or not, something like "always show offline users: yes or not"

@haosdent
Copy link
Contributor Author

Thanks, let me do it.

@sampaiodiego
Copy link
Member

thank you 😃

@haosdent
Copy link
Contributor Author

np

@bbrockman
Copy link

I wish I saw this before I implemented this in our fork ( sscpac/pull/42 ). I also updated the user names to be styled corresponding to their status.

@rodrigok
Copy link
Member

@bbrockman Have you tested with 10.000 users in a single room?

@bbrockman
Copy link

@rodrigok We have not, but luckily for us, our customer base is much smaller 😃

@rodrigok
Copy link
Member

Ok, but this PR will break our online demo 😄

We need a config view for rooms, so this can be optional per room, but, until there, can you add one IF to render offline users only if room has less then 200 users?

@bbrockman
Copy link

We have quite different use cases!

@engelgabriel
Copy link
Member

Hi @bbrockman they may be a bit different, but we surely can add some "IFs" just to accommodate this differences? It should be very straight forward to test the size of the room and decide the best behavior, do you agree?

@bbrockman
Copy link

Certainly.

@engelgabriel
Copy link
Member

@bbrockman GREAT! 👍

We are looking forward for you pull request!

@rodrigok rodrigok modified the milestone: Next Aug 15, 2015
@geekgonecrazy
Copy link
Contributor

Maybe to keep from breaking the server. Show the total amount of users like you already do. But only show in the list x amount. Like online users, plus 10 of the offline. With a button to load more. This way you limit it to small chunks.

Of course search would search through all offline / online users.

@rodrigok
Copy link
Member

@geekgonecrazy, maybe, we have 2 issues:

  • Render: render 10k nodes can break the app or do a high CPU / Memory spike (can be solved with pagination as you said)
  • Collection: Load 10k records in a collection at client side is bad, again, high CPU and Memory, so we need to keep user data in an array.

Today we have an array with all usernames of users with subscriptions to the room, this array is at the client side so we can render the array size (users count) and loop to verify and show online users (online users are loaded in the user's collection).

If we use the array to populate the mention list we will don't have the user's name, only the username, or we can create another array getting all user's names from db. In this case we will have only the users in the room.

The best solution IMHO is use remote search for mentions and, about the user list, we can do the pagination.

@geekgonecrazy
Copy link
Contributor

That seems like the best solution to me. Sounds like maintaining a list of users client side causes complications. Also maybe not guaranteed up to date?

Maybe caching to an extent client side for speed? But hit the server for authoritative response + additional mentions?

@rodrigok
Copy link
Member

I think we can start with the remote search and monitor the performance impact to decide if we need to create some kind of client cache.

@engelgabriel
Copy link
Member

Done

@engelgabriel engelgabriel removed this from the Important milestone Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Request Requested Feature ui/ux
Projects
None yet
Development

No branches or pull requests

7 participants