aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/web-api/components
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-09-29 15:03:12 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-09-29 17:09:48 +0200
commit059cf8688eafd9f151a1fad84997ce77e5af511e (patch)
treeb0d0941506386d23955ee9b893c8cc73e0c07b2d /server/sonar-web/src/main/js/apps/web-api/components
parentee41573b8b309a123bc23ac623663107cc410af3 (diff)
downloadsonarqube-059cf8688eafd9f151a1fad84997ce77e5af511e.tar.gz
sonarqube-059cf8688eafd9f151a1fad84997ce77e5af511e.zip
SONAR-9792 Fix sidebar position with a notification
Diffstat (limited to 'server/sonar-web/src/main/js/apps/web-api/components')
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx55
1 files changed, 29 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
index 3a69c4bc4c6..ebc579d5ca5 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
@@ -25,6 +25,7 @@ import { Domain as DomainType, fetchWebApi } from '../../../api/web-api';
import Menu from './Menu';
import Search from './Search';
import Domain from './Domain';
+import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
import { getActionKey, isDomainPathActive } from '../utils';
import { scrollToElement } from '../../../helpers/scrolling';
import { translate } from '../../../helpers/l10n';
@@ -141,35 +142,37 @@ export default class WebApiApp extends React.PureComponent<Props, State> {
return (
<div className="layout-page">
<Helmet title={translate('api_documentation.page')} />
- <div className="layout-page-side-outer">
- <div className="layout-page-side" style={{ top: 30 }}>
- <div className="layout-page-side-inner">
- <div className="layout-page-filters">
- <div className="web-api-page-header">
- <Link to="/web_api/">
- <h1>{translate('api_documentation.page')}</h1>
- </Link>
+ <ScreenPositionHelper className="layout-page-side-outer">
+ {({ top }) => (
+ <div className="layout-page-side" style={{ top }}>
+ <div className="layout-page-side-inner">
+ <div className="layout-page-filters">
+ <div className="web-api-page-header">
+ <Link to="/web_api/">
+ <h1>{translate('api_documentation.page')}</h1>
+ </Link>
+ </div>
+
+ <Search
+ showDeprecated={showDeprecated}
+ showInternal={showInternal}
+ onSearch={this.handleSearch}
+ onToggleInternal={this.handleToggleInternal}
+ onToggleDeprecated={this.handleToggleDeprecated}
+ />
+
+ <Menu
+ domains={this.state.domains}
+ showDeprecated={showDeprecated}
+ showInternal={showInternal}
+ searchQuery={searchQuery}
+ splat={splat}
+ />
</div>
-
- <Search
- showDeprecated={showDeprecated}
- showInternal={showInternal}
- onSearch={this.handleSearch}
- onToggleInternal={this.handleToggleInternal}
- onToggleDeprecated={this.handleToggleDeprecated}
- />
-
- <Menu
- domains={this.state.domains}
- showDeprecated={showDeprecated}
- showInternal={showInternal}
- searchQuery={searchQuery}
- splat={splat}
- />
</div>
</div>
- </div>
- </div>
+ )}
+ </ScreenPositionHelper>
<div className="layout-page-main">
<div className="layout-page-main-inner">