Loopcast / beta

1 stars 0 forks source link

User info box in room #180

Closed thomas1602 closed 9 years ago

thomas1602 commented 9 years ago

@stefanoortisi @hems

This user info box should also show when you hover users in the chat.

screen shot 2015-05-13 at 15 56 06

I also think it makes sense to show it when you hover the artist name as well right?

screen shot 2015-05-13 at 15 57 26

stefanoortisi commented 9 years ago

@thomas1602 ok, done it!

@hems, to display the current data on the popup of the chat I would need to get some extra informations on 'message' callback from the pusher channel.

I'm currently getting this informations https://github.com/Loopcast/beta/blob/development/src/routes/api/v1/chat/message.coffee#L48-L53

I would need also:

For the popup of the name of the author in the cover, I would also need to get the "followers" information on the jade. (At the moment I'm printing a static value inside an input hidden)

https://github.com/Loopcast/beta/blob/development/src/frontend/templates/profile/room.jade#L7

hems commented 9 years ago

okie..

i still have to sort a proper list of users in the room. at the moment we are using pusher for messages, but would also need some backend to detect user in/out of the room and keep a list of them.

hems commented 9 years ago

@stefanoortisi at the moment we can grab user info from /api/v1/user/{id}/info !

This way we can get amount of followers, updated avatar, etcs

stefanoortisi commented 9 years ago

I think it would be way better to get these informations already on the message api response. Especially because of https://github.com/Loopcast/beta/issues/223, we would have 25 additional ajax calls to get the information of the users. What do you think?

hems commented 9 years ago

@stefanoortisi i think extra user info should be fetched just on rollover?

at least for now while we don't have a proper chat api ( this is just a temporary solution with pusher, to get messages going back and forth )

hems commented 9 years ago

@stefanoortisi with the new /chat/people method you should get user._id, followers( user.like ) and whatever else you need, when the room starts!

i have implemented the basics on the client side, let me know if something doesn't work!

hems commented 9 years ago

@stefanoortisi not sure if you saw that!

stefanoortisi commented 9 years ago

Yeah, and it was already working!

hems commented 9 years ago

okie!

anyway for users in the room information i think is better to fetch on rollover, because otherwise when we get a lot of users in the same room it will become very slow and very costy for the server.

facebook for instance fetch most rollover informations only when you rollover something. if you enter facebook and turn off your wifi and start rolling o er things you will notice that.

anyway it's fine for now, we can improve scalability later

stefanoortisi commented 9 years ago

:+1: