feat: Expandable metadata drawer + transcription system (#175, #176) #178

Merged
marcel merged 47 commits from feat/issue-175-176-metadata-drawer-transcription into main 2026-04-06 11:31:11 +02:00
Showing only changes of commit 03d76863cb - Show all commits

View File

@@ -124,16 +124,22 @@ function handleBlockFocus(blockId: string) {
}
}
function handleAnnotationClick(annotationId: string) {
async function handleAnnotationClick(annotationId: string) {
activeAnnotationId = annotationId;
// In transcribe mode, focus the block that owns this annotation
if (transcribeMode) {
if (!transcribeMode) {
transcribeMode = true;
await loadTranscriptionBlocks();
}
// Wait for DOM to render the blocks, then scroll to the matching one
requestAnimationFrame(() => {
const block = transcriptionBlocks.find((b) => b.annotationId === annotationId);
if (block) {
const el = document.querySelector(`[data-block-id="${block.id}"]`);
el?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
}
});
}
// Load blocks when transcribe mode is entered