ソースを参照

SONAR-10227 Drop skip tutorial tooltip

tags/7.5
Grégoire Aubert 6年前
コミット
a387b409e3

+ 3
- 10
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<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>
);

+ 3
- 35
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<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>

+ 0
- 1
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


読み込み中…
キャンセル
保存