Only Auto Scroll when at Page Bottom and Add Button to Scroll to Page Bottom on Web App (#923)

Improve Scrolling on Chat page of Web app

- Details
  1. Only auto scroll Khoj's streamed response when scroll is near bottom of page
      Allows scrolling to other messages in conversation while Khoj is formulating and streaming its response
  2. Add button to scroll to bottom of the chat page
  3. Scroll to most recent conversation turn on conversation first load
      It's a better default to anchor to most recent conversation turn (i.e most recent user message)
  4. Smooth scroll when Khoj's chat response is streamed
      Previously the scroll would jitter during response streaming
  5. Anchor scroll position when fetch and render older messages in conversation
      Allow users to keep their scroll position when older messages are fetched from server and rendered

Resolves #758
This commit is contained in:
Shantanu Sakpal
2024-09-29 11:24:34 +05:30
committed by GitHub
parent 06777e1660
commit be8de1a1bd
3 changed files with 104 additions and 64 deletions

View File

@@ -53,6 +53,10 @@ div.khojChatMessage {
padding-left: 16px;
}
div.emptyChatMessage {
display: none;
}
div.chatMessageContainer img {
width: 50%;
}