fix: bump comment text to text-base + reload annotations on block delete
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) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled
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) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / E2E Tests (pull_request) Has been cancelled
Comment text: - Body and quote bumped from text-sm (14px) to text-base (16px) to visually match the font-sans author name at text-sm Annotation reload on delete: - Add annotationReloadKey prop through DocumentViewer → PdfViewer - Increment key after block delete in +page.svelte - PdfViewer reloads annotations when key changes - Annotation rectangle disappears immediately, not just after refresh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,7 @@ let activeAnnotationId = $state<string | null>(null);
|
||||
// ── Transcription blocks ─────────────────────────────────────────────────────
|
||||
|
||||
let transcriptionBlocks = $state<TranscriptionBlockData[]>([]);
|
||||
let annotationReloadKey = $state(0);
|
||||
|
||||
const blockNumbers = $derived(
|
||||
Object.fromEntries(
|
||||
@@ -92,6 +93,7 @@ async function deleteBlock(blockId: string) {
|
||||
});
|
||||
if (!res.ok) throw new Error('Delete failed');
|
||||
transcriptionBlocks = transcriptionBlocks.filter((b) => b.id !== blockId);
|
||||
annotationReloadKey++;
|
||||
}
|
||||
|
||||
async function createBlockFromDraw(rect: {
|
||||
@@ -208,6 +210,7 @@ onMount(() => {
|
||||
error={fileError}
|
||||
transcribeMode={transcribeMode}
|
||||
blockNumbers={blockNumbers}
|
||||
annotationReloadKey={annotationReloadKey}
|
||||
bind:activeAnnotationId={activeAnnotationId}
|
||||
onAnnotationClick={handleAnnotationClick}
|
||||
onTranscriptionDraw={createBlockFromDraw}
|
||||
|
||||
Reference in New Issue
Block a user