feat(transcription): add block-level comment threads with quote support
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 / Unit & Component Tests (pull_request) Failing after 1m33s
CI / Backend Unit Tests (pull_request) Failing after 2m47s
CI / E2E Tests (pull_request) Failing after 19m44s
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 / Unit & Component Tests (pull_request) Failing after 1m33s
CI / Backend Unit Tests (pull_request) Failing after 2m47s
CI / E2E Tests (pull_request) Failing after 19m44s
TranscriptionBlock.svelte: - "Kommentieren" button opens expandable comment thread per block - Text selection in textarea captured as quoted text (> "...") prefix - Quote hint "Text markieren für Zitat" shown when block is active/focused - Comment thread uses existing CommentThread with blockId prop CommentThread.svelte: - Add blockId prop for block-level comments URL routing - Add quotedText prop — pre-fills comment input with markdown blockquote - commentsBase now supports 3 URL patterns: document, annotation, block TranscriptionEditView.svelte: - Pass canComment + currentUserId through to block components 3 new frontend tests: - Kommentieren button present - Quote hint shown when active - Quote hint hidden when inactive Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,12 +9,22 @@ type SaveState = 'idle' | 'saving' | 'saved' | 'fading' | 'error';
|
||||
type Props = {
|
||||
documentId: string;
|
||||
blocks: TranscriptionBlockData[];
|
||||
canComment: boolean;
|
||||
currentUserId: string | null;
|
||||
onBlockFocus: (blockId: string) => void;
|
||||
onSaveBlock: (blockId: string, text: string) => Promise<void>;
|
||||
onDeleteBlock: (blockId: string) => Promise<void>;
|
||||
};
|
||||
|
||||
let { documentId, blocks, onBlockFocus, onSaveBlock, onDeleteBlock }: Props = $props();
|
||||
let {
|
||||
documentId,
|
||||
blocks,
|
||||
canComment,
|
||||
currentUserId,
|
||||
onBlockFocus,
|
||||
onSaveBlock,
|
||||
onDeleteBlock
|
||||
}: Props = $props();
|
||||
|
||||
let activeBlockId: string | null = $state(null);
|
||||
let saveStates = new SvelteMap<string, SaveState>();
|
||||
@@ -149,11 +159,14 @@ $effect(() => {
|
||||
<div onblur={handleBlur}>
|
||||
<TranscriptionBlock
|
||||
blockId={block.id}
|
||||
documentId={documentId}
|
||||
blockNumber={i + 1}
|
||||
text={block.text}
|
||||
label={block.label}
|
||||
active={activeBlockId === block.id}
|
||||
saveState={getSaveState(block.id)}
|
||||
canComment={canComment}
|
||||
currentUserId={currentUserId}
|
||||
onTextChange={(text) => handleTextChange(block.id, text)}
|
||||
onFocus={() => handleFocus(block.id)}
|
||||
onDeleteClick={() => handleDelete(block.id)}
|
||||
|
||||
Reference in New Issue
Block a user