(settings) Add delay between bubbles option and typing disabling on first message

This commit is contained in:
Baptiste Arnaud
2024-01-24 12:03:41 +01:00
parent e80f297e74
commit f052b4c805
16 changed files with 159 additions and 37 deletions

View File

@@ -10,6 +10,7 @@ import { computeTypingDuration } from '@typebot.io/bot-engine/computeTypingDurat
type Props = {
content: TextBubbleBlock['content']
typingEmulation: Settings['typingEmulation']
isTypingSkipped: boolean
onTransitionEnd: (offsetTop?: number) => void
}
@@ -35,7 +36,7 @@ export const TextBubble = (props: Props) => {
? computePlainText(props.content.richText)
: ''
const typingDuration =
props.typingEmulation?.enabled === false
props.typingEmulation?.enabled === false || props.isTypingSkipped
? 0
: computeTypingDuration({
bubbleContent: plainText,