From bc20a56f6ebdd98c114462d8d6dca0faa8489c15 Mon Sep 17 00:00:00 2001 From: Sergio Vela Pelegrina Date: Thu, 2 Jun 2022 14:27:28 +0200 Subject: [PATCH 1/4] DEV-14814 Display an information message when creating an annotation that is filtered --- src/ui/comment/CommentCardContent.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ui/comment/CommentCardContent.tsx b/src/ui/comment/CommentCardContent.tsx index 33013c4..378ccae 100644 --- a/src/ui/comment/CommentCardContent.tsx +++ b/src/ui/comment/CommentCardContent.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Block, + CompactStateMessage, Flex, Icon, Label, @@ -111,6 +112,21 @@ function CommentCardContent({ ); } + if (reviewAnnotation.isFiltered) { + return ( + + + + + + ); + } if ( reviewAnnotation.isLoading && reviewAnnotation.busyState === ReviewBusyState.REFRESHING From 2eb03368de4ff2ebf8593e2f7d5941e5e73cec09 Mon Sep 17 00:00:00 2001 From: Thomas Brekelmans Date: Wed, 1 Jun 2022 11:40:24 +0200 Subject: [PATCH 2/4] DEV-14814 Improve logic in card UI for displaying different states based on the annotation.status --- src/ui/shared/CardHeader.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/shared/CardHeader.tsx b/src/ui/shared/CardHeader.tsx index 5159c52..ec24e11 100644 --- a/src/ui/shared/CardHeader.tsx +++ b/src/ui/shared/CardHeader.tsx @@ -75,7 +75,8 @@ export default function CardHeader({ const showEditButton = context !== FeedbackContextType.CREATED_CONTEXT && context !== FeedbackContextType.RESOLVED_CONTEXT && - reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED; + reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED && + reviewAnnotation.status !== ReviewAnnotationStatus.ARCHIVED; const showRemoveButton = context !== FeedbackContextType.CREATED_CONTEXT && @@ -239,6 +240,7 @@ export default function CardHeader({ reviewAnnotation.busyState !== ReviewBusyState.EDITING && reviewAnnotation.status !== ReviewAnnotationStatus.PRIVATE && reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED && + reviewAnnotation.status !== ReviewAnnotationStatus.ARCHIVED && context !== FeedbackContextType.CREATED_CONTEXT && context !== FeedbackContextType.RESOLVED_CONTEXT; From 75b91516d0975099c052a41a55a2104408e532d7 Mon Sep 17 00:00:00 2001 From: Alberto Silvestre Montes Linares Date: Tue, 7 Jun 2022 18:14:45 +0200 Subject: [PATCH 3/4] DEV-14814 Set filtering message for proposals --- src/ui/comment/CommentCardContent.tsx | 2 ++ src/ui/proposal/ProposalCardContent.tsx | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/ui/comment/CommentCardContent.tsx b/src/ui/comment/CommentCardContent.tsx index 378ccae..fdd03c2 100644 --- a/src/ui/comment/CommentCardContent.tsx +++ b/src/ui/comment/CommentCardContent.tsx @@ -112,6 +112,7 @@ function CommentCardContent({ ); } + if (reviewAnnotation.isFiltered) { return ( @@ -127,6 +128,7 @@ function CommentCardContent({ ); } + if ( reviewAnnotation.isLoading && reviewAnnotation.busyState === ReviewBusyState.REFRESHING diff --git a/src/ui/proposal/ProposalCardContent.tsx b/src/ui/proposal/ProposalCardContent.tsx index 49f4885..cf59134 100644 --- a/src/ui/proposal/ProposalCardContent.tsx +++ b/src/ui/proposal/ProposalCardContent.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Block, + CompactStateMessage, Diff, Flex, HorizontalSeparationLine, @@ -119,6 +120,22 @@ function ProposalCardContent({ ); } + if (reviewAnnotation.isFiltered) { + return ( + + + + + + ); + } + if ( reviewAnnotation.isLoading && reviewAnnotation.busyState === ReviewBusyState.REFRESHING From 849afef00a819dd5f5fa5e9e65abd83a296313a4 Mon Sep 17 00:00:00 2001 From: Alberto Silvestre Montes Linares Date: Wed, 8 Jun 2022 12:09:02 +0200 Subject: [PATCH 4/4] Removing unnecessary code --- src/ui/shared/CardHeader.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ui/shared/CardHeader.tsx b/src/ui/shared/CardHeader.tsx index ec24e11..5159c52 100644 --- a/src/ui/shared/CardHeader.tsx +++ b/src/ui/shared/CardHeader.tsx @@ -75,8 +75,7 @@ export default function CardHeader({ const showEditButton = context !== FeedbackContextType.CREATED_CONTEXT && context !== FeedbackContextType.RESOLVED_CONTEXT && - reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED && - reviewAnnotation.status !== ReviewAnnotationStatus.ARCHIVED; + reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED; const showRemoveButton = context !== FeedbackContextType.CREATED_CONTEXT && @@ -240,7 +239,6 @@ export default function CardHeader({ reviewAnnotation.busyState !== ReviewBusyState.EDITING && reviewAnnotation.status !== ReviewAnnotationStatus.PRIVATE && reviewAnnotation.status !== ReviewAnnotationStatus.RESOLVED && - reviewAnnotation.status !== ReviewAnnotationStatus.ARCHIVED && context !== FeedbackContextType.CREATED_CONTEXT && context !== FeedbackContextType.RESOLVED_CONTEXT;