fix: ensure Duo Chat conversation is scrolled to bottom on load
Description
fix: ensure Duo Chat conversation is scrolled to bottom on load
Previous scrolling solution uses custom setTimeout/window.scrollTo, which did not work for the GlDuoChat component, because scrolling was within an internal container rather than the full document.
Replaced with a call to the GlDuoChat components existing scrollToBottom method, which correctly sets scroll position for the internal container and handles displaying/hiding the fade overlay element.
This fix relies on an update in This is now updated via !1889 (merged)@gitlab/ui and should not be merged until the related MR is merged, and gitlab/ui is updated within this project.
Related Issues
Resolves #1398 (closed)
How has this been tested?
- Open the Duo Chat panel, and get enough chat history to allow scrolling, e.g. prompt
Explain GitLab in detail - Close the Duo Chat panel.
- Open it again.
- Verify chat has opened with scroll position correctly set to the bottom (bottom of most recent message visible)
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Closes #1398 (closed)
Edited by Elwyn Benson