Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typing notification alert #411

Open
bmarty opened this issue Jan 10, 2019 · 3 comments
Open

Improve typing notification alert #411

bmarty opened this issue Jan 10, 2019 · 3 comments
Labels
A-Client-Server Issues affecting the CS API enhancement A suggestion for a relatively simple improvement to the protocol

Comments

@bmarty
Copy link

bmarty commented Jan 10, 2019

When a user sends a message, client executes a first HTTP request to inform server of the stop typing event(@put("rooms/{roomId}/typing/{userId}")), and then send the message.

Other clients see the typing notification disappear (threw /sync) and after a while, the message is received (threw another /sync).

Other clients cannot know if the typing notification disappears because of the remote user stops typing or cancel the typing, or because of the fact that a message has been sent.

This is not comfortable regarding UX.

It could be more synchronous so clients may update UI smoothly by making the typing notification disappears along with the new message appears.

Possible solutions:

  • Add a timer when stop typing event is received to cancel its display when the message from this user arrives (no API change needed then)
  • Change API @put("rooms/{roomId}/typing/{userId}") to add a boolean set to true if user stop typing due to message being sent, and false for other cases. Client could then wait for message to come.

Points to keep in mind:

  • User can send message and right after start typing a new message. Client should not dismiss typing notification when the first message is displayed
  • There is no strict ordering between events & typing notifs; they can be misordered, delayed, typing notifs can go missing entirely. for a robust solution you'd almost certainly have to tie an ID on the notif to an ID on the event which resulted from it.
@ara4n
Copy link
Member

ara4n commented Jan 10, 2019

another point to keep in mind: there is no strict ordering between events & typing notifs; they can be misordered, delayed, typing notifs can go missing entirely. for a robust solution you'd almost certainly have to tie an ID on the notif to an ID on the event which resulted from it.

@bmarty
Copy link
Author

bmarty commented Jan 10, 2019

description updated

@turt2live turt2live added the enhancement A suggestion for a relatively simple improvement to the protocol label Jan 10, 2019
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Feb 6, 2019
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@prncdev

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API enhancement A suggestion for a relatively simple improvement to the protocol
Projects
None yet
Development

No branches or pull requests

4 participants