feat(frontend): move annotation comments to right-side panel

Annotation threads now open in a slide-in side panel (320 px, right
edge of the PDF viewer) instead of expanding the bottom drawer.
The PDF stays visible while the user reads and writes annotation
comments.

- Add AnnotationSidePanel component (absolute-positioned, CSS slide
  transition, keyed CommentThread, close via X or Escape)
- Remove the $effect that opened the bottom drawer on annotation click
- Simplify PanelDiscussion back to document-level thread only (no
  annotation sub-tabs)
- Remove annotation-related props from DocumentBottomPanel and
  PanelDiscussion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-25 07:23:20 +01:00
parent 10783fdb55
commit f71712ab4b
4 changed files with 88 additions and 116 deletions

View File

@@ -48,9 +48,6 @@ type Props = {
open: boolean;
height: number;
activeTab: Tab;
activeAnnotationId: string | null;
activeAnnotationPage: number | null;
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
};
let {
@@ -61,10 +58,7 @@ let {
canAdmin,
open = $bindable(),
height = $bindable(),
activeTab = $bindable(),
activeAnnotationId,
activeAnnotationPage,
onAnnotationCommentCountChange
activeTab = $bindable()
}: Props = $props();
const MIN_HEIGHT = 52; // drag handle (8px) + tab bar (~44px)
@@ -187,13 +181,10 @@ const panelHeight = $derived(open ? height : MIN_HEIGHT);
{:else if activeTab === 'discussion'}
<PanelDiscussion
documentId={doc.id}
activeAnnotationId={activeAnnotationId}
activeAnnotationPage={activeAnnotationPage}
initialComments={comments}
canComment={canComment}
currentUserId={currentUserId}
canAdmin={canAdmin}
onAnnotationCommentCountChange={onAnnotationCommentCountChange}
/>
{:else if activeTab === 'history'}
<PanelHistory documentId={doc.id} />