fix(transcription): auto-expand comment thread when block has comments
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 1m20s
CI / Backend Unit Tests (pull_request) Failing after 2m38s
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) Failing after 1m20s
CI / Backend Unit Tests (pull_request) Failing after 2m38s
CI / E2E Tests (pull_request) Has been cancelled
Comments were only shown after clicking "Kommentieren". Now: - Load comment counts per block when blocks are loaded - Pass commentCount prop to TranscriptionBlock - If commentCount > 0, the comment thread is expanded by default - If commentCount is 0, thread stays collapsed behind the button Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ type Props = {
|
||||
saveState: SaveState;
|
||||
canComment: boolean;
|
||||
currentUserId: string | null;
|
||||
commentCount: number;
|
||||
onTextChange: (text: string) => void;
|
||||
onFocus: () => void;
|
||||
onDeleteClick: () => void;
|
||||
@@ -30,6 +31,7 @@ let {
|
||||
saveState,
|
||||
canComment,
|
||||
currentUserId,
|
||||
commentCount,
|
||||
onTextChange,
|
||||
onFocus,
|
||||
onDeleteClick,
|
||||
@@ -37,7 +39,7 @@ let {
|
||||
}: Props = $props();
|
||||
|
||||
let localText = $state(text);
|
||||
let commentOpen = $state(false);
|
||||
let commentOpen = $state(commentCount > 0);
|
||||
let selectedQuote = $state<string | null>(null);
|
||||
let textareaEl = $state<HTMLTextAreaElement | null>(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user