|
@@ -5,9 +5,11 @@ import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicato
|
|
|
import {NoteBody} from 'sentry/components/activity/note/body';
|
|
|
import {NoteInputWithStorage} from 'sentry/components/activity/note/inputWithStorage';
|
|
|
import {Button} from 'sentry/components/button';
|
|
|
+import {Flex} from 'sentry/components/container/flex';
|
|
|
import useMutateActivity from 'sentry/components/feedback/useMutateActivity';
|
|
|
import Timeline from 'sentry/components/timeline';
|
|
|
import TimeSince from 'sentry/components/timeSince';
|
|
|
+import {Tooltip} from 'sentry/components/tooltip';
|
|
|
import {IconEllipsis} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import GroupStore from 'sentry/stores/groupStore';
|
|
@@ -43,7 +45,7 @@ function TimelineItem({
|
|
|
item,
|
|
|
organization,
|
|
|
group.project.id,
|
|
|
- <Author>{authorName}</Author>,
|
|
|
+ <strong>{authorName}</strong>,
|
|
|
teams
|
|
|
);
|
|
|
|
|
@@ -52,16 +54,16 @@ function TimelineItem({
|
|
|
return (
|
|
|
<ActivityTimelineItem
|
|
|
title={
|
|
|
- <TitleWrapper>
|
|
|
- {title}
|
|
|
- <NoteDropdownWrapper>
|
|
|
- {item.type === GroupActivityType.NOTE && (
|
|
|
- <NoteDropdown onDelete={() => handleDelete(item)} user={item.user} />
|
|
|
- )}
|
|
|
- </NoteDropdownWrapper>
|
|
|
- </TitleWrapper>
|
|
|
+ <Flex gap={space(0.5)} align="center" justify="flex-start">
|
|
|
+ <TitleTooltip title={title} showOnlyOnOverflow skipWrapper>
|
|
|
+ {title}
|
|
|
+ </TitleTooltip>
|
|
|
+ {item.type === GroupActivityType.NOTE && (
|
|
|
+ <TitleDropdown onDelete={() => handleDelete(item)} user={item.user} />
|
|
|
+ )}
|
|
|
+ </Flex>
|
|
|
}
|
|
|
- timestamp={<SmallTimestamp date={item.dateCreated} />}
|
|
|
+ timestamp={<Timestamp date={item.dateCreated} tooltipProps={{skipWrapper: true}} />}
|
|
|
icon={
|
|
|
Icon && (
|
|
|
<Icon {...groupActivityTypeIconMapping[item.type].defaultProps} size="xs" />
|
|
@@ -136,14 +138,14 @@ export default function StreamlinedActivitySection({group}: {group: Group}) {
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
- <TitleSection>
|
|
|
+ <Flex justify="space-between" align="center">
|
|
|
<SidebarSectionTitle>{t('Activity')}</SidebarSectionTitle>
|
|
|
{showAll && (
|
|
|
- <CollapseButton borderless size="zero" onClick={() => setShowAll(false)}>
|
|
|
+ <TextButton borderless size="zero" onClick={() => setShowAll(false)}>
|
|
|
{t('Collapse')}
|
|
|
- </CollapseButton>
|
|
|
+ </TextButton>
|
|
|
)}
|
|
|
- </TitleSection>
|
|
|
+ </Flex>
|
|
|
<Timeline.Container>
|
|
|
<NoteInputWithStorage
|
|
|
key={inputId}
|
|
@@ -183,16 +185,16 @@ export default function StreamlinedActivitySection({group}: {group: Group}) {
|
|
|
})}
|
|
|
<ActivityTimelineItem
|
|
|
title={
|
|
|
- <ShowAllButton
|
|
|
+ <TextButton
|
|
|
aria-label={t('Show all activity')}
|
|
|
onClick={() => setShowAll(true)}
|
|
|
borderless
|
|
|
size="zero"
|
|
|
>
|
|
|
{t('%s activities hidden', group.activity.length - 3)}
|
|
|
- </ShowAllButton>
|
|
|
+ </TextButton>
|
|
|
}
|
|
|
- icon={<RotatedEllipsisIcon />}
|
|
|
+ icon={<RotatedEllipsisIcon direction={'up'} />}
|
|
|
/>
|
|
|
<TimelineItem
|
|
|
item={group.activity[group.activity.length - 1]}
|
|
@@ -208,46 +210,33 @@ export default function StreamlinedActivitySection({group}: {group: Group}) {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-const Author = styled('span')`
|
|
|
- font-weight: ${p => p.theme.fontWeightBold};
|
|
|
+const TitleTooltip = styled(Tooltip)`
|
|
|
+ justify-self: start;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
`;
|
|
|
|
|
|
-const NoteDropdownWrapper = styled('span')`
|
|
|
+const TitleDropdown = styled(NoteDropdown)`
|
|
|
font-weight: normal;
|
|
|
`;
|
|
|
|
|
|
-const TitleWrapper = styled('div')`
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: ${space(0.5)};
|
|
|
-`;
|
|
|
-
|
|
|
const ActivityTimelineItem = styled(Timeline.Item)`
|
|
|
align-items: center;
|
|
|
+ grid-template-columns: 22px minmax(50px, 1fr) auto;
|
|
|
`;
|
|
|
|
|
|
-const SmallTimestamp = styled(TimeSince)`
|
|
|
- font-size: ${p => p.theme.fontSizeSmall};
|
|
|
-`;
|
|
|
-
|
|
|
-const ShowAllButton = styled(Button)`
|
|
|
+const Timestamp = styled(TimeSince)`
|
|
|
font-size: ${p => p.theme.fontSizeSmall};
|
|
|
- color: ${p => p.theme.subText};
|
|
|
- font-weight: ${p => p.theme.fontWeightNormal};
|
|
|
-`;
|
|
|
-
|
|
|
-const TitleSection = styled('div')`
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
+ white-space: nowrap;
|
|
|
`;
|
|
|
|
|
|
-const CollapseButton = styled(Button)`
|
|
|
+const TextButton = styled(Button)`
|
|
|
font-weight: ${p => p.theme.fontWeightNormal};
|
|
|
- color: ${p => p.theme.subText};
|
|
|
font-size: ${p => p.theme.fontSizeSmall};
|
|
|
+ color: ${p => p.theme.subText};
|
|
|
`;
|
|
|
|
|
|
const RotatedEllipsisIcon = styled(IconEllipsis)`
|
|
|
- transform: rotate(90deg);
|
|
|
+ transform: rotate(90deg) translateY(1px);
|
|
|
`;
|