From c74f48d04466d6320889f1f98f5378d34d1db6b7 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Thu, 12 Jan 2023 18:50:41 +0300 Subject: [PATCH] Update Notifications layout (#2500) Signed-off-by: Alexander Platov --- .../src/components/ObjectPopup.svelte | 11 +- .../src/components/ObjectSearchPopup.svelte | 5 +- .../src/components/SpacesMultiPopup.svelte | 4 +- packages/theme/styles/_layouts.scss | 1 + packages/theme/styles/popups.scss | 23 +- packages/ui/src/components/Button.svelte | 3 +- packages/ui/src/components/ColorPopup.svelte | 4 +- .../src/components/DropdownLabelsPopup.svelte | 4 +- .../ui/src/components/DropdownPopup.svelte | 4 +- packages/ui/src/components/SelectPopup.svelte | 4 +- .../ui/src/components/icons/CheckAll.svelte | 27 +++ .../ui/src/components/icons/Delete.svelte | 2 +- packages/ui/src/index.ts | 1 + packages/ui/src/popups.ts | 9 + .../src/components/TxView.svelte | 20 +- .../src/components/CommentPresenter.svelte | 53 +++-- .../activity/TxBacklinkReference.svelte | 2 +- .../components/EmployeePreviewPopup.svelte | 9 +- plugins/notification-resources/package.json | 3 +- .../src/components/NotificationView.svelte | 214 +++++++++++++----- .../src/components/NotificationsPopup.svelte | 45 ++-- .../src/components/TagsDropdownEditor.svelte | 2 - .../src/components/TagsFilter.svelte | 5 +- .../src/components/TagsPopup.svelte | 5 +- .../src/components/TemplatePopup.svelte | 9 +- .../src/components/SpacesPopup.svelte | 9 +- .../components/projects/ProjectBrowser.svelte | 2 +- .../components/sprints/SprintBrowser.svelte | 2 +- .../templates/IssueTemplatesView.svelte | 2 +- .../src/components/filter/ObjectFilter.svelte | 4 +- plugins/view-resources/src/index.ts | 1 + 31 files changed, 346 insertions(+), 143 deletions(-) create mode 100644 packages/ui/src/components/icons/CheckAll.svelte diff --git a/packages/presentation/src/components/ObjectPopup.svelte b/packages/presentation/src/components/ObjectPopup.svelte index eb5e07608c..20b32b2d8a 100644 --- a/packages/presentation/src/components/ObjectPopup.svelte +++ b/packages/presentation/src/components/ObjectPopup.svelte @@ -27,7 +27,8 @@ ListView, showPopup, tooltip, - resizeObserver + resizeObserver, + deviceOptionsStore } from '@hcengineering/ui' import { createEventDispatcher } from 'svelte' import presentation from '..' @@ -206,7 +207,13 @@ }} >
- + {#if create !== undefined}
{#if viewlet && viewlet.component && viewlet.display !== 'inline'} -
+
{#if tx.collectionAttribute !== undefined && (tx.txDocIds?.size ?? 0) > 1}
@@ -456,4 +457,21 @@ .lower { text-transform: lowercase; } + .activity-content { + overflow: hidden; + visibility: visible; + max-height: max-content; + opacity: 1; + transition-property: max-height, opacity; + transition-timing-function: ease-in-out; + transition-duration: 0.15s; + + &.contentHidden { + visibility: hidden; + padding: 0; + margin-top: -0.5rem; + max-height: 0; + opacity: 0; + } + } diff --git a/plugins/chunter-resources/src/components/CommentPresenter.svelte b/plugins/chunter-resources/src/components/CommentPresenter.svelte index b4b55f6ade..9ca7100a71 100644 --- a/plugins/chunter-resources/src/components/CommentPresenter.svelte +++ b/plugins/chunter-resources/src/components/CommentPresenter.svelte @@ -16,35 +16,52 @@ -
-
- -
-
-
-
- {#await getUser(client, value.modifiedBy) then user} - {#if user}{formatName(user.name)}{/if} - {/await} -
-
+{#if inline} + +
+ +
+ Message +
+  #{cutId(value._id.toString())} +{:else} +
+
+ +
+
+
+
+ {#await getUser(client, value.modifiedBy) then user} + {#if user}{formatName(user.name)}{/if} + {/await} +
+
+
+ + + +
- - - -
-
+{/if} diff --git a/plugins/notification-resources/src/components/NotificationsPopup.svelte b/plugins/notification-resources/src/components/NotificationsPopup.svelte index 5bc397a8ce..3822c8b77c 100644 --- a/plugins/notification-resources/src/components/NotificationsPopup.svelte +++ b/plugins/notification-resources/src/components/NotificationsPopup.svelte @@ -20,7 +20,7 @@ import core, { getCurrentAccount, WithLookup } from '@hcengineering/core' import { Notification, NotificationStatus } from '@hcengineering/notification' import { createQuery, getClient } from '@hcengineering/presentation' - import { ActionIcon, IconCheck, IconDelete, Scroller } from '@hcengineering/ui' + import { Button, IconCheckAll, IconDelete, Scroller } from '@hcengineering/ui' import Label from '@hcengineering/ui/src/components/Label.svelte' import notification from '../plugin' import NotificationView from './NotificationView.svelte' @@ -80,29 +80,32 @@
-
- - -
+ {#if notifications.length > 0} +
+
+ {/if}
{#if notifications.length > 0} - -
- {#each notifications as n} - - {/each} -
+ + {#each notifications as n} + + {/each} +
{:else}