feat(frontend): keep annotation tab after switching to document discussion
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
CI / E2E Tests (pull_request) Failing after 26m48s
CI / Unit & Component Tests (pull_request) Successful in 2m29s
CI / Backend Unit Tests (pull_request) Successful in 2m16s

Clicking the Diskussion sub-tab no longer deselects the active annotation,
so the Annotation tab stays visible and accessible for easy toggling back.

The annotation is cleared only via Escape or clicking elsewhere on the PDF.
Removes the now-unused onClearAnnotation callback chain.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-24 22:49:44 +01:00
parent ecfd80bf9a
commit ee85ce4668
3 changed files with 0 additions and 10 deletions

View File

@@ -50,7 +50,6 @@ type Props = {
activeTab: Tab;
activeAnnotationId: string | null;
activeAnnotationPage: number | null;
onClearAnnotation?: () => void;
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
};
@@ -65,7 +64,6 @@ let {
activeTab = $bindable(),
activeAnnotationId,
activeAnnotationPage,
onClearAnnotation,
onAnnotationCommentCountChange
}: Props = $props();
@@ -191,7 +189,6 @@ const panelHeight = $derived(open ? height : MIN_HEIGHT);
canComment={canComment}
currentUserId={currentUserId}
canAdmin={canAdmin}
onClearAnnotation={onClearAnnotation}
onAnnotationCommentCountChange={onAnnotationCommentCountChange}
/>
{:else if activeTab === 'history'}

View File

@@ -29,7 +29,6 @@ type Props = {
canComment: boolean;
currentUserId: string | null;
canAdmin: boolean;
onClearAnnotation?: () => void;
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
};
@@ -41,7 +40,6 @@ let {
canComment,
currentUserId,
canAdmin,
onClearAnnotation,
onAnnotationCommentCountChange
}: Props = $props();
@@ -64,7 +62,6 @@ $effect(() => {
function selectDocumentTab() {
activeSubTab = 'document';
onClearAnnotation?.();
}
function selectAnnotationTab() {

View File

@@ -162,8 +162,4 @@ $effect(() => {
bind:activeTab={activeTab}
activeAnnotationId={activeAnnotationId}
activeAnnotationPage={activeAnnotationPage}
onClearAnnotation={() => {
activeAnnotationId = null;
activeAnnotationPage = null;
}}
/>