From 4c7761461bf7cd6a32af60a75bc2ed75ca91ae3a Mon Sep 17 00:00:00 2001 From: Sascha Date: Fri, 19 Mar 2021 19:23:16 +0100 Subject: Add message icon with placeholder count --- webui/src/pages/list/BugRow.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'webui/src') diff --git a/webui/src/pages/list/BugRow.tsx b/webui/src/pages/list/BugRow.tsx index 8d8fb5cb..b06097ad 100644 --- a/webui/src/pages/list/BugRow.tsx +++ b/webui/src/pages/list/BugRow.tsx @@ -1,11 +1,13 @@ import React from 'react'; import { Link } from 'react-router-dom'; +import Grid from '@material-ui/core/Grid'; import TableCell from '@material-ui/core/TableCell/TableCell'; import TableRow from '@material-ui/core/TableRow/TableRow'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; import { makeStyles } from '@material-ui/core/styles'; import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline'; +import CommentOutlinedIcon from '@material-ui/icons/CommentOutlined'; import ErrorOutline from '@material-ui/icons/ErrorOutline'; import Date from 'src/components/Date'; @@ -106,6 +108,14 @@ function BugRow({ bug }: Props) { + + + + + + Count + + ); } -- cgit From 688cc33ccca5fd6653ee6f2ee2946dc30a9052ae Mon Sep 17 00:00:00 2001 From: Sascha Date: Fri, 19 Mar 2021 20:36:09 +0100 Subject: Display real number of comment --- webui/src/pages/list/BugRow.graphql | 3 +++ webui/src/pages/list/BugRow.tsx | 20 +++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'webui/src') diff --git a/webui/src/pages/list/BugRow.graphql b/webui/src/pages/list/BugRow.graphql index 547c09d8..e4e2760c 100644 --- a/webui/src/pages/list/BugRow.graphql +++ b/webui/src/pages/list/BugRow.graphql @@ -9,5 +9,8 @@ fragment BugRow on Bug { labels { ...Label } + comments { + totalCount + } ...authored } diff --git a/webui/src/pages/list/BugRow.tsx b/webui/src/pages/list/BugRow.tsx index b06097ad..f9a50487 100644 --- a/webui/src/pages/list/BugRow.tsx +++ b/webui/src/pages/list/BugRow.tsx @@ -76,6 +76,10 @@ const useStyles = makeStyles((theme) => ({ display: 'inline-block', }, }, + commentCount: { + fontSize: '1rem', + marginLeft: theme.spacing(0.5), + }, })); type Props = { @@ -84,6 +88,8 @@ type Props = { function BugRow({ bug }: Props) { const classes = useStyles(); + // Subtract 1 from totalCount as 1 comment is the bug description + const commentCount = bug.comments.totalCount - 1; return ( @@ -109,12 +115,16 @@ function BugRow({ bug }: Props) { - - - + {commentCount > 0 && ( + + + + + + {commentCount} + - Count - + )} ); -- cgit From b7ddb22558bd4b429e810157b343ee41a6575945 Mon Sep 17 00:00:00 2001 From: Sascha Date: Sat, 20 Mar 2021 14:30:10 +0100 Subject: Fixate message counter to end of bug row Previously the counter has shifted around depending on the length of the bug titles. --- webui/src/pages/list/BugRow.tsx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'webui/src') diff --git a/webui/src/pages/list/BugRow.tsx b/webui/src/pages/list/BugRow.tsx index f9a50487..1f5d22aa 100644 --- a/webui/src/pages/list/BugRow.tsx +++ b/webui/src/pages/list/BugRow.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Link } from 'react-router-dom'; -import Grid from '@material-ui/core/Grid'; import TableCell from '@material-ui/core/TableCell/TableCell'; import TableRow from '@material-ui/core/TableRow/TableRow'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; @@ -80,6 +79,9 @@ const useStyles = makeStyles((theme) => ({ fontSize: '1rem', marginLeft: theme.spacing(0.5), }, + commentCountCell: { + display: 'inline-flex', + }, })); type Props = { @@ -113,17 +115,11 @@ function BugRow({ bug }: Props) {  by {bug.author.displayName} - - {commentCount > 0 && ( - - - - - - {commentCount} - - + + + {commentCount} + )} -- cgit