bkad / prat

group chat with markdown served over websockets
11 stars 6 forks source link

Show a spinner while the messages are loading. #67

Closed cespare closed 11 years ago

mdietz commented 11 years ago

One minor nit. The scroll to bottom animation is still finishing up when the spinner disappears. It makes more sense to not animate this scroll to bottom so that when the spinner disappears the chat message's aren't scrolling.

cespare commented 11 years ago

That's quite odd. The call that does the scroll to bottom when the messages initially load has animate: false (and did not change from my commits). I don't really see what you're talking about when I load the page.

cespare commented 11 years ago

I pushed a change that could theoretically help with your issue.

mdietz commented 11 years ago

@cespare Your commit fixed the issue I was seeing.

bkad commented 11 years ago

I'm not convinced we need this for the initial message load. The websocket is open at this point, ready to receive user input, and queueing incoming messages to replay when the user statuses and initial messages are done loading.

cespare commented 11 years ago

I think it's good -- there's a fairly long delay (almost a second, even locally) after the outer page has loaded but the messages are still loading, where we don't want the user to try to interact and it might not be clear that anything's happening.

But anyway, I implemented this to fix #33, which you created.

cespare commented 11 years ago

Also, we may want to activate this spinner when we get disconnected, or at least when you run the 'get me the messages I missed' code. Again, it's good to convey that's something's happening, and prevent the user from trying to interact.