From ed634ccabf5de339255509fdc954e0047b464037 Mon Sep 17 00:00:00 2001 From: Kristina Date: Thu, 18 Jan 2024 19:45:14 +0400 Subject: [PATCH] Add keyboard support for inbox and simplify code (#4380) Signed-off-by: Kristina Fefelova --- .../components/DocNotifyContextCard.svelte | 20 ++- .../src/components/inbox/Inbox.svelte | 22 ++-- .../components/inbox/InboxFlatListView.svelte | 119 ++++++++++++------ .../inbox/InboxGroupedListView.svelte | 109 ++++++++++++---- .../src/inboxNotificationsClient.ts | 65 ++++++---- plugins/notification-resources/src/index.ts | 6 +- plugins/notification-resources/src/utils.ts | 44 ++++--- plugins/notification/src/index.ts | 9 +- .../src/components/Workbench.svelte | 16 ++- 9 files changed, 283 insertions(+), 127 deletions(-) diff --git a/plugins/notification-resources/src/components/DocNotifyContextCard.svelte b/plugins/notification-resources/src/components/DocNotifyContextCard.svelte index e26508418e..686e168fcf 100644 --- a/plugins/notification-resources/src/components/DocNotifyContextCard.svelte +++ b/plugins/notification-resources/src/components/DocNotifyContextCard.svelte @@ -13,7 +13,7 @@ // limitations under the License. --> - - {#each notifications as notification (notification._id)} -
-
- - - - - - - - - - { - dispatch('click', { - context: $notifyContextsStore.find(({ _id }) => _id === notification.docNotifyContext), - notification - }) - }} - /> -
-
- {/each} -
+ + +
+ + + {@const notification = notifications[itemIndex]} + {#key notification._id} +
+ + + + + + + + + + { + dispatch('click', { + context: $notifyContextsStore.find(({ _id }) => _id === notification.docNotifyContext), + notification + }) + }} + /> +
+ {/key} +
+
+