Skip to content

Commit

Permalink
feat(feedback): indicate error level on list (#59498)
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang committed Nov 7, 2023
1 parent b336e45 commit a06ee57
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions static/app/components/feedback/list/feedbackListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import styled from '@emotion/styled';
import ActorAvatar from 'sentry/components/avatar/actorAvatar';
import ProjectAvatar from 'sentry/components/avatar/projectAvatar';
import Checkbox from 'sentry/components/checkbox';
import ErrorLevel from 'sentry/components/events/errorLevel';
import FeedbackItemUsername from 'sentry/components/feedback/feedbackItem/feedbackItemUsername';
import useFeedbackHasReplayId from 'sentry/components/feedback/useFeedbackHasReplayId';
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
Expand All @@ -15,6 +16,7 @@ import TimeSince from 'sentry/components/timeSince';
import {IconCircleFill, IconPlay} from 'sentry/icons';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import {Level} from 'sentry/types';
import {trackAnalytics} from 'sentry/utils/analytics';
import {FeedbackIssue} from 'sentry/utils/feedback/types';
import {decodeScalar} from 'sentry/utils/queryString';
Expand Down Expand Up @@ -46,6 +48,7 @@ const FeedbackListItem = forwardRef<HTMLDivElement, Props>(

return (
<CardSpacing className={className} style={style} ref={ref}>
<GroupLevel level={feedbackItem.level} />
<LinkedFeedbackCard
data-selected={isOpen}
to={() => {
Expand Down Expand Up @@ -113,13 +116,13 @@ const FeedbackListItem = forwardRef<HTMLDivElement, Props>(
);

const CardSpacing = styled('div')`
padding: ${space(0.25)} ${space(0.5)};
padding: ${space(0.25)} ${space(1)} ${space(0.25)} 10px;
`;

const LinkedFeedbackCard = styled(Link)`
position: relative;
border-radius: ${p => p.theme.borderRadius};
padding: ${space(1)} ${space(1.5)} ${space(1)} ${space(1.5)};
padding: ${space(1)} ${space(1.5)} ${space(1)} ${space(0.75)};
color: ${p => p.theme.textColor};
&:hover {
Expand Down Expand Up @@ -149,4 +152,13 @@ const ProjectOverflow = styled('span')`
max-width: 150px;
`;

const GroupLevel = styled(ErrorLevel)<{level: Level}>`
position: absolute;
left: -2px;
top: 13px;
width: 9px;
height: 15px;
border-radius: 0 3px 3px 0;
`;

export default FeedbackListItem;

0 comments on commit a06ee57

Please sign in to comment.