aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-12-28 17:18:28 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-12-28 17:18:28 +0100
commitbe413c15c08966da5740a126e1c5b52f75e6fc6e (patch)
tree0a52682f4d3fd66c162f23ba2cc458bc6a3a5195 /server
parent632808520028fb412b93ff277719db848c2af59f (diff)
downloadsonarqube-be413c15c08966da5740a126e1c5b52f75e6fc6e.tar.gz
sonarqube-be413c15c08966da5740a126e1c5b52f75e6fc6e.zip
improve code page rendering
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Code.js77
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js1
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/ComponentName.js2
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/Truncated.js3
-rw-r--r--server/sonar-web/src/main/less/pages/code.less2
5 files changed, 39 insertions, 46 deletions
diff --git a/server/sonar-web/src/main/js/apps/code/components/Code.js b/server/sonar-web/src/main/js/apps/code/components/Code.js
index 6b38da6d007..2e54f46c955 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Code.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Code.js
@@ -7,7 +7,6 @@ import Breadcrumbs from './Breadcrumbs';
import SourceViewer from './SourceViewer';
import Search from './Search';
import { initComponent, browse } from '../actions';
-import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin';
class Code extends Component {
@@ -43,51 +42,49 @@ class Code extends Component {
const componentsClassName = classNames('spacer-top', { 'new-loading': fetching });
return (
- <TooltipsContainer options={{ delay: { show: 500, hide: 0 } }}>
- <div className="page">
- <header className="page-header">
- <h1 className="page-title">{window.t('code.page')}</h1>
+ <div className="page">
+ <header className="page-header">
+ <h1 className="page-title">{window.t('code.page')}</h1>
- <div
- className="pull-left"
- style={{ visibility: fetching ? 'visible' : 'hidden' }}>
- <i className="spinner"/>
- </div>
+ <div
+ className="pull-left"
+ style={{ visibility: fetching ? 'visible' : 'hidden' }}>
+ <i className="spinner"/>
+ </div>
- <Search component={this.props.component}/>
- </header>
+ <Search component={this.props.component}/>
+ </header>
- {shouldShowBreadcrumbs && (
- <Breadcrumbs
- breadcrumbs={breadcrumbs}
- onBrowse={this.handleBrowse.bind(this)}/>
- )}
+ {shouldShowBreadcrumbs && (
+ <Breadcrumbs
+ breadcrumbs={breadcrumbs}
+ onBrowse={this.handleBrowse.bind(this)}/>
+ )}
- {shouldShowSearchResults && (
- <div className={componentsClassName}>
- <Components
- components={searchResults}
- onBrowse={this.handleBrowse.bind(this)}/>
- </div>
- )}
+ {shouldShowSearchResults && (
+ <div className={componentsClassName}>
+ <Components
+ components={searchResults}
+ onBrowse={this.handleBrowse.bind(this)}/>
+ </div>
+ )}
- {shouldShowComponents && (
- <div className={componentsClassName}>
- <Components
- baseComponent={baseComponent}
- components={components}
- coverageMetric={coverageMetric}
- onBrowse={this.handleBrowse.bind(this)}/>
- </div>
- )}
+ {shouldShowComponents && (
+ <div className={componentsClassName}>
+ <Components
+ baseComponent={baseComponent}
+ components={components}
+ coverageMetric={coverageMetric}
+ onBrowse={this.handleBrowse.bind(this)}/>
+ </div>
+ )}
- {shouldShowSourceViewer && (
- <div className="spacer-top">
- <SourceViewer component={sourceViewer}/>
- </div>
- )}
- </div>
- </TooltipsContainer>
+ {shouldShowSourceViewer && (
+ <div className="spacer-top">
+ <SourceViewer component={sourceViewer}/>
+ </div>
+ )}
+ </div>
);
}
}
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js b/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
index c4ecf42b924..705aaba7dc1 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentDetach.js
@@ -8,7 +8,6 @@ const ComponentDetach = ({ component }) => (
className="icon-detach"
target="_blank"
title={window.t('code.open_in_new_tab')}
- data-toggle="tooltip"
href={getComponentUrl(component.key)}/>
);
diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
index 40031d80ec5..5ffba52b596 100644
--- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
+++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js
@@ -4,8 +4,6 @@ import Truncated from './Truncated';
import QualifierIcon from '../../../components/shared/qualifier-icon';
-// TODO collapse dirs
-
const Component = ({ component, onBrowse }) => {
const handleClick = (e) => {
e.preventDefault();
diff --git a/server/sonar-web/src/main/js/apps/code/components/Truncated.js b/server/sonar-web/src/main/js/apps/code/components/Truncated.js
index ecf7bb87904..87c0da82914 100644
--- a/server/sonar-web/src/main/js/apps/code/components/Truncated.js
+++ b/server/sonar-web/src/main/js/apps/code/components/Truncated.js
@@ -4,8 +4,7 @@ import React from 'react';
const Truncated = ({ children, title }) => (
<span
className="code-truncated"
- data-title={title}
- data-toggle="tooltip">
+ title={title}>
{children}
</span>
);
diff --git a/server/sonar-web/src/main/less/pages/code.less b/server/sonar-web/src/main/less/pages/code.less
index 578e392ed2b..99bb42ba39d 100644
--- a/server/sonar-web/src/main/less/pages/code.less
+++ b/server/sonar-web/src/main/less/pages/code.less
@@ -36,7 +36,7 @@
.code-truncated {
display: inline-block;
vertical-align: text-top;
- max-width: 300px;
+ max-width: 50vw;
.text-ellipsis;
}