From a387b409e3904805b954c70fdc0f791000e81c55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Tue, 5 Jun 2018 15:40:49 +0200 Subject: [PATCH] SONAR-10227 Drop skip tutorial tooltip --- .../embed-docs-modal/EmbedDocsPopupHelper.tsx | 13 ++----- .../app/components/nav/global/GlobalNav.tsx | 38 ++----------------- .../resources/org/sonar/l10n/core.properties | 1 - 3 files changed, 6 insertions(+), 46 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx index 20ddca01c15..c2ad6cf19c5 100644 --- a/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx +++ b/server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx @@ -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; tooltip: boolean; } @@ -90,13 +87,9 @@ export default class EmbedDocsPopupHelper extends React.PureComponent }> - - - - - + + + ); diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx index 062a97a4445..6d3cdcece68 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx @@ -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 { - 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 { + static contextTypes = { openOnboardingTutorial: PropTypes.func }; render() { return ( @@ -90,18 +63,13 @@ class GlobalNav extends React.PureComponent { {isSonarCloud() && } {isLoggedIn(this.props.currentUser) && isSonarCloud() && ( - - - + )} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index edfbbb6ec9c..36c1cb0444f 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -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 -- 2.39.5