question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need to increase the timeout for TypingAnimation

See original GitHub issue

@compulim: Please see “How to fix” below, https://github.com/microsoft/BotFramework-WebChat/issues/2031#issuecomment-510964209.

Feature request

I need to increase the timeout of the typing animation shown by the bot. Currently, the bot typing animation disappears after 2 sec or so. I need to increase to 6 sec. I tried following the approach of setting SendTimeout explicitly but it doesn’t seem to work.

  window.WebChat.renderWebChat({
                directLine: window.WebChat.createDirectLine({
                    token: params['s'],
                    userID: params['username'],
                    user: {id: params['userid']},          
                }),
                store, username: params['username'],
                userID: params['userid'], **sendTimeout: 60000**,
                styleSet,
                sendTypingIndicator: true,
            },
            document.getElementById("webchat")
        );

Any idea of how can I Increase the timeout for typing Animation.

(Edited by @compulim for code formatting)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
marq47commented, Jun 12, 2019

Hi! We need this feature too. Thanks for your work on it.

1reaction
compulimcommented, Jul 12, 2019

How to fix

Implementation

  • Today, we use saga to control how long to show typing
    • “How long” is a question on UI, not back end. Thus, the better design is to move it away from saga
  • Tomorrow
    • Use debounce in UI to control how long to show typing
    • Move typing indicator into send box
      • This will greatly reduce code complexity
    • Add typingIndicatorTimeout to styleOptions

Tests

  • Basic test
    • Default value
    • Non-default value
    • New activity from bot come in and it should immediately remove typing indicator
  • Corner cases
    • After the typing indicator “faded away”, setting styleOptions.typingIndicatorTimeout to a bigger value should bring it back
Read more comments on GitHub >

github_iconTop Results From Across the Web

setTimeOut and typing effect - javascript - Stack Overflow
The problem is that you are not passing the proper first argument to setTimeout . It takes a function reference as the first...
Read more >
12.1 JavaScript setTimeout() - Text Animation - p5.js Tutorial
00:19 JavaScript setTimeout()06:10 adding custom font to p508:23 using JavaScript setTimeout() in p5 setup()18:29 using JavaScript ...
Read more >
Animated Typing Text Component React Native - YouTube
Hi everyone!Today I'm just going to show you how to create a component that animates a text component to appear as if someone...
Read more >
Text typing effect in javascript. - LearnersBucket
Learn how to create the text typing effect in javascript. Text typing effect types the whole text character by character at specified speed....
Read more >
Typewriter Effect | CSS-Tricks
Adding more steps to the typing animation will increase the smoothness of the typing; Adjust the letter-spacing based on the font-family and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found