diff options
author | Pascal Mugnier <pascal.mugnier@sonarsource.com> | 2018-04-26 15:31:42 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-05-03 20:20:50 +0200 |
commit | 4a31f1ff8f39bdd5189d75f420ab052ec5a75cd6 (patch) | |
tree | bdb0ff5255e953a466c67629e214f6f0e544fee3 /server/sonar-web/src/main/js/app/components/GlobalContainer.tsx | |
parent | 4c2edb7abdb283c6bed56ce6be32304f67529045 (diff) | |
download | sonarqube-4a31f1ff8f39bdd5189d75f420ab052ec5a75cd6.tar.gz sonarqube-4a31f1ff8f39bdd5189d75f420ab052ec5a75cd6.zip |
SONAR-10609 Rework the global help modal to a dropdown (#177)
Diffstat (limited to 'server/sonar-web/src/main/js/app/components/GlobalContainer.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/app/components/GlobalContainer.tsx | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx index a89319b690a..3b81367b34f 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx @@ -22,6 +22,7 @@ import * as PropTypes from 'prop-types'; import GlobalNav from './nav/global/GlobalNav'; import GlobalFooterContainer from './GlobalFooterContainer'; import GlobalMessagesContainer from './GlobalMessagesContainer'; +import SuggestionsProvider from './embed-docs-modal/SuggestionsProvider'; import Workspace from '../../components/workspace/Workspace'; interface Props { @@ -59,23 +60,28 @@ export default class GlobalContainer extends React.PureComponent<Props, State> { // it is important to pass `location` down to `GlobalNav` to trigger render on url change return ( - <div className="global-container"> - <div className="page-wrapper" id="container"> - <div className="page-container"> - <Workspace> - <GlobalNav - closeOnboardingTutorial={this.closeOnboardingTutorial} - isOnboardingTutorialOpen={this.state.isOnboardingTutorialOpen} - location={this.props.location} - openOnboardingTutorial={this.openOnboardingTutorial} - /> - <GlobalMessagesContainer /> - {this.props.children} - </Workspace> + <SuggestionsProvider> + {({ suggestions }) => ( + <div className="global-container"> + <div className="page-wrapper" id="container"> + <div className="page-container"> + <Workspace> + <GlobalNav + closeOnboardingTutorial={this.closeOnboardingTutorial} + isOnboardingTutorialOpen={this.state.isOnboardingTutorialOpen} + location={this.props.location} + openOnboardingTutorial={this.openOnboardingTutorial} + suggestions={suggestions} + /> + <GlobalMessagesContainer /> + {this.props.children} + </Workspace> + </div> + </div> + <GlobalFooterContainer /> </div> - </div> - <GlobalFooterContainer /> - </div> + )} + </SuggestionsProvider> ); } } |