Skip to content
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

botonic-react: ensure typing is visible by scrolling when typing is active #BLT-1243 #2942

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Nov 26, 2024

Description

Review commit by commit

  • Refactor TypingIndicator to have a ref and a container. A container is needed to remove margin and add a padding because scrollIntoView with end option not scroll margin pixels

  • Fixed typing indicator to be visible when there is a typing effect.

  • Add isInputFocus in webchatState to show UnreadMessagesBanner only when user is not focus in

  • Change the position to sticky so that it is always above the InputPanel (when the user types several lines of text the InputPanel can grow and the scroll down button should always be above it).

Context

When sending a user input the webchat is scrolled to bottom, but as we have more messages, when we send an input and webchat scrolls to bottom and we have a typing effect, it is not visible because is under the scrolled area.
In this PR, we are making sure that when typing is set to true, the webchat is scrolled again to bottom to make it visible.

TypingIndicator

Grabacion.de.pantalla.2024-11-27.a.las.19.12.33.mov

UnreadMessagesBanner

Grabacion.de.pantalla.2024-11-27.a.las.19.13.56.mov

@vanbasten17 vanbasten17 force-pushed the BLT-1243-botonic-typing-indicator-not-always-shown-when-area-is-scrollable branch from 1c87705 to 9ae297a Compare November 26, 2024 08:05
Copy link
Contributor

@MarcosCA MarcosCA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone is reviewing the beggining of the conversation and the agent starts typing you will lose the point of what were you checking right?

@Iru89 Iru89 self-requested a review November 26, 2024 14:51
@Iru89 Iru89 force-pushed the BLT-1243-botonic-typing-indicator-not-always-shown-when-area-is-scrollable branch from 9ae297a to be6be26 Compare November 27, 2024 18:01
@Iru89 Iru89 self-assigned this Nov 27, 2024
@Iru89 Iru89 force-pushed the BLT-1243-botonic-typing-indicator-not-always-shown-when-area-is-scrollable branch 2 times, most recently from 594961d to dd607d6 Compare November 28, 2024 10:35
@Iru89 Iru89 force-pushed the BLT-1243-botonic-typing-indicator-not-always-shown-when-area-is-scrollable branch from dd607d6 to e0d00b6 Compare November 29, 2024 15:54
@Iru89 Iru89 changed the title fix: ensure typing is visible by scrolling when typing is active #BLT-1243 botonic-react: ensure typing is visible by scrolling when typing is active #BLT-1243 Dec 2, 2024
@Iru89 Iru89 merged commit 3381252 into master-lts Dec 2, 2024
3 of 4 checks passed
@Iru89 Iru89 deleted the BLT-1243-botonic-typing-indicator-not-always-shown-when-area-is-scrollable branch December 2, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants