Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Track the user's own typing state external to the composer #3150

Merged
merged 7 commits into from
Jul 3, 2019

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#9986

There's a few reasons for pushing this out to its own place:

Note: This makes use of the principles introduced in element-hq/element-web#8923 and element-hq/element-web#9090

Fixes element-hq/element-web#9986

There's a few reasons for pushing this out to its own place:
* In future, we might want to move WhoIsTyping here.
* We have multiple composers now, and although they don't send typing notifications, they could (see https://github.com/vector-im/riot-web/issues/10188)
* In future we may have status for where/what the user is typing (https://github.com/matrix-org/matrix-doc/issues/437)
* The composer is complicated enough - it doesn't need to dedupe typing states too.

Note: This makes use of the principles introduced in element-hq/element-web#8923 and element-hq/element-web#9090
@turt2live turt2live requested a review from a team June 27, 2019 04:40
@bwindels bwindels requested review from bwindels and removed request for a team June 27, 2019 07:58
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! Would be nice to also move the typing timeout logic from the composer here and have a method you can hammer without needing to think about it from the composer, but this is a great start :

src/components/views/rooms/MessageComposerInput.js Outdated Show resolved Hide resolved
src/stores/TypingStore.js Outdated Show resolved Hide resolved
src/stores/TypingStore.js Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from bwindels June 27, 2019 16:37
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Looks nicer indeed with the Timer, just need to not await the promise (potentially) multiple times.

src/stores/TypingStore.js Outdated Show resolved Hide resolved
src/stores/TypingStore.js Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from bwindels June 28, 2019 18:29
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lost track of this, sorry! lgtm (although no reason to duplicate the restart call, so assuming that's a stylistic choice 👍 :)

@turt2live
Copy link
Member Author

It's stylistic in that I never want to forget that it was called, even if it gets accidentally refactored out

@turt2live turt2live merged commit 7dbd17c into develop Jul 3, 2019
@turt2live turt2live deleted the travis/less-typing branch July 3, 2019 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

riot sends 3 typing notification changes when switching rooms
2 participants