-
Notifications
You must be signed in to change notification settings - Fork 20
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
3029: Add typing indicator for automatic replies in chat #3056
base: main
Are you sure you want to change the base?
Conversation
50de658
to
2a08823
Compare
2a08823
to
529d718
Compare
The typing indicator also appearing before the automatic reply, I have no idea how to limit this behaviour... Any ideas? |
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.
Looks good already, I just think the condition when to display the typing indicator is still wrong. I only get it if the last message is not from the user.
Also see my question here: #3029 (comment) |
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.
Tested on firefox, works as expected.
const showIndicatorOfTyping = | ||
messages[messages.length - 1]?.userIsAuthor || messages[messages.length - 2]?.userIsAuthor |
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.
This means that if the message before the last one is a user it will show the 3 dot.
Shouldn't be shown just if the last message is coming from a user?
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.
Fair point and I think you are right. Seems like I was a little tired already when I made my review, sorry :D Probably we would need a condition in the following way:
Show the indicator if either
- the last message was sent by the user OR
- there is only one message yet that was NOT sent by the user (as that is the automatic answer)
Short description
Typing indicator message (...) for 60 seconds should be shown after automatic answer in chat. It will be a temporary solution untill the websocket implementation
Proposed changes
Side effects
Resolved issues
Fixes: #3029