Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions static/app/views/issueDetails/groupMerged/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ describe('Issues -> Merged View', function () {
project={project}
params={{orgId: 'orgId', groupId: 'groupId'}}
location={router.location}
routeParams={{}}
route={{}}
routes={router.routes}
router={router}
/>,
{router}
);
Expand All @@ -81,10 +77,6 @@ describe('Issues -> Merged View', function () {
project={project}
params={{orgId: 'orgId', groupId: 'groupId'}}
location={router.location}
routeParams={{}}
route={{}}
routes={router.routes}
router={router}
/>,
{router}
);
Expand Down
6 changes: 3 additions & 3 deletions static/app/views/issueDetails/groupMerged/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import withOrganization from 'sentry/utils/withOrganization';

import MergedList from './mergedList';

type Props = RouteComponentProps<
{groupId: Group['id']; orgId: Organization['slug']},
{}
type Props = Pick<
RouteComponentProps<{groupId: Group['id']; orgId: Organization['slug']}, {}>,
'params' | 'location'
> & {
organization: Organization;
project: Project;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {t} from 'sentry/locale';
import type {Group} from 'sentry/types/group';
import type {Project} from 'sentry/types/project';
import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
import GroupMergedView from 'sentry/views/issueDetails/groupMerged';
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
import {FoldSection} from 'sentry/views/issueDetails/streamline/foldSection';

interface MergedIssuesDataSectionProps {
group: Group;
project: Project;
}

export function MergedIssuesDataSection({project, group}: MergedIssuesDataSectionProps) {
const organization = useOrganization();
const location = useLocation();

return (
<FoldSection
sectionKey={SectionKey.MERGED_ISSUES}
title={t('Merged Issues')}
initialCollapse
>
<GroupMergedView
project={project}
params={{
groupId: group.id,
orgId: organization.id,
}}
organization={organization}
location={location}
/>
</FoldSection>
);
}
24 changes: 2 additions & 22 deletions static/app/views/issueDetails/groupRelatedIssues/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {OrganizationFixture} from 'sentry-fixture/organization';
import {RouterFixture} from 'sentry-fixture/routerFixture';

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

Expand All @@ -9,7 +8,6 @@ describe('Related Issues View', function () {
let sameRootIssuesMock: jest.Mock;
let traceIssuesMock: jest.Mock;
let issuesMock: jest.Mock;
const router = RouterFixture();

const organization = OrganizationFixture();
const orgSlug = organization.slug;
Expand Down Expand Up @@ -85,16 +83,7 @@ describe('Related Issues View', function () {
body: issuesData,
});

render(
<GroupRelatedIssues
params={params}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>
);
render(<GroupRelatedIssues params={params} />);

// Wait for the issues showing up on the table
expect(await screen.findByText(`EARTH-${group1}`)).toBeInTheDocument();
Expand Down Expand Up @@ -123,16 +112,7 @@ describe('Related Issues View', function () {
url: orgIssuesEndpoint,
body: issuesData,
});
render(
<GroupRelatedIssues
params={params}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>
);
render(<GroupRelatedIssues params={params} />);

// Wait for the issues showing up on the table
expect(await screen.findByText(`EARTH-${group1}`)).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type RouteParams = {
groupId: string;
};

type Props = RouteComponentProps<RouteParams, {}>;
type Props = Pick<RouteComponentProps<RouteParams, {}>, 'params'>;

type RelatedIssuesResponse = {
data: number[];
Expand Down
36 changes: 0 additions & 36 deletions static/app/views/issueDetails/groupSimilarIssues/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ describe('Issues Similar View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand All @@ -98,10 +94,6 @@ describe('Issues Similar View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down Expand Up @@ -131,10 +123,6 @@ describe('Issues Similar View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down Expand Up @@ -162,10 +150,6 @@ describe('Issues Similar View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down Expand Up @@ -239,10 +223,6 @@ describe('Issues Similar Embeddings View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand All @@ -269,10 +249,6 @@ describe('Issues Similar Embeddings View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down Expand Up @@ -302,10 +278,6 @@ describe('Issues Similar Embeddings View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand All @@ -325,10 +297,6 @@ describe('Issues Similar Embeddings View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down Expand Up @@ -362,10 +330,6 @@ describe('Issues Similar Embeddings View', function () {
project={project}
params={{orgId: 'org-slug', groupId: 'group-id'}}
location={router.location}
router={router}
routeParams={router.params}
routes={router.routes}
route={{}}
/>,
{router}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {t} from 'sentry/locale';
import type {Group} from 'sentry/types/group';
import type {Project} from 'sentry/types/project';
import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
import GroupSimilarIssues from 'sentry/views/issueDetails/groupSimilarIssues';
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
import {FoldSection} from 'sentry/views/issueDetails/streamline/foldSection';

interface SimilarIssuesDataSectionProps {
group: Group;
project: Project;
}

export function SimilarIssuesDataSection({
project,
group,
}: SimilarIssuesDataSectionProps) {
const organization = useOrganization();
const location = useLocation();

return (
<FoldSection
sectionKey={SectionKey.SIMILAR_ISSUES}
title={t('Similar Issues')}
initialCollapse
>
<GroupSimilarIssues
location={location}
params={{
groupId: group.id,
orgId: organization.id,
}}
project={project}
/>
</FoldSection>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type RouteParams = {
orgId: string;
};

type Props = RouteComponentProps<RouteParams, {}> & {
type Props = Pick<RouteComponentProps<RouteParams, {}>, 'params' | 'location'> & {
location: Location;
project: Project;
};
Expand Down
71 changes: 69 additions & 2 deletions static/app/views/issueDetails/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {useIssueDetailsHeader} from 'sentry/views/issueDetails/useIssueDetailsHe

import GroupActions from './actions';
import {Tab} from './types';
import type {ReprocessingStatus} from './utils';
import {type ReprocessingStatus, useHasStreamlinedUI} from './utils';

type Props = {
baseUrl: string;
Expand All @@ -63,6 +63,7 @@ export function GroupHeaderTabs({
}: GroupHeaderTabsProps) {
const organization = useOrganization();
const location = useLocation();
const hasStreamlinedUI = useHasStreamlinedUI();

const {getReplayCountForIssue} = useReplayCountForIssues({
statsPeriod: '90d',
Expand Down Expand Up @@ -94,7 +95,73 @@ export function GroupHeaderTabs({
}
}, [group.issueType, organization]);

return (
return hasStreamlinedUI ? (
<StyledTabList hideBorder>
<TabList.Item
key={Tab.DETAILS}
disabled={disabledTabs.includes(Tab.DETAILS)}
to={`${baseUrl}${location.search}`}
>
{t('Details')}
</TabList.Item>
<TabList.Item
key={Tab.ACTIVITY}
textValue={t('Activity')}
disabled={disabledTabs.includes(Tab.ACTIVITY)}
to={{pathname: `${baseUrl}activity/`, query: queryParams}}
>
{t('Activity')}
<IconBadge>
{group.numComments}
<IconChat size="xs" />
</IconBadge>
</TabList.Item>
<TabList.Item
key={Tab.USER_FEEDBACK}
textValue={t('User Feedback')}
hidden={!issueTypeConfig.userFeedback.enabled}
disabled={disabledTabs.includes(Tab.USER_FEEDBACK)}
to={{pathname: `${baseUrl}feedback/`, query: queryParams}}
>
{t('User Feedback')} <Badge text={group.userReportCount} />
</TabList.Item>
<TabList.Item
key={Tab.ATTACHMENTS}
hidden={!hasEventAttachments || !issueTypeConfig.attachments.enabled}
disabled={disabledTabs.includes(Tab.ATTACHMENTS)}
to={{pathname: `${baseUrl}attachments/`, query: queryParams}}
>
{t('Attachments')}
</TabList.Item>
<TabList.Item
key={Tab.TAGS}
hidden={!issueTypeConfig.tags.enabled}
disabled={disabledTabs.includes(Tab.TAGS)}
to={{pathname: `${baseUrl}tags/`, query: queryParams}}
>
{t('Tags')}
</TabList.Item>
<TabList.Item
key={Tab.EVENTS}
hidden={!issueTypeConfig.events.enabled}
disabled={disabledTabs.includes(Tab.EVENTS)}
to={eventRoute}
>
{group.issueCategory === IssueCategory.ERROR
? t('All Events')
: t('Sampled Events')}
</TabList.Item>
<TabList.Item
key={Tab.REPLAYS}
textValue={t('Replays')}
hidden={!hasReplaySupport || !issueTypeConfig.replays.enabled}
to={{pathname: `${baseUrl}replays/`, query: queryParams}}
>
{t('Replays')}
<ReplayCountBadge count={replaysCount} />
</TabList.Item>
</StyledTabList>
) : (
<StyledTabList hideBorder>
<TabList.Item
key={Tab.DETAILS}
Expand Down
3 changes: 3 additions & 0 deletions static/app/views/issueDetails/streamline/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const enum SectionKey {
PROCESSING_ERROR = 'processing-error',
RRWEB = 'rrweb', // Legacy integration prior to replays

MERGED_ISSUES = 'merged',
SIMILAR_ISSUES = 'similar',

REGRESSION_SUMMARY = 'regression-summary',
REGRESSION_BREAKPOINT_CHART = 'regression-breakpoint-chart',
REGRESSION_FLAMEGRAPH = 'regression-flamegraph',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ProjectsStore from 'sentry/stores/projectsStore';
import {EventDetails} from 'sentry/views/issueDetails/streamline/eventDetails';

jest.mock('sentry/views/issueDetails/groupEventDetails/groupEventDetailsContent');
jest.mock('sentry/views/issueDetails/streamline/issueContent');
jest.mock('screenfull', () => ({
enabled: true,
isFullscreen: false,
Expand Down
Loading
Loading