Bug 27042 - Improve typing notifications
Summary: Improve typing notifications
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: butterfly (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/jo...
Whiteboard:
Keywords: patch
Depends on: 27014
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-12 03:10 UTC by Jonny Lamb
Modified: 2010-03-12 15:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jonny Lamb 2010-03-12 03:10:51 UTC
I was thinking about typing notifications in butterfly. It seems there's no way to cancel a previous typing notification. At the moment, I find it unnaturally annoying if a contact starts typing, but then stops, as Empathy displays the contact as consistently typing. I found[0] the following information:

    The official client sends a typing notification every five seconds if
    the user has been typing.

    If the official client receives a typing notification, it will indicate
    that a principal is typing a message. It will remove this indicator
    after receiving a message from the principal or after ten seconds with
    no new typing notification.

We should perhaps do this in butterfly too, non?

0. http://www.hypothetic.org/docs/msn/client/messages.php
Comment 1 Jonny Lamb 2010-03-12 05:11:50 UTC
Okay, I implemented this, and it seems to work nicely butterfly <-> butterfly. I am unable to test it butterfly <-> Live Messenger, but I don't see how anything would be broken, really.

I based it on top of my conference butterfly branch as I didn't want merge hell later, so this can obviously only be merged once the said other branch is merged.

I've made this bug depend on the conference one.
Comment 2 Olivier Le Thanh Duong 2010-03-12 11:23:58 UTC
(In reply to comment #1)
> Okay, I implemented this, and it seems to work nicely butterfly <-> butterfly.
> I am unable to test it butterfly <-> Live Messenger, but I don't see how
> anything would be broken, really.
> 
> I based it on top of my conference butterfly branch as I didn't want merge hell
> later, so this can obviously only be merged once the said other branch is
> merged.
> 
> I've made this bug depend on the conference one.
> 

I don't think it's actually useful that we have a timeout for resending our own typing notification since Empathy itself with change to CHAT_STATE_PAUSED when the user stop typing after a few seconds then will re-change to CHAT_STATE_COMPOSING when the user start typing again. So the only thing we are doing in maskin the PAUSED state (or the corner case where a user is typing non stop for more that 5 seconds)

in    def steal_conversation(self):
+        self._remove_typing_timeouts()
if we received a typing notification from the contact right before stealing the contact he will constantly be shown as typing


+            self._typing_notifications[handle] = 0
Why not just delete it from the dictionary instead of setting it as 0?
Comment 3 Jonny Lamb 2010-03-12 14:27:51 UTC
(In reply to comment #2)
> I don't think it's actually useful that we have a timeout for resending our own
> typing notification since Empathy itself with change to CHAT_STATE_PAUSED when
> the user stop typing after a few seconds then will re-change to
> CHAT_STATE_COMPOSING when the user start typing again. So the only thing we are
> doing in maskin the PAUSED state (or the corner case where a user is typing non
> stop for more that 5 seconds)

Did you read the page I linked to? Doing so would explain why I'm doing what I'm doing, or have I missed something?

Contacts' clients think you're typing if you keep sending typing notifications every (less than) ten seconds (allegedly in the case of the official client). If you start typing in Empathy but then go to lunch so the GtkEntry has some text still in it, I'd say (and, at least XMPP would too) that's still typing and we should keep sending typing notifications.

> in    def steal_conversation(self):
> +        self._remove_typing_timeouts()
> if we received a typing notification from the contact right before stealing the
> contact he will constantly be shown as typing

Fixed.

> 
> +            self._typing_notifications[handle] = 0
> Why not just delete it from the dictionary instead of setting it as 0?

Well, whatever, okay, fixed.

I updated my branch and rebased on top of my ever-changing conference branch.
Comment 4 Olivier Le Thanh Duong 2010-03-12 14:42:37 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I don't think it's actually useful that we have a timeout for resending our own
> > typing notification since Empathy itself with change to CHAT_STATE_PAUSED when
> > the user stop typing after a few seconds then will re-change to
> > CHAT_STATE_COMPOSING when the user start typing again. So the only thing we are
> > doing in maskin the PAUSED state (or the corner case where a user is typing non
> > stop for more that 5 seconds)
> 
> Did you read the page I linked to? Doing so would explain why I'm doing what
> I'm doing, or have I missed something?
> 
> Contacts' clients think you're typing if you keep sending typing notifications
> every (less than) ten seconds (allegedly in the case of the official client).
> If you start typing in Empathy but then go to lunch so the GtkEntry has some
> text still in it, I'd say (and, at least XMPP would too) that's still typing
> and we should keep sending typing notifications.
I read it and I tested with the official client, it send typing notification every 5 second when you type but then no longer send typing notification after you have stopped typing (which don't contradict in anyway what the page have been saying). XMPP has a <paused/> state which MSN don't have.
> 
> > in    def steal_conversation(self):
> > +        self._remove_typing_timeouts()
> > if we received a typing notification from the contact right before stealing the
> > contact he will constantly abe shown as typing
> 
> Fixed.
> 
> > 
> > +            self._typing_notifications[handle] = 0
> > Why not just delete it from the dictionary instead of setting it as 0?
> 
> Well, whatever, okay, fixed.
> 
> I updated my branch and rebased on top of my ever-changing conference branch.
> 

Comment 5 Jonny Lamb 2010-03-12 15:08:35 UTC
Merged, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.