aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/pages')
-rw-r--r--webui/src/pages/bug/CommentForm.tsx26
-rw-r--r--webui/src/pages/list/BugRow.tsx2
2 files changed, 23 insertions, 5 deletions
diff --git a/webui/src/pages/bug/CommentForm.tsx b/webui/src/pages/bug/CommentForm.tsx
index 1a7ebc29..6d917889 100644
--- a/webui/src/pages/bug/CommentForm.tsx
+++ b/webui/src/pages/bug/CommentForm.tsx
@@ -5,9 +5,10 @@ import Paper from '@material-ui/core/Paper';
import { makeStyles, Theme } from '@material-ui/core/styles';
import CommentInput from '../../components/CommentInput/CommentInput';
-import CloseBugButton from 'src/components/CloseBugButton/CloseBugButton';
-import CloseBugWithCommentButton from 'src/components/CloseBugWithCommentButton/CloseBugWithCommentButton';
-import ReopenBugButton from 'src/components/ReopenBugButton/ReopenBugButton';
+import CloseBugButton from 'src/components/CloseBugButton';
+import CloseBugWithCommentButton from 'src/components/CloseBugWithCommentButton';
+import ReopenBugButton from 'src/components/ReopenBugButton';
+import ReopenBugWithCommentButton from 'src/components/ReopenBugWithCommentButton';
import { BugFragment } from './Bug.generated';
import { useAddCommentMutation } from './CommentForm.generated';
@@ -80,12 +81,27 @@ function CommentForm({ bug }: Props) {
function getBugStatusButton() {
if (bug.status === 'OPEN' && issueComment.length > 0) {
- return <CloseBugWithCommentButton bug={bug} comment={issueComment} />;
+ return (
+ <CloseBugWithCommentButton
+ bug={bug}
+ comment={issueComment}
+ postClick={resetForm}
+ />
+ );
}
if (bug.status === 'OPEN') {
return <CloseBugButton bug={bug} />;
}
- return <ReopenBugButton bug={bug} disabled={issueComment.length > 0} />;
+ if (bug.status === 'CLOSED' && issueComment.length > 0) {
+ return (
+ <ReopenBugWithCommentButton
+ bug={bug}
+ comment={issueComment}
+ postClick={resetForm}
+ />
+ );
+ }
+ return <ReopenBugButton bug={bug} />;
}
return (
diff --git a/webui/src/pages/list/BugRow.tsx b/webui/src/pages/list/BugRow.tsx
index 562149f3..68a3b299 100644
--- a/webui/src/pages/list/BugRow.tsx
+++ b/webui/src/pages/list/BugRow.tsx
@@ -84,7 +84,9 @@ const useStyles = makeStyles((theme) => ({
},
commentCount: {
fontSize: '1rem',
+ minWidth: '2rem',
marginLeft: theme.spacing(0.5),
+ marginRight: theme.spacing(1),
},
commentCountCell: {
display: 'inline-flex',