diff options
author | Sascha <GlancingMind@outlook.com> | 2021-03-20 11:04:17 +0100 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-03-20 11:14:13 +0100 |
commit | 4c5a0f37f7979d29fa077c0cfcd9be936c8fc0bd (patch) | |
tree | 660c494fa48f865a49e33aa2d3597ad96e60789d /webui/src | |
parent | 6f26afb74f169a56270d8667a4092901324df2e3 (diff) | |
download | git-bug-4c5a0f37f7979d29fa077c0cfcd9be936c8fc0bd.tar.gz |
Improve message history accordions
- Add unfold icon to edit history accordions
- Change order of edit number. Most recent should have highest id and initial
description should always have "#1 Edit"
- Add "(Initial description)' to title of the first comment version
Diffstat (limited to 'webui/src')
-rw-r--r-- | webui/src/pages/bug/MessageHistoryDialog.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webui/src/pages/bug/MessageHistoryDialog.tsx b/webui/src/pages/bug/MessageHistoryDialog.tsx index 9d1578b2..139eb4a5 100644 --- a/webui/src/pages/bug/MessageHistoryDialog.tsx +++ b/webui/src/pages/bug/MessageHistoryDialog.tsx @@ -20,6 +20,7 @@ import { WithStyles, } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; +import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { AddCommentFragment } from './MessageCommentFragment.generated'; import { CreateFragment } from './MessageCreateFragment.generated'; @@ -199,15 +200,17 @@ function MessageHistoryDialog({ bugId, commentId, open, onClose }: Props) { onChange={handleChange('panel' + index)} > <AccordionSummary + expandIcon={<ExpandMoreIcon />} aria-controls="panel1d-content" id="panel1d-header" > <Typography> - {`#${index + 1} • Edited `} + {`#${history?.length - index} • Edited `} <Tooltip title={moment(edit.date).format('LLLL')}> <Moment date={edit.date} format="on ll" /> </Tooltip> {index === 0 && ' (most recent edit)'} + {index === history?.length - 1 && ' (Initial description)'} </Typography> </AccordionSummary> <AccordionDetails>{edit.message}</AccordionDetails> |