Skip to content

Commit ea42a92

Browse files
committed
ref(ui): Move and codesplit ProjectPlugins
🍌
1 parent 53e3360 commit ea42a92

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

src/sentry/static/sentry/app/routes.jsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import OrganizationContext from 'app/views/organizationContext';
1313
import OrganizationDetails from 'app/views/organizationDetails';
1414
import OrganizationRoot from 'app/views/organizationRoot';
1515
import ProjectEventRedirect from 'app/views/projectEventRedirect';
16-
import ProjectPluginDetails from 'app/views/projectPluginDetails';
17-
import ProjectPlugins from 'app/views/projectPlugins';
1816
import RouteNotFound from 'app/views/routeNotFound';
1917
import SettingsProjectProvider from 'app/views/settings/components/settingsProjectProvider';
2018
import SettingsWrapper from 'app/views/settings/components/settingsWrapper';
@@ -406,11 +404,19 @@ function routes() {
406404
/>
407405
</Route>
408406
<Route path="plugins/" name="Legacy Integrations">
409-
<IndexRoute component={errorHandler(ProjectPlugins)} />
407+
<IndexRoute
408+
componentPromise={() =>
409+
import(/* webpackChunkName: "ProjectPlugins" */ 'app/views/settings/projectPlugins')
410+
}
411+
component={errorHandler(LazyLoad)}
412+
/>
410413
<Route
411414
path=":pluginId/"
412415
name="Integration Details"
413-
component={errorHandler(ProjectPluginDetails)}
416+
componentPromise={() =>
417+
import(/* webpackChunkName: "ProjectPluginDetails" */ 'app/views/settings/projectPlugins/details')
418+
}
419+
component={errorHandler(LazyLoad)}
414420
/>
415421
</Route>
416422
<Route path="install/" name="Configuration">

src/sentry/static/sentry/app/views/projectPluginDetails.jsx renamed to src/sentry/static/sentry/app/views/settings/projectPlugins/details.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import PluginConfig from 'app/components/pluginConfig';
1010
import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader';
1111
import withPlugins from 'app/utils/withPlugins';
1212

13-
import {DEPRECATED_PLUGINS} from 'app/views/projectPlugins/constants';
13+
import {DEPRECATED_PLUGINS} from './constants';
1414

1515
/**
1616
* There are currently two sources of truths for plugin details:

src/sentry/static/sentry/app/views/projectPlugins/index.jsx renamed to src/sentry/static/sentry/app/views/settings/projectPlugins/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import React from 'react';
33
import {fetchPlugins, enablePlugin, disablePlugin} from 'app/actionCreators/plugins';
44
import {t} from 'app/locale';
55
import PermissionAlert from 'app/views/settings/project/permissionAlert';
6-
import ProjectPlugins from 'app/views/projectPlugins/projectPlugins';
76
import SentryTypes from 'app/sentryTypes';
87
import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader';
98
import withPlugins from 'app/utils/withPlugins';
109

10+
import ProjectPlugins from './projectPlugins';
11+
1112
class ProjectPluginsContainer extends React.Component {
1213
static propTypes = {
1314
plugins: SentryTypes.PluginsStore,

src/sentry/static/sentry/app/views/projectPlugins/projectPlugins.jsx renamed to src/sentry/static/sentry/app/views/settings/projectPlugins/projectPlugins.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import {t, tct} from 'app/locale';
1212
import Access from 'app/components/acl/access';
1313
import Link from 'app/components/links/link';
1414
import LoadingIndicator from 'app/components/loadingIndicator';
15-
import ProjectPluginRow from 'app/views/projectPlugins/projectPluginRow';
1615
import RouteError from 'app/views/routeError';
1716
import SentryTypes from 'app/sentryTypes';
1817

1918
import {DEPRECATED_PLUGINS} from './constants';
19+
import ProjectPluginRow from './projectPluginRow';
2020

2121
class ProjectPlugins extends Component {
2222
static propTypes = {

0 commit comments

Comments
 (0)