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

Fix chatbot UI autoscrolling and insert position for bot message feedback #1477

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

TamiTakamiya
Copy link
Contributor

Jira Issue: https://issues.redhat.com/browse/AAP-35711
This also will fix the issue reported by ansible/ansible-lightspeed-va-feedback#15

Description

On the existing implementaiton, when a new bot message is received, chatbot window scrolls to the bottom of the message. It is changed to scroll to the top of the last message instead.

Also when a ThumbsUp/Down icon is clicked for a bot message, which is NOT the last one, the feedback message is added to the bottom and chatbot window scrolls to the bottom (it is the issue reported by ansible/ansible-lightspeed-va-feedback#15). With this PR, the feedback message will be added right after the bot message, to which the feedback was sent, and chatbot window scrolls to the top of the feedback message.

Testing

Steps to test

  1. Pull down the PR
  2. Run the chatbot
  3. Send more than one queries
  4. Click ThubsUp/Down icon for a bot message, which is NOT the last one, and see the window scrolls to the feedback message ("Thank you for your feedback...")

Scenarios tested

Manually tested as described above. See the video attached below.

Screenshare.-.2025-01-03.11_00_24.AM.mp4

Production deployment

  • This code change is ready for production on its own
  • This code change requires the following considerations before going to production:

manstis
manstis previously approved these changes Jan 3, 2025
Copy link
Contributor

@manstis manstis left a comment

Choose a reason for hiding this comment

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

Minor comment.

Untried or tested but changes seem reasonable to me.

@TamiTakamiya TamiTakamiya marked this pull request as ready for review January 3, 2025 16:38
Copy link
Contributor

@manstis manstis left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@TamiTakamiya TamiTakamiya merged commit 4608df7 into main Jan 3, 2025
9 checks passed
@TamiTakamiya TamiTakamiya deleted the TamiTakamiya/AAP-35711/fix-autoscroll branch January 3, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants