aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/workspace
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2022-06-21 09:24:30 +0200
committersonartech <sonartech@sonarsource.com>2022-07-20 20:03:25 +0000
commit0a7d6f7245e753feb25bceae733fd659591b8f81 (patch)
tree1f40d8439a8d7543dd0828a884868aada5a1810f /server/sonar-web/src/main/js/components/workspace
parent466c012d87ca3f37ead691160afb87b212d01645 (diff)
downloadsonarqube-0a7d6f7245e753feb25bceae733fd659591b8f81.tar.gz
sonarqube-0a7d6f7245e753feb25bceae733fd659591b8f81.zip
SONAR-16475 Remove lazyLoading of frontend component
Diffstat (limited to 'server/sonar-web/src/main/js/components/workspace')
-rw-r--r--server/sonar-web/src/main/js/components/workspace/Workspace.tsx14
-rw-r--r--server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/Workspace-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceComponentViewer-test.tsx.snap4
3 files changed, 8 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx
index 63fa2998727..d8436587217 100644
--- a/server/sonar-web/src/main/js/components/workspace/Workspace.tsx
+++ b/server/sonar-web/src/main/js/components/workspace/Workspace.tsx
@@ -22,22 +22,14 @@ import * as React from 'react';
import { getRulesApp } from '../../api/rules';
import { get, save } from '../../helpers/storage';
import { Dict } from '../../types/types';
-import { lazyLoadComponent } from '../lazyLoadComponent';
import { ComponentDescriptor, RuleDescriptor, WorkspaceContext } from './context';
import './styles.css';
+import WorkspaceComponentViewer from './WorkspaceComponentViewer';
+import WorkspaceNav from './WorkspaceNav';
import WorkspacePortal from './WorkspacePortal';
+import WorkspaceRuleViewer from './WorkspaceRuleViewer';
const WORKSPACE = 'sonarqube-workspace';
-const WorkspaceNav = lazyLoadComponent(() => import('./WorkspaceNav'), 'WorkspaceNav');
-const WorkspaceRuleViewer = lazyLoadComponent(
- () => import('./WorkspaceRuleViewer'),
- 'WorkspaceRuleViewer'
-);
-const WorkspaceComponentViewer = lazyLoadComponent(
- () => import('./WorkspaceComponentViewer'),
- 'WorkspaceComponentViewer'
-);
-
interface State {
components: ComponentDescriptor[];
externalRulesRepoNames: Dict<string>;
diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/Workspace-test.tsx.snap b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/Workspace-test.tsx.snap
index b94880cf499..95482d97039 100644
--- a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/Workspace-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/Workspace-test.tsx.snap
@@ -58,7 +58,7 @@ exports[`should render correctly: open component 1`] = `
}
rules={Array []}
/>
- <WorkspaceComponentViewer
+ <withBranchStatusActions(WorkspaceComponentViewer)
component={
Object {
"branchLike": Object {
diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceComponentViewer-test.tsx.snap b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceComponentViewer-test.tsx.snap
index 72da3f75715..477fa047ae1 100644
--- a/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceComponentViewer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/workspace/__tests__/__snapshots__/WorkspaceComponentViewer-test.tsx.snap
@@ -30,6 +30,10 @@ exports[`should render 1`] = `
>
<SourceViewer
component="foo"
+ displayAllIssues={false}
+ displayIssueLocationsCount={true}
+ displayIssueLocationsLink={true}
+ displayLocationMarkers={true}
onIssueChange={[Function]}
onLoaded={[Function]}
/>