From 13fb9601b3baac7cd68fb7a82fa3f3f97bcc1c3d Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 11 Jun 2024 10:44:00 +0200 Subject: [PATCH] fix up behaviour of summarize interactions --- src/common-ui/components/prompt-templates/index.tsx | 4 ++-- src/in-page-ui/tooltip/content_script/components/index.tsx | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common-ui/components/prompt-templates/index.tsx b/src/common-ui/components/prompt-templates/index.tsx index c615c30390..7331c74a05 100644 --- a/src/common-ui/components/prompt-templates/index.tsx +++ b/src/common-ui/components/prompt-templates/index.tsx @@ -441,7 +441,7 @@ const Header = styled.div` display: flex; flex-direction: row; justify-content: space-between; - padding: 15px 15px 0px 15px; + padding: 10px 15px 0px 15px; height: 30px; align-items: center; ` @@ -494,7 +494,7 @@ const Title = styled.div` ` const ContentBlock = styled.div` - padding: 5px; + padding: 0 5px 5px 5px; overflow: scroll; width: 100%; box-sizing: border-box; diff --git a/src/in-page-ui/tooltip/content_script/components/index.tsx b/src/in-page-ui/tooltip/content_script/components/index.tsx index 902fba297b..983acac650 100644 --- a/src/in-page-ui/tooltip/content_script/components/index.tsx +++ b/src/in-page-ui/tooltip/content_script/components/index.tsx @@ -147,6 +147,13 @@ class TooltipRoot extends React.Component { } setCurrentAnnotation = (annotationId: string) => { + if (!annotationId) { + this.setState({ + currentAnnotation: null, + currentAnnotationLists: [], + }) + return + } const annotation = this.props.annotationsCache.annotations.byId[ annotationId ]