-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Typing Indicator Animation #990
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rohitth007 Thanks for putting this forward! While this is a small addition, this does seem to improve the experience.
I have tested this locally and it seems to work well. 👍
Other than the in-line comments, there are a few things that be improved:
- We follow a particular convention for the commit messages. You can read the commit guidelines that we have in the README and also
$ git log --oneline
. I would recommend to you installgitlint
. - We would appreciate some tests to go along with the feature. Tests give us the ability to ship new features confidently.
- We use
mypy
for static type checking. Please add type annotation wherever needed.
Feel free to drop a message in #zulip-terminal if you need any assistance with anything.
@preetmishra Yes, I am aware of the things specified that I have not added yet. This is just a functional prototype and since it's small enough to understand, I was planning to write a proper commit structure after making those changes. I am in between my exams right now hence the not so perfect PR. Hope you understand :) |
@Rohitth007 No worries. Best of luck with the exams! |
8f44004
to
c422f2d
Compare
@preetmishra PR updated for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rohitth007 Hey, thanks for your work! I have given quick feedback on the approach. Let's discuss it before moving ahead for another review iteration.
c422f2d
to
81330e7
Compare
@preetmishra I have made a few more changes to handle corner cases better. Even the tests work better now. (I have moved time forward instead of reducing it) |
You did change that line. You can take a look at the PRO-TIP: |
@zee-bit Oh wait I was checking in a different file 😅 , I mistook |
81330e7
to
3727699
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for continuing work on this! Leaving some minor code-wise comments 👍
The commit title could be improved a bit, something more specific?
14cb442
to
6ecf4bc
Compare
6ecf4bc
to
ce5e8e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rohitth007 Thanks for the improvements! This seems to work well locally. 👍
The implementation looks good! I have left a few in-line comments. We could have another test for last_updated_time
case.
ce5e8e1
to
bb951ec
Compare
@preetmishra This is ready for another review. |
c9333ce
to
09e485d
Compare
The corner case of not receiving a stop signal is handled by setting TYPING_STARTED_EXPIRY_PERIOD=15 and checking this condition using datetime and comparing it with `typing_start_time` state of `active_conversation_info`. `typing_start_time` is used so that we don't miss a start event (which is received every 10 seconds) and misinterpret it as stop not received. `active_conversation_info` is stored in a variable so that it doesn't change dynamically while inside the loop. Tests added.
The `narrow` state in active_conversation_info is used so as to end the notification if the user switches narrow by comparing with `model.narrow`. Tests added.
09e485d
to
c3e88dd
Compare
Heads up @Rohitth007, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
This commit animates the typing feedback using an iterable cycle
object. This is done using an asynchronous function
_show_typing_animation
and a booleanis_recipient_typing
tostart and end the animation.
The corner case of not recieving a
stop
signal is handled bysetting
TYPING_STARTED_EXPIRY_PERIOD=15
and checking thiscondition using
datetime
.This has to be handled differently from #915 as footer keep updating every half second
so, footer text's
duration
variable can't be used.Tests added.