Skip to content

Commit 93a226c

Browse files
authored
feat(issues): GA streamlined issue actions, backport to old ui (#105863)
Replaces the old issue ui actions with the new issue actions UI which lets us clean up a bunch of duplicate code we had to support both UIs. Fixes a bug where they would overflow after a change in #99177 <img width="374" height="204" alt="image" src="https://github.com/user-attachments/assets/900f0d4b-b22a-4e28-b213-54139ae7f955" /> old issue ui before <img width="369" height="273" alt="image" src="https://github.com/user-attachments/assets/2467715e-1182-4ce8-989b-c093812caab6" /> old issue ui after <img width="364" height="117" alt="image" src="https://github.com/user-attachments/assets/474d93b9-83c0-4693-8cbd-0a848cc88e23" /> old issue ui empty state after <img width="371" height="139" alt="image" src="https://github.com/user-attachments/assets/f6a40220-fe37-4e52-aa76-f0abf367fdbf" />
1 parent 86b417b commit 93a226c

21 files changed

+147
-1191
lines changed

static/app/components/externalIssues/externalIssueForm.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {OrganizationFixture} from 'sentry-fixture/organization';
44

55
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
66

7-
import ExternalIssueForm from 'sentry/components/externalIssues/externalIssueForm';
7+
import {ExternalIssueForm} from 'sentry/components/externalIssues/externalIssueForm';
88
import {
99
makeClosableHeader,
1010
makeCloseButton,

static/app/components/externalIssues/externalIssueForm.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {Span} from '@sentry/core';
44
import * as Sentry from '@sentry/react';
55

66
import {addSuccessMessage} from 'sentry/actionCreators/indicator';
7-
import type {ModalRenderProps} from 'sentry/actionCreators/modal';
7+
import {openModal, type ModalRenderProps} from 'sentry/actionCreators/modal';
88
import type {RequestOptions, ResponseMeta} from 'sentry/api';
99
import {TabList, Tabs} from 'sentry/components/core/tabs';
1010
import {ExternalForm} from 'sentry/components/externalIssues/externalForm';
@@ -26,11 +26,13 @@ import {t, tct} from 'sentry/locale';
2626
import {space} from 'sentry/styles/space';
2727
import type {Group} from 'sentry/types/group';
2828
import type {
29+
GroupIntegration,
2930
Integration,
3031
IntegrationExternalIssue,
3132
IntegrationIssueConfig,
3233
IssueConfigField,
3334
} from 'sentry/types/integrations';
35+
import type {Organization} from 'sentry/types/organization';
3436
import {trackAnalytics} from 'sentry/utils/analytics';
3537
import {getAnalyticsDataForGroup} from 'sentry/utils/events';
3638
import {
@@ -42,6 +44,32 @@ import {
4244
import useApi from 'sentry/utils/useApi';
4345
import useOrganization from 'sentry/utils/useOrganization';
4446

47+
export const openExternalIssueModal = ({
48+
group,
49+
integration,
50+
onChange,
51+
organization,
52+
}: {
53+
group: Group;
54+
integration: GroupIntegration;
55+
onChange: () => void;
56+
organization: Organization;
57+
}) => {
58+
trackAnalytics('issue_details.external_issue_modal_opened', {
59+
organization,
60+
...getAnalyticsDataForGroup(group),
61+
external_issue_provider: integration.provider.key,
62+
external_issue_type: 'first_party',
63+
});
64+
65+
openModal(
66+
deps => (
67+
<ExternalIssueForm {...deps} {...{group, onChange, integration, organization}} />
68+
),
69+
{closeEvents: 'escape-key'}
70+
);
71+
};
72+
4573
const MESSAGES_BY_ACTION = {
4674
link: t('Successfully linked issue.'),
4775
create: t('Successfully created issue.'),
@@ -75,7 +103,7 @@ function makeIntegrationIssueConfigQueryKey({
75103
];
76104
}
77105

78-
export default function ExternalIssueForm({
106+
export function ExternalIssueForm({
79107
group,
80108
integration,
81109
onChange,

static/app/components/feedback/feedbackItem/feedbackItemHeader.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ export default function FeedbackItemHeader({
6767
{eventData && feedbackItem.project ? (
6868
<ErrorBoundary mini>
6969
<Flex wrap="wrap" justify="between" align="center" gap="md">
70-
<StreamlinedExternalIssueList
71-
group={feedbackItem as unknown as Group}
72-
project={feedbackItem.project}
73-
event={eventData}
74-
/>
70+
<Flex direction="row" gap="md">
71+
<StreamlinedExternalIssueList
72+
group={feedbackItem as unknown as Group}
73+
project={feedbackItem.project}
74+
event={eventData}
75+
/>
76+
</Flex>
7577
{feedbackItem.seenBy.length ? (
7678
<Flex justify="end">
7779
<Flex gap="md" align="center">

static/app/components/group/externalIssuesList/externalIssueActions.spec.tsx

Lines changed: 0 additions & 120 deletions
This file was deleted.

static/app/components/group/externalIssuesList/externalIssueActions.tsx

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)