discourse/plugins/chat/assets/javascripts/discourse/components/chat-scroll-to-bottom-arrow.hbs
Joffrey JAFFEUX b5e736504a
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
2023-03-06 16:42:11 +01:00

20 lines
476 B
Handlebars

<div class="scroll-stick-wrap">
<DButton
class={{concat-class
"btn-flat"
"chat-scroll-to-bottom"
(if (or @show @hasNewMessages) "visible")
}}
@action={{@scrollToBottom}}
>
<span class="chat-scroll-to-bottom__arrow">
{{d-icon "arrow-down"}}
{{#if @hasNewMessages}}
<span class="chat-scroll-to-bottom__text">
{{i18n "chat.scroll_to_new_messages"}}
</span>
{{/if}}
</span>
</DButton>
</div>