From 3d2e2a762a09ab853dd240151fe227ab448e7c6d Mon Sep 17 00:00:00 2001 From: Oleg Solodkov <94829167+sol-0@users.noreply.github.com> Date: Tue, 5 Sep 2023 09:29:46 +0400 Subject: [PATCH] [UBER-824] Mention notification fix (#3658) Signed-off-by: Oleg Solodkov --- models/chunter/src/index.ts | 4 + .../src/components/CommentPanel.svelte | 95 +++++++++++++++++++ plugins/chunter-resources/src/index.ts | 4 +- plugins/chunter-resources/src/plugin.ts | 3 +- 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 plugins/chunter-resources/src/components/CommentPanel.svelte diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index cf1cd313d3..a87f956c39 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -467,6 +467,10 @@ export function createModel (builder: Builder, options = { addApplication: true presenter: chunter.component.CommentsPresenter }) + builder.mixin(chunter.class.Comment, core.class.Class, view.mixin.ObjectPanel, { + component: chunter.component.CommentPanel + }) + builder.createDoc( activity.class.TxViewlet, core.space.Model, diff --git a/plugins/chunter-resources/src/components/CommentPanel.svelte b/plugins/chunter-resources/src/components/CommentPanel.svelte new file mode 100644 index 0000000000..a0dbdf562f --- /dev/null +++ b/plugins/chunter-resources/src/components/CommentPanel.svelte @@ -0,0 +1,95 @@ + + + +{#if loading} + +{:else if component && attachedDocId && attachedDocClass} + +{/if} diff --git a/plugins/chunter-resources/src/index.ts b/plugins/chunter-resources/src/index.ts index 6ed65be296..528647dfe6 100644 --- a/plugins/chunter-resources/src/index.ts +++ b/plugins/chunter-resources/src/index.ts @@ -38,6 +38,7 @@ import CommentInput from './components/CommentInput.svelte' import CommentPopup from './components/CommentPopup.svelte' import CommentPresenter from './components/CommentPresenter.svelte' import CommentsPresenter from './components/CommentsPresenter.svelte' +import CommentPanel from './components/CommentPanel.svelte' import ConvertDmToPrivateChannelModal from './components/ConvertDmToPrivateChannel.svelte' import CreateChannel from './components/CreateChannel.svelte' import CreateDirectMessage from './components/CreateDirectMessage.svelte' @@ -292,7 +293,8 @@ export default async (): Promise => ({ EditChannel, Threads, ThreadView, - SavedMessages + SavedMessages, + CommentPanel }, function: { GetDmName: getDmName, diff --git a/plugins/chunter-resources/src/plugin.ts b/plugins/chunter-resources/src/plugin.ts index cdd51acb9e..c52d1f932b 100644 --- a/plugins/chunter-resources/src/plugin.ts +++ b/plugins/chunter-resources/src/plugin.ts @@ -31,7 +31,8 @@ export default mergeIds(chunterId, chunter, { EditChannel: '' as AnyComponent, ChannelPreview: '' as AnyComponent, MessagePreview: '' as AnyComponent, - DirectMessageInput: '' as AnyComponent + DirectMessageInput: '' as AnyComponent, + CommentPanel: '' as AnyComponent }, function: { GetDmName: '' as Resource<(client: Client, space: Space) => Promise>