From 8957138eb2b8bc39a4ed0e37d733d5d70e3ff291 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 1 Dec 2021 21:14:38 +0300 Subject: [PATCH] Update layout for comments in tooltip (#471) Signed-off-by: Alexander Platov --- packages/theme/styles/_layouts.scss | 5 ++ .../ui/src/components/TooltipInstance.svelte | 6 +- .../ui/src/components/icons/Comments.svelte | 10 --- .../ui/src/components/icons/Thread.svelte | 2 +- packages/ui/src/index.ts | 1 - plugins/chunter-assets/lang/en.json | 3 +- .../src/components/CommentPopup.svelte | 18 ++--- .../src/components/CommentPresenter.svelte | 73 ++++++++----------- .../src/components/CommentsPresenter.svelte | 8 +- plugins/chunter-resources/src/plugin.ts | 2 +- plugins/chunter/src/index.ts | 3 +- 11 files changed, 55 insertions(+), 76 deletions(-) delete mode 100755 packages/ui/src/components/icons/Comments.svelte diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index cf6486393a..ff9e2873cb 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -116,6 +116,10 @@ p:last-child { margin-block-end: 0; } align-items: center; flex-wrap: nowrap; } +.flex-row-top { + display: flex; + align-items: flex-start; +} .flex-row-reverse { display: flex; flex-direction: row-reverse; @@ -138,6 +142,7 @@ p:last-child { margin-block-end: 0; } flex-direction: column; align-items: stretch; } +.justify-between { justify-content: space-between; } .safari-gap-1 { & > * { margin-right: .25rem; } diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index 912aff62c1..9703c60bdf 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -138,7 +138,7 @@ diff --git a/plugins/chunter-resources/src/components/CommentPresenter.svelte b/plugins/chunter-resources/src/components/CommentPresenter.svelte index d3073571c2..b28489ce36 100644 --- a/plugins/chunter-resources/src/components/CommentPresenter.svelte +++ b/plugins/chunter-resources/src/components/CommentPresenter.svelte @@ -18,6 +18,7 @@ import type { Comment } from '@anticrm/chunter' import { formatName } from '@anticrm/contact' import { Avatar, getClient, MessageViewer } from '@anticrm/presentation' + import { TimeSince } from '@anticrm/ui' import { getTime, getUser } from '../utils' export let value: Comment @@ -25,52 +26,40 @@ const client = getClient() -
-
-
-
- {#await getUser(client, value.modifiedBy) then user} - {#if user}{formatName(user.name)}{/if} - {/await} - {getTime(value.modifiedOn)} +
+
+ +
+
+
+
+ {#await getUser(client, value.modifiedBy) then user} + {#if user}{formatName(user.name)}{/if} + {/await} +
+
+
+
+
-
\ No newline at end of file diff --git a/plugins/chunter-resources/src/components/CommentsPresenter.svelte b/plugins/chunter-resources/src/components/CommentsPresenter.svelte index 7860c1b2d4..8c8a3579dd 100644 --- a/plugins/chunter-resources/src/components/CommentsPresenter.svelte +++ b/plugins/chunter-resources/src/components/CommentsPresenter.svelte @@ -16,17 +16,17 @@ {#if value.comments && value.comments > 0} - +
- {value.comments} + {value.comments}
{/if} diff --git a/plugins/chunter-resources/src/plugin.ts b/plugins/chunter-resources/src/plugin.ts index e7dda7c544..2733152c96 100644 --- a/plugins/chunter-resources/src/plugin.ts +++ b/plugins/chunter-resources/src/plugin.ts @@ -36,6 +36,6 @@ export default mergeIds(chunterId, chunter, { ChannelName: '' as IntlString, ChannelDescription: '' as IntlString, MakePrivate: '' as IntlString, - MakePrivateDescription: '' as IntlString, + MakePrivateDescription: '' as IntlString } }) diff --git a/plugins/chunter/src/index.ts b/plugins/chunter/src/index.ts index 4061f4159e..6ad1baebc4 100644 --- a/plugins/chunter/src/index.ts +++ b/plugins/chunter/src/index.ts @@ -78,6 +78,7 @@ export default plugin(chunterId, { }, string: { EditUpdate: '' as IntlString, - EditCancel: '' as IntlString + EditCancel: '' as IntlString, + Comments: '' as IntlString } })