sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

sage-chat scrolls to bottom on return from smc tab #557

Closed DrXyzzy closed 8 years ago

DrXyzzy commented 8 years ago

Seen in firefox browser:

williamstein commented 8 years ago

The solution is likely to store the scroll location in the redux store.

haraldschilly commented 8 years ago

I think, what should really be stored is a timestamp for the user -- maybe even in local storage. i.e. as long as the chat is actively displayed, a new message pushes that timestamp forward. if you are away or in another tab, that timestamp isn't pushed. next time you come back. the top message is the first one >= your timestamp AND after scrolling down (in a sense signalling, that you are catching up) the most recent message sets your timestamp.

williamstein commented 8 years ago

Yes - good idea. However if user is at the bottom (seeing latest chat), switches away, then back then they definitely should still see latest chats. Only when they manually scroll up should the more switch to sticking there.

On Tuesday, May 17, 2016, Harald Schilly notifications@github.com wrote:

I think, what should really be stored is a timestamp for the user -- maybe even in local storage. i.e. as long as the chat is actively displayed, a new message pushes that timestamp forward. if you are away or in another tab, that timestamp isn't pushed. next time you come back. the top message is the first one >= your timestamp AND after scrolling down (in a sense signalling, that you are catching up) the most recent message sets your timestamp.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/sagemathinc/smc/issues/557#issuecomment-219753132

Sent from my massive iPhone 6 plus.