Skip to content

Commit

Permalink
feat(feedback): show IconImage on feedback list if it has a screenshot (
Browse files Browse the repository at this point in the history
#70109)

closes #67795
follow up to #70102 (the backend
changes)

<img width="672" alt="SCR-20240501-oexu"
src="https://github.com/getsentry/sentry/assets/56095982/3984ab3d-c919-4891-b6c9-439066525907">
  • Loading branch information
michellewzhang authored May 3, 2024
1 parent 5d13a0c commit abfe531
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion static/app/components/feedback/list/feedbackListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {Flex} from 'sentry/components/profiling/flex';
import TextOverflow from 'sentry/components/textOverflow';
import TimeSince from 'sentry/components/timeSince';
import {Tooltip} from 'sentry/components/tooltip';
import {IconChat, IconCircleFill, IconFatal, IconPlay} from 'sentry/icons';
import {IconChat, IconCircleFill, IconFatal, IconImage, IconPlay} from 'sentry/icons';
import {t} from 'sentry/locale';
import ConfigStore from 'sentry/stores/configStore';
import {useLegacyStore} from 'sentry/stores/useLegacyStore';
Expand Down Expand Up @@ -55,6 +55,7 @@ const FeedbackListItem = forwardRef<HTMLDivElement, Props>(

const isCrashReport = feedbackItem.metadata.source === 'crash_report_embed_form';
const isUserReportWithError = feedbackItem.metadata.source === 'user_report_envelope';
const hasAttachments = feedbackItem.hasAttachments;
const hasComments = feedbackItem.numComments > 0;
const theme = isOpen || config.theme === 'dark' ? darkTheme : lightTheme;

Expand Down Expand Up @@ -149,6 +150,12 @@ const FeedbackListItem = forwardRef<HTMLDivElement, Props>(
</Tooltip>
)}

{hasAttachments && (
<Tooltip title={t('Has Screenshot')} containerDisplayMode="flex">
<IconImage size="xs" />
</Tooltip>
)}

{feedbackItem.assignedTo && (
<ActorAvatar
actor={feedbackItem.assignedTo}
Expand Down
1 change: 1 addition & 0 deletions static/app/components/feedback/useFeedbackListQueryKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default function useFeedbackListQueryKey({
'pluginIssues', // Gives us plugin issues available
'integrationIssues', // Gives us integration issues available
'sentryAppIssues', // Gives us Sentry app issues available
'hasAttachments', // Gives us whether the feedback has screenshots
],
shortIdLookup: 0,
query: `issue.category:feedback status:${mailbox} ${fixedQueryView.query}`,
Expand Down
1 change: 1 addition & 0 deletions static/app/types/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ export interface BaseGroup {
title: string;
type: EventOrGroupType;
userReportCount: number;
hasAttachments?: boolean;
inbox?: InboxDetails | null | false;
integrationIssues?: ExternalIssue[];
latestEvent?: Event;
Expand Down

0 comments on commit abfe531

Please sign in to comment.