]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10227 Drop skip tutorial tooltip
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 5 Jun 2018 13:40:49 +0000 (15:40 +0200)
committerSonarTech <sonartech@sonarsource.com>
Tue, 12 Jun 2018 18:21:03 +0000 (20:21 +0200)
server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx
server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 20ddca01c150acbb5edb9f6b12b0158ef525e0c9..c2ad6cf19c5b6d60dc4be9e530ee41776bfeecdc 100644 (file)
@@ -22,13 +22,10 @@ import EmbedDocsPopup from './EmbedDocsPopup';
 import { SuggestionLink } from './SuggestionsProvider';
 import { CurrentUser } from '../../types';
 import Toggler from '../../../components/controls/Toggler';
-import Tooltip from '../../../components/controls/Tooltip';
 import HelpIcon from '../../../components/icons-components/HelpIcon';
-import { translate } from '../../../helpers/l10n';
 
 interface Props {
   currentUser: CurrentUser;
-  showTooltip: boolean;
   suggestions: Array<SuggestionLink>;
   tooltip: boolean;
 }
@@ -90,13 +87,9 @@ export default class EmbedDocsPopupHelper extends React.PureComponent<Props, Sta
               suggestions={this.props.suggestions}
             />
           }>
-          <Tooltip
-            overlay={this.props.tooltip ? translate('tutorials.follow_later') : undefined}
-            visible={this.props.showTooltip}>
-            <a className="navbar-help" href="#" onClick={this.handleClick}>
-              <HelpIcon />
-            </a>
-          </Tooltip>
+          <a className="navbar-help" href="#" onClick={this.handleClick}>
+            <HelpIcon />
+          </a>
         </Toggler>
       </li>
     );
index 062a97a44454ec7abdaf66fe60bdfc592d48cf17..6d3cdcece688b0b4f83549eb9acdf022d2fecc85 100644 (file)
@@ -29,9 +29,7 @@ import EmbedDocsPopupHelper from '../../embed-docs-modal/EmbedDocsPopupHelper';
 import * as theme from '../../../theme';
 import { isLoggedIn, CurrentUser, AppState } from '../../../types';
 import NavBar from '../../../../components/nav/NavBar';
-import Tooltip from '../../../../components/controls/Tooltip';
 import { lazyLoad } from '../../../../components/lazyLoad';
-import { translate } from '../../../../helpers/l10n';
 import { getCurrentUser, getAppState } from '../../../../store/rootReducer';
 import { SuggestionLink } from '../../embed-docs-modal/SuggestionsProvider';
 import { isSonarCloud } from '../../../../helpers/system';
@@ -51,33 +49,8 @@ interface OwnProps {
 
 type Props = StateProps & OwnProps;
 
-interface State {
-  onboardingTutorialTooltip: boolean;
-}
-
-class GlobalNav extends React.PureComponent<Props, State> {
-  interval?: number;
-
-  static contextTypes = {
-    closeOnboardingTutorial: PropTypes.func,
-    openOnboardingTutorial: PropTypes.func
-  };
-
-  state: State = { onboardingTutorialTooltip: false };
-
-  componentWillUnmount() {
-    if (this.interval) {
-      clearInterval(this.interval);
-    }
-  }
-
-  closeOnboardingTutorial = () => {
-    this.setState({ onboardingTutorialTooltip: true });
-    this.context.closeOnboardingTutorial();
-    this.interval = window.setInterval(() => {
-      this.setState({ onboardingTutorialTooltip: false });
-    }, 3000);
-  };
+class GlobalNav extends React.PureComponent<Props> {
+  static contextTypes = { openOnboardingTutorial: PropTypes.func };
 
   render() {
     return (
@@ -90,18 +63,13 @@ class GlobalNav extends React.PureComponent<Props, State> {
           {isSonarCloud() && <GlobalNavExplore location={this.props.location} />}
           <EmbedDocsPopupHelper
             currentUser={this.props.currentUser}
-            showTooltip={this.state.onboardingTutorialTooltip}
             suggestions={this.props.suggestions}
             tooltip={!isSonarCloud()}
           />
           <Search appState={this.props.appState} currentUser={this.props.currentUser} />
           {isLoggedIn(this.props.currentUser) &&
             isSonarCloud() && (
-              <Tooltip
-                overlay={translate('tutorials.follow_later')}
-                visible={this.state.onboardingTutorialTooltip}>
-                <GlobalNavPlus openOnboardingTutorial={this.context.openOnboardingTutorial} />
-              </Tooltip>
+              <GlobalNavPlus openOnboardingTutorial={this.context.openOnboardingTutorial} />
             )}
           <GlobalNavUserContainer {...this.props} />
         </ul>
index edfbbb6ec9c030188774c0cd34bf8a6cab762257..36c1cb0444f6cc5b1d6fd874f25e564746a0aea6 100644 (file)
@@ -921,7 +921,6 @@ shortcuts.section.rules.deactivate=deactivate selected rule
 tutorials.onboarding=Analyze a new project
 tutorials.skip=Skip this tutorial
 tutorials.finish=Finish this tutorial
-tutorials.follow_later=You can always follow the tutorial later
 tutorials.find_it_back_in_help=Find it back anytime in the Help section
 tutorials.find_it_back_in_plus=Find it back anytime in the "+" menu