PERF: applies optimisations on chat-live pane (#20532)

- group writes when computing separators positions
- shows skeleton only on initial load
- forces date separator to be pinned when first message to prevent a pinned - not pinned - pinned sequence when loading more in past
- relies on `message.visible` property instead of checking `isElementInViewport`
- attempts to load next/prev messages earlier
- do not scroll to on fetch more
- hides `last visit` text while pinned
This commit is contained in:
Joffrey JAFFEUX
2023-03-06 16:42:11 +01:00
committed by GitHub
parent d28390054e
commit b5e736504a
29 changed files with 337 additions and 378 deletions

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class Chat::ChatController < Chat::ChatBaseController
PAST_MESSAGE_LIMIT = 20
PAST_MESSAGE_LIMIT = 40
FUTURE_MESSAGE_LIMIT = 40
PAST = "past"
FUTURE = "future"