From 80227547b927acefef13d8eecfce98d9f5517868 Mon Sep 17 00:00:00 2001 From: Michael Uray Date: Sun, 18 Oct 2026 06:36:40 +0000 Subject: [PATCH] fix(document): keep the activity section out of printed documents Printing a document (browser print or Save as PDF) also printed the activity feed and the comment input below the content. Documents are rendered through the generic Panel from @hcengineering/panel, which renders the activity without any print styling, unlike controlled documents, which already mark their activity container as no-print. Panel gets a printActivity property (default true, so other panels keep printing their activity as before). When it is false, the activity is wrapped in a display: contents container with the no-print class, so the screen layout stays the same and the section is left out of print. The document editor sets printActivity={false}. Fixes #9054 Signed-off-by: Michael Uray --- packages/panel/src/components/Panel.svelte | 76 +++++++++++-------- .../src/components/EditDoc.svelte | 1 + 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index ad6f12c5a3c..3ae808aaa75 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -58,6 +58,7 @@ export let selectedAside: string | boolean = customAside ? customAside[0].id : isAside export let printHeader: boolean = true export let printAside: boolean = false + export let printActivity: boolean = true export let adaptive: HeaderAdaptive = 'disabled' export let hideBefore: boolean = false export let hideSearch: boolean = true @@ -256,12 +257,14 @@
{#if showActivity} - {#key object._id} - - {/key} +
+ {#key object._id} + + {/key} +
{/if}
{:else if withoutContentScroll} @@ -274,18 +277,20 @@ > {#if showActivity} - {#key object._id} - - {/key} +
+ {#key object._id} + + {/key} +
{/if} {:else} @@ -308,21 +313,30 @@ > {#if showActivity} - {#key object._id} - - {/key} +
+ {#key object._id} + + {/key} +
{/if} {/if} + + diff --git a/plugins/document-resources/src/components/EditDoc.svelte b/plugins/document-resources/src/components/EditDoc.svelte index 55ea1bb4ebd..5fe909daa68 100644 --- a/plugins/document-resources/src/components/EditDoc.svelte +++ b/plugins/document-resources/src/components/EditDoc.svelte @@ -271,6 +271,7 @@ bind:useMaxWidth {sideContentSpace} printHeader={false} + printActivity={false} {embedded} adaptive={'default'} bind:content