[MM-59897] Migrate tooltips of 'plugins/channel_header_plug/channel_header_plug.tsx' to WithTooltip (#27807)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
488c22a9d8
Коммит
1a0e25e5e9
@@ -4,7 +4,7 @@
|
|||||||
/* eslint-disable react/no-multi-comp */
|
/* eslint-disable react/no-multi-comp */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Dropdown, Tooltip} from 'react-bootstrap';
|
import {Dropdown} from 'react-bootstrap';
|
||||||
import {FormattedMessage, injectIntl} from 'react-intl';
|
import {FormattedMessage, injectIntl} from 'react-intl';
|
||||||
import type {IntlShape} from 'react-intl';
|
import type {IntlShape} from 'react-intl';
|
||||||
import {RootCloseWrapper} from 'react-overlays';
|
import {RootCloseWrapper} from 'react-overlays';
|
||||||
@@ -15,8 +15,8 @@ import type {Channel, ChannelMembership} from '@mattermost/types/channels';
|
|||||||
import {AppCallResponseTypes} from 'mattermost-redux/constants/apps';
|
import {AppCallResponseTypes} from 'mattermost-redux/constants/apps';
|
||||||
|
|
||||||
import HeaderIconWrapper from 'components/channel_header/components/header_icon_wrapper';
|
import HeaderIconWrapper from 'components/channel_header/components/header_icon_wrapper';
|
||||||
import OverlayTrigger from 'components/overlay_trigger';
|
|
||||||
import PluginChannelHeaderIcon from 'components/widgets/icons/plugin_channel_header_icon';
|
import PluginChannelHeaderIcon from 'components/widgets/icons/plugin_channel_header_icon';
|
||||||
|
import WithTooltip from 'components/with_tooltip';
|
||||||
|
|
||||||
import {createCallContext} from 'utils/apps';
|
import {createCallContext} from 'utils/apps';
|
||||||
import {Constants} from 'utils/constants';
|
import {Constants} from 'utils/constants';
|
||||||
@@ -328,19 +328,15 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
|||||||
bsRole='toggle'
|
bsRole='toggle'
|
||||||
dropdownOpen={this.state.dropdownOpen}
|
dropdownOpen={this.state.dropdownOpen}
|
||||||
>
|
>
|
||||||
<OverlayTrigger
|
<WithTooltip
|
||||||
delayShow={Constants.OVERLAY_TIME_DELAY}
|
id='removeIcon'
|
||||||
placement='bottom'
|
placement='bottom'
|
||||||
overlay={this.state.dropdownOpen ? <></> : (
|
title={
|
||||||
<Tooltip id='removeIcon'>
|
<FormattedMessage
|
||||||
<div aria-hidden={true}>
|
id='generic_icons.plugins'
|
||||||
<FormattedMessage
|
defaultMessage='Plugins'
|
||||||
id='generic_icons.plugins'
|
/>
|
||||||
defaultMessage='Plugins'
|
}
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<PluginChannelHeaderIcon
|
<PluginChannelHeaderIcon
|
||||||
@@ -355,7 +351,7 @@ class ChannelHeaderPlug extends React.PureComponent<ChannelHeaderPlugProps, Chan
|
|||||||
{items.length}
|
{items.length}
|
||||||
</span>
|
</span>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
</OverlayTrigger>
|
</WithTooltip>
|
||||||
</CustomToggle>
|
</CustomToggle>
|
||||||
<CustomMenu
|
<CustomMenu
|
||||||
bsRole='menu'
|
bsRole='menu'
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user