From 08f07895b50fdfe8af62c4f64b893219d2ef6b62 Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Mon, 29 Sep 2025 17:37:12 +0700 Subject: [PATCH 1/6] New card view Signed-off-by: Artem Savchenko --- packages/ui/src/components/ShowMore.svelte | 3 +- .../src/components/CardPathPresenter.svelte | 6 +- .../src/components/FeedCardPresenter.svelte | 102 +++++++++++++----- .../src/components/TagDivider.svelte | 23 ++++ .../src/components/ChatApplication.svelte | 13 ++- 5 files changed, 112 insertions(+), 35 deletions(-) create mode 100644 plugins/card-resources/src/components/TagDivider.svelte diff --git a/packages/ui/src/components/ShowMore.svelte b/packages/ui/src/components/ShowMore.svelte index b505e39e4d3..d5831488a9b 100644 --- a/packages/ui/src/components/ShowMore.svelte +++ b/packages/ui/src/components/ShowMore.svelte @@ -26,7 +26,8 @@ let cHeight: number let crop: boolean = false - const toggle = (): void => { + const toggle = (event: MouseEvent): void => { + event.stopPropagation() crop = !crop } diff --git a/plugins/card-resources/src/components/CardPathPresenter.svelte b/plugins/card-resources/src/components/CardPathPresenter.svelte index f277bf8334f..e69556828bb 100644 --- a/plugins/card-resources/src/components/CardPathPresenter.svelte +++ b/plugins/card-resources/src/components/CardPathPresenter.svelte @@ -18,7 +18,7 @@ import { WithLookup } from '@hcengineering/core' import { Icon, tooltip } from '@hcengineering/ui' import { getEmbeddedLabel } from '@hcengineering/platform' - import { IconForward } from '@hcengineering/presentation' + import TagDivider from './TagDivider.svelte' import { openCardInSidebar } from '../utils' import CardIcon from './CardIcon.svelte' @@ -38,7 +38,7 @@ {/if} {#if card.parent != null} {#if displaySpace && card.$lookup?.space !== undefined} - + {/if} {@const info = card.parentInfo?.find((it) => it._id === card.parent)} {#if info} @@ -73,7 +73,7 @@ border-radius: var(--extra-small-BorderRadius); white-space: nowrap; gap: 0.25rem; - background: var(--global-ui-hover-BackgroundColor); + background-color: var(--global-ui-BackgroundColor); border: var(--global-subtle-ui-BorderColor); color: var(--global-secondary-TextColor); cursor: pointer; diff --git a/plugins/card-resources/src/components/FeedCardPresenter.svelte b/plugins/card-resources/src/components/FeedCardPresenter.svelte index ff26c11e531..815b6f70c11 100644 --- a/plugins/card-resources/src/components/FeedCardPresenter.svelte +++ b/plugins/card-resources/src/components/FeedCardPresenter.svelte @@ -13,22 +13,27 @@ @@ -67,13 +77,7 @@
openCardInSidebar(card._id, card)}>
- {#if socialId !== core.account.System} - - - - {:else} - - {/if} +
@@ -94,30 +98,33 @@ {#if !isComfortable2}
- -
- +
{/if}
- {#if message} - {#if isCompact} - - {:else} - - {/if} + {#if isThreadCard && message} + + {:else if !isThreadCard && card.content} + {/if}
+
+
+
+ +
+
+ {#if isComfortable2}
- +
- +
{/if} @@ -208,6 +215,46 @@ color: var(--global-secondary-TextColor); } + &__updates { + display: flex; + flex-direction: column; + width: 100%; + min-width: 0; + margin-top: var(--spacing-1); + padding-left: 0.5rem; + } + + &__update-item { + position: relative; + display: flex; + flex-direction: column; + cursor: pointer; + user-select: none; + + &:first-child .card__update-marker { + border-top-left-radius: 0.5rem; + border-top-right-radius: 0.5rem; + } + + &:last-child .card__update-marker { + border-bottom-left-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + } + + &:hover .card__update-marker { + border-radius: 0.5rem; + background: var(--global-primary-LinkColor); + } + } + + &__update-marker { + position: absolute; + width: 0.25rem; + height: 100%; + background: var(--global-ui-highlight-BackgroundColor); + border-radius: 0; + } + &__parent { display: flex; align-items: center; @@ -245,7 +292,6 @@ height: 0.5rem; } .tags-container { - min-width: 14rem; max-width: none; flex-grow: 1; } diff --git a/plugins/card-resources/src/components/TagDivider.svelte b/plugins/card-resources/src/components/TagDivider.svelte new file mode 100644 index 00000000000..ca9fed505f3 --- /dev/null +++ b/plugins/card-resources/src/components/TagDivider.svelte @@ -0,0 +1,23 @@ + + + + + + + + + + + + + +
+ + diff --git a/plugins/chat-resources/src/components/ChatApplication.svelte b/plugins/chat-resources/src/components/ChatApplication.svelte index 92fb6da686e..d4f421e9a36 100644 --- a/plugins/chat-resources/src/components/ChatApplication.svelte +++ b/plugins/chat-resources/src/components/ChatApplication.svelte @@ -14,7 +14,7 @@ --> + +
+ + + {#if count > 0} +
+ +
+ {/if} +
+ + diff --git a/plugins/card-resources/src/components/ContentPreview.svelte b/plugins/card-resources/src/components/ContentPreview.svelte new file mode 100644 index 00000000000..bc9da8354a3 --- /dev/null +++ b/plugins/card-resources/src/components/ContentPreview.svelte @@ -0,0 +1,63 @@ + + + + +
+ +
+ +
+
+
+ + diff --git a/plugins/card-resources/src/components/NotifyMarker.svelte b/plugins/card-resources/src/components/NotifyMarker.svelte new file mode 100644 index 00000000000..433ceb2bd24 --- /dev/null +++ b/plugins/card-resources/src/components/NotifyMarker.svelte @@ -0,0 +1,59 @@ + + + +
+ + diff --git a/plugins/card-resources/src/components/TagDivider.svelte b/plugins/card-resources/src/components/TagDivider.svelte index ca9fed505f3..9052915f25f 100644 --- a/plugins/card-resources/src/components/TagDivider.svelte +++ b/plugins/card-resources/src/components/TagDivider.svelte @@ -11,7 +11,7 @@ -
+