Skip to content

Commit 86a2ec4

Browse files
authored
feat(issues): Remove router props from issue list (#100903)
Removes the deprecated router props and their corresponding types from the issues list. They were mostly already unused. part of getsentry/frontend-tsc#93
1 parent 3d35224 commit 86a2ec4

File tree

9 files changed

+44
-100
lines changed

9 files changed

+44
-100
lines changed

static/app/routes.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,39 +2579,32 @@ function buildRoutes(): RouteObject[] {
25792579
{
25802580
index: true,
25812581
component: errorHandler(OverviewWrapper),
2582-
deprecatedRouteProps: true,
25832582
},
25842583
{
25852584
path: `${IssueTaxonomy.ERRORS_AND_OUTAGES}/`,
25862585
component: make(() => import('sentry/views/issueList/pages/errorsOutages')),
2587-
deprecatedRouteProps: true,
25882586
},
25892587
{
25902588
path: `${IssueTaxonomy.BREACHED_METRICS}/`,
25912589
component: make(() => import('sentry/views/issueList/pages/breachedMetrics')),
2592-
deprecatedRouteProps: true,
25932590
},
25942591
{
25952592
path: `${IssueTaxonomy.WARNINGS}/`,
25962593
component: make(() => import('sentry/views/issueList/pages/warnings')),
2597-
deprecatedRouteProps: true,
25982594
},
25992595
{
26002596
path: 'views/',
26012597
component: make(
26022598
() => import('sentry/views/issueList/issueViews/issueViewsList/issueViewsList')
26032599
),
2604-
deprecatedRouteProps: true,
26052600
},
26062601
{
26072602
path: 'views/:viewId/',
26082603
component: errorHandler(OverviewWrapper),
2609-
deprecatedRouteProps: true,
26102604
},
26112605
{
26122606
path: 'searches/:searchId/',
26132607
component: errorHandler(OverviewWrapper),
2614-
deprecatedRouteProps: true,
26152608
},
26162609
// Redirects for legacy tags route.
26172610
{

static/app/views/issueList/overview.actions.spec.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {Fragment} from 'react';
22
import {GroupFixture} from 'sentry-fixture/group';
33
import {GroupStatsFixture} from 'sentry-fixture/groupStats';
44
import {OrganizationFixture} from 'sentry-fixture/organization';
5-
import {RouteComponentPropsFixture} from 'sentry-fixture/routeComponentPropsFixture';
65

76
import {
87
render,
@@ -84,8 +83,6 @@ describe('IssueListOverview (actions)', () => {
8483
TagStore.init?.();
8584
});
8685

87-
const defaultProps = RouteComponentPropsFixture();
88-
8986
describe('status', () => {
9087
const group1 = GroupFixture({
9188
id: '1',
@@ -123,7 +120,7 @@ describe('IssueListOverview (actions)', () => {
123120
method: 'PUT',
124121
});
125122

126-
render(<IssueListOverview {...defaultProps} />, {organization});
123+
render(<IssueListOverview />, {organization});
127124

128125
const groups = await screen.findAllByTestId('group');
129126

@@ -161,7 +158,7 @@ describe('IssueListOverview (actions)', () => {
161158
method: 'PUT',
162159
});
163160

164-
render(<IssueListOverview {...defaultProps} />, {
161+
render(<IssueListOverview />, {
165162
organization,
166163

167164
initialRouterConfig: {
@@ -223,7 +220,7 @@ describe('IssueListOverview (actions)', () => {
223220

224221
render(
225222
<Fragment>
226-
<IssueListOverview {...defaultProps} />
223+
<IssueListOverview />
227224
<Indicators />
228225
</Fragment>,
229226
{organization}
@@ -311,7 +308,7 @@ describe('IssueListOverview (actions)', () => {
311308
method: 'PUT',
312309
});
313310

314-
render(<IssueListOverview {...defaultProps} />, {
311+
render(<IssueListOverview />, {
315312
organization,
316313

317314
initialRouterConfig: {
@@ -387,7 +384,7 @@ describe('IssueListOverview (actions)', () => {
387384
method: 'PUT',
388385
});
389386

390-
render(<IssueListOverview {...defaultProps} />, {
387+
render(<IssueListOverview />, {
391388
organization,
392389
});
393390

@@ -430,7 +427,7 @@ describe('IssueListOverview (actions)', () => {
430427
method: 'PUT',
431428
});
432429

433-
render(<IssueListOverview {...defaultProps} />, {
430+
render(<IssueListOverview />, {
434431
organization,
435432

436433
initialRouterConfig: {
@@ -473,7 +470,7 @@ describe('IssueListOverview (actions)', () => {
473470
method: 'PUT',
474471
});
475472

476-
render(<IssueListOverview {...defaultProps} />, {
473+
render(<IssueListOverview />, {
477474
organization,
478475

479476
initialRouterConfig: {

static/app/views/issueList/overview.polling.spec.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import {GroupFixture} from 'sentry-fixture/group';
22
import {GroupStatsFixture} from 'sentry-fixture/groupStats';
3-
import {LocationFixture} from 'sentry-fixture/locationFixture';
43
import {MemberFixture} from 'sentry-fixture/member';
4+
import {ProjectFixture} from 'sentry-fixture/project';
55
import {TagsFixture} from 'sentry-fixture/tags';
66

7-
import {initializeOrg} from 'sentry-test/initializeOrg';
87
import {render, screen, userEvent, waitFor} from 'sentry-test/reactTestingLibrary';
98
import {textWithMarkupMatcher} from 'sentry-test/utils';
109

@@ -38,26 +37,13 @@ describe('IssueList -> Polling', () => {
3837
MockApiClient.clearMockResponses();
3938
});
4039

41-
const {organization, project, routerProps} = initializeOrg({
42-
organization: {
43-
access: ['project:releases'],
44-
},
45-
});
40+
const project = ProjectFixture();
4641
const group = GroupFixture({project});
4742
const group2 = GroupFixture({project, id: '2'});
4843

49-
const defaultProps = {
50-
location: LocationFixture({
51-
query: {query: 'is:unresolved'},
52-
search: 'query=is:unresolved',
53-
}),
54-
params: {},
55-
organization,
56-
};
57-
5844
/* helpers */
5945
const renderComponent = async () => {
60-
render(<IssueList {...routerProps} {...defaultProps} />, {
46+
render(<IssueList />, {
6147
initialRouterConfig: {
6248
location: {
6349
pathname: '/organizations/org-slug/issues/',

0 commit comments

Comments
 (0)