feat: discussion sub-tab navigation for annotation threads (#60) #63
@@ -50,7 +50,6 @@ type Props = {
|
|||||||
activeTab: Tab;
|
activeTab: Tab;
|
||||||
activeAnnotationId: string | null;
|
activeAnnotationId: string | null;
|
||||||
activeAnnotationPage: number | null;
|
activeAnnotationPage: number | null;
|
||||||
onClearAnnotation?: () => void;
|
|
||||||
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
|
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -65,7 +64,6 @@ let {
|
|||||||
activeTab = $bindable(),
|
activeTab = $bindable(),
|
||||||
activeAnnotationId,
|
activeAnnotationId,
|
||||||
activeAnnotationPage,
|
activeAnnotationPage,
|
||||||
onClearAnnotation,
|
|
||||||
onAnnotationCommentCountChange
|
onAnnotationCommentCountChange
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
@@ -191,7 +189,6 @@ const panelHeight = $derived(open ? height : MIN_HEIGHT);
|
|||||||
canComment={canComment}
|
canComment={canComment}
|
||||||
currentUserId={currentUserId}
|
currentUserId={currentUserId}
|
||||||
canAdmin={canAdmin}
|
canAdmin={canAdmin}
|
||||||
onClearAnnotation={onClearAnnotation}
|
|
||||||
onAnnotationCommentCountChange={onAnnotationCommentCountChange}
|
onAnnotationCommentCountChange={onAnnotationCommentCountChange}
|
||||||
/>
|
/>
|
||||||
{:else if activeTab === 'history'}
|
{:else if activeTab === 'history'}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ type Props = {
|
|||||||
canComment: boolean;
|
canComment: boolean;
|
||||||
currentUserId: string | null;
|
currentUserId: string | null;
|
||||||
canAdmin: boolean;
|
canAdmin: boolean;
|
||||||
onClearAnnotation?: () => void;
|
|
||||||
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
|
onAnnotationCommentCountChange?: (annotationId: string, count: number) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -41,7 +40,6 @@ let {
|
|||||||
canComment,
|
canComment,
|
||||||
currentUserId,
|
currentUserId,
|
||||||
canAdmin,
|
canAdmin,
|
||||||
onClearAnnotation,
|
|
||||||
onAnnotationCommentCountChange
|
onAnnotationCommentCountChange
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
@@ -64,7 +62,6 @@ $effect(() => {
|
|||||||
|
|
||||||
function selectDocumentTab() {
|
function selectDocumentTab() {
|
||||||
activeSubTab = 'document';
|
activeSubTab = 'document';
|
||||||
onClearAnnotation?.();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectAnnotationTab() {
|
function selectAnnotationTab() {
|
||||||
|
|||||||
@@ -162,8 +162,4 @@ $effect(() => {
|
|||||||
bind:activeTab={activeTab}
|
bind:activeTab={activeTab}
|
||||||
activeAnnotationId={activeAnnotationId}
|
activeAnnotationId={activeAnnotationId}
|
||||||
activeAnnotationPage={activeAnnotationPage}
|
activeAnnotationPage={activeAnnotationPage}
|
||||||
onClearAnnotation={() => {
|
|
||||||
activeAnnotationId = null;
|
|
||||||
activeAnnotationPage = null;
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user