From 99749f30fb70099dfdeee9e427ab0b9c96f1818e Mon Sep 17 00:00:00 2001 From: Kristina Date: Wed, 2 Oct 2024 11:00:17 +0400 Subject: [PATCH] Add chat and inbox fixes (#6779) Signed-off-by: Kristina Fefelova --- .../components/ActivityMessageAction.svelte | 2 +- plugins/chunter-assets/lang/ru.json | 2 +- .../src/components/ChannelScrollView.svelte | 2 +- plugins/chunter-resources/src/navigation.ts | 2 +- .../src/components/inbox/Inbox.svelte | 43 +++++++++++++++---- plugins/notification-resources/src/utils.ts | 8 +++- 6 files changed, 45 insertions(+), 14 deletions(-) diff --git a/plugins/activity-resources/src/components/ActivityMessageAction.svelte b/plugins/activity-resources/src/components/ActivityMessageAction.svelte index 5ca696292a..b8bcfae1fd 100644 --- a/plugins/activity-resources/src/components/ActivityMessageAction.svelte +++ b/plugins/activity-resources/src/components/ActivityMessageAction.svelte @@ -40,6 +40,6 @@ kind="tertiary" pressed={opened} {dataId} - tooltip={{ label }} + tooltip={{ label, direction: 'bottom' }} on:click={onClick} /> diff --git a/plugins/chunter-assets/lang/ru.json b/plugins/chunter-assets/lang/ru.json index efdecade4d..5a0e3d671c 100644 --- a/plugins/chunter-assets/lang/ru.json +++ b/plugins/chunter-assets/lang/ru.json @@ -81,7 +81,7 @@ "Reacted": "Отреагировал(а)", "Docs": "Documents", "NewestFirst": "Сначала новые", - "ReplyToThread": "Ответить в канале", + "ReplyToThread": "Ответить в теме", "SentMessage": "Отправил(а) сообщение", "Direct": "Личные сообщения", "RepliedToThread": "Ответил(а) в канале", diff --git a/plugins/chunter-resources/src/components/ChannelScrollView.svelte b/plugins/chunter-resources/src/components/ChannelScrollView.svelte index 0544d9356d..7d94424e32 100644 --- a/plugins/chunter-resources/src/components/ChannelScrollView.svelte +++ b/plugins/chunter-resources/src/components/ChannelScrollView.svelte @@ -379,7 +379,7 @@ function messageInView (msgElement: Element, containerRect: DOMRect): boolean { const messageRect = msgElement.getBoundingClientRect() - return messageRect.top >= containerRect.top && messageRect.bottom - messageRect.height / 2 <= containerRect.bottom + return messageRect.top >= containerRect.top && messageRect.top <= containerRect.bottom && messageRect.bottom >= 0 } const messagesToReadAccumulator: Set = new Set() diff --git a/plugins/chunter-resources/src/navigation.ts b/plugins/chunter-resources/src/navigation.ts index 95d3b97eea..48111482d4 100644 --- a/plugins/chunter-resources/src/navigation.ts +++ b/plugins/chunter-resources/src/navigation.ts @@ -151,7 +151,7 @@ export async function buildThreadLink ( loc.path[2] = chunterId } - loc.query = { message: '' } + loc.query = { ...loc.query, message: '' } loc.path[3] = objectURI loc.path[4] = threadParent loc.fragment = undefined diff --git a/plugins/notification-resources/src/components/inbox/Inbox.svelte b/plugins/notification-resources/src/components/inbox/Inbox.svelte index f66650eb87..8f751f3e42 100644 --- a/plugins/notification-resources/src/components/inbox/Inbox.svelte +++ b/plugins/notification-resources/src/components/inbox/Inbox.svelte @@ -15,7 +15,7 @@