4 ms·
You can skip the "typing ended". You're gonna need a shortish timeout anyway, may as well just let the "typing is happening" messages all terminate by timeout.
by yamtaddle 3y ago
You can skip the "typing ended". You're gonna need a shortish timeout anyway, may as well just let the "typing is happening" messages all terminate by timeout.
- marcellus23 3y agoThat really depends on the UX you want.
- yamtaddle 3y agoWhat do you have in mind? I can't think of a case where you'd want "X is typing" to persist more than a second or maybe two past the last-received message that affirmed X is, in fact, still typing. I can think of cases in which a short timeout might break down in bad ways (making the notice really jittery on high-latency connections, say) but I think those are probably just situations in which any "... is typing" message is simply gonna be bad in one way or another.
- Kiro 3y agoYou don't want to clear it after only a second. It should persist much longer since people pause and think between words. It's common that someone starts typing but immediately change their mind and clears the input after only a couple of characters. So if the timeout is longer you need an "ended" event.
- bongobingo1 3y ago(the "ended" event is the message being sent.)
- yencabulator 3y agoExcept for the scenario the parent is talking about: > It's common that someone starts typing but immediately change their mind and clears the input after only a couple of characters.