Skip to content

Commit

Permalink
Merge pull request #165 from JSv4/JSv4/fixed-clicking-corpus-query-so…
Browse files Browse the repository at this point in the history
…urce

Fix Corpus Query Source Action
  • Loading branch information
JSv4 authored Jul 19, 2024
2 parents 1198529 + 6f53378 commit e7be2db
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
8 changes: 0 additions & 8 deletions frontend/src/components/annotator/DocumentAnnotator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,6 @@ export const DocumentAnnotator = ({
})
);
console.log("display_annotations", display_annotations);
console.log(
"Edges",
display_annotations[0].sourceNodeInRelationships.edges
);
console.log(
"Edges",
display_annotations[0].targetNodeInRelationships.edges
);

// Build relationship_annotations
const uniqueRelationships = [
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/queries/QueryResultsViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const QueryResultsViewer: React.FC<QueryResultsViewerProps> = ({
displayAnnotationOnAnnotatorLoad(viewSourceAnnotation);
selectedAnnotation(viewSourceAnnotation);
openedDocument(viewSourceAnnotation.document);
setViewSourceAnnotation(null);
onlyDisplayTheseAnnotations([viewSourceAnnotation]);
setViewSourceAnnotation(null);
}
}, [viewSourceAnnotation]);

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/graphql/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const showDeleteDocumentsModal = makeVar<boolean>(false);
export const showNewLabelsetModal = makeVar<boolean>(false);
export const showExportModal = makeVar<boolean>(false);
// if this is true, only render the currently selected annotation.
export const showSelectedAnnotationOnly = makeVar<boolean>(false);
export const showSelectedAnnotationOnly = makeVar<boolean>(true);
// if this is false, don't render <SelectionBoundary> elements so you only see tokens. Cleaner for complex annotations.
export const showAnnotationBoundingBoxes = makeVar<boolean>(false);
// Show Labels toggle (if false, don't show labels)
Expand Down
14 changes: 14 additions & 0 deletions frontend/src/graphql/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ export const GET_CORPUS_QUERY_DETAILS = gql`
}
}
}
targetNodeInRelationships {
edges {
node {
id
}
}
}
tokensJsons
document {
id
Expand Down Expand Up @@ -892,6 +899,13 @@ export const REQUEST_ANNOTATOR_DATA_FOR_DOCUMENT_IN_CORPUS = gql`
}
}
}
targetNodeInRelationships {
edges {
node {
id
}
}
}
creator {
id
email
Expand Down

0 comments on commit e7be2db

Please sign in to comment.