Group activity by time in document sidebar and fix double show more (#6679)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-09-23 09:56:45 +04:00 committed by GitHub
parent db10746bec
commit eef1bd2e0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 4 deletions

View File

@ -69,6 +69,7 @@
attribute={attributeModel.attribute}
value={values[0]}
{prevValue}
withShowMore={false}
showOnlyDiff
/>
{/if}

View File

@ -16,7 +16,12 @@
-->
<script lang="ts">
import activity, { ActivityMessage } from '@hcengineering/activity'
import { ActivityFilter, ActivityMessagePresenter, canGroupMessages } from '@hcengineering/activity-resources'
import {
ActivityFilter,
ActivityMessagePresenter,
canGroupMessages,
combineActivityMessages
} from '@hcengineering/activity-resources'
import { SortingOrder } from '@hcengineering/core'
import { Document } from '@hcengineering/document'
import { createQuery } from '@hcengineering/presentation'
@ -33,7 +38,9 @@
activity.class.ActivityMessage,
{ attachedTo: value._id, space: value.space },
(res) => {
messages = res
void combineActivityMessages(res).then((res) => {
messages = res
})
},
{
sort: {

View File

@ -23,6 +23,7 @@
export let value: Markup | undefined
export let prevValue: Markup | undefined = undefined
export let attribute: AnyAttribute | undefined = undefined
export let withShowMore = true
export let showOnlyDiff: boolean = false
@ -85,8 +86,14 @@
}
</script>
<ShowMore>
{#if withShowMore}
<ShowMore>
{#key [value, prevValue]}
<MarkupDiffViewer objectClass={attribute?.attributeOf} {content} {comparedVersion} />
{/key}
</ShowMore>
{:else}
{#key [value, prevValue]}
<MarkupDiffViewer objectClass={attribute?.attributeOf} {content} {comparedVersion} />
{/key}
</ShowMore>
{/if}