-
Notifications
You must be signed in to change notification settings - Fork 69
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
The typing animation is working? #20
Comments
botman/botman#939 - same problem |
Any updates ? |
@lakinmohapatra No. |
any update? |
I wrote jquery to do this. Use this in setInterval(function () {
// check if last message is by visitor. If yes, show indicator
if($( "ol.chat li:last-child" ).attr('class') ==='visitor')
{
$( "ol.chat" ).append('<li class="indicator"><div class="loading-dots"><span class="dot"></span><span class="dot"></span><span class="dot"></span></div></li>');
}
else
{
// if last message is by bot and indicator is shown, then remove indicator from conversation
if($( "ol.chat li:last-child" ).attr('class') ==='indicator' && $("ol.chat li:nth-last-child(2)").attr('class') ==='chatbot')
$("ol.chat li .loading-dots").parent().remove();
}
}, 10); Logic behind this code I thought as
Hope it helps you. |
@rohankhudedev is there a guide on how to implement your code? Thanks |
This will be coming in an upcoming release |
Is it working now? |
I havent checked that it is available in latest release. If not working, you can try the jquery code which i have given above. |
Here is a version without needing jquery
|
Thanks for the code
|
This code does not seem to work for me for buttons. I do not get any typing indicator when the user clicks a button. Any thoughts on how this could be implemented. |
I made a little modification to this script in order to set automatic scroll-down in the message area just after the dot animation (the original script fails to do that if the animation is located at the bottom of the message area). I did this change in my chat.html (framePoint) instead of chat.blade.php:
Hope that helps someone! |
Hi!! use BotMan\BotMan\BotMan; class CustomReceivedMiddleware implements Received |
Hi.. Could u pls share the entire project folder?? It would be great help.. Thanks Siddhi |
I created a new package that solves this and several other issues |
Hi!
I saw there is a Typing file with the 3 dots, and the css is there.
I wonder if i can pretend that the bot is typing, i try with
$bot->typesAndWaits(2)
, but only waits for 2 seconds, the animation is not displayI don't now if im doing something wrong or is not working for this case.
Thanks!
The text was updated successfully, but these errors were encountered: