Fix chatbot UI autoscrolling and insert position for bot message feedback #1477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Scenarios tested
Manually tested as described above. See the video attached below.
Screenshare.-.2025-01-03.11_00_24.AM.mp4
Production deployment