Skip to content

Commit

Permalink
[MM-59904] Migrate tooltips of 'components/channel_invite_modal/team_…
Browse files Browse the repository at this point in the history
…warning_banner/team_warning_banner.tsx' to WithTooltip (mattermost#27852)
  • Loading branch information
Gesare5 authored Aug 7, 2024
1 parent edd45c5 commit 1bb8298
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,10 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
mentionName="user-0"
/>,
" and ",
<SimpleTooltip
content="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
<WithTooltip
id="usernames-overflow"
placement="top"
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
>
<span
className="add-others-link"
Expand All @@ -476,7 +477,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
}
/>
</span>
</SimpleTooltip>,
</WithTooltip>,
" are guest users and need to first be invited to the team before you can add them to the channel. Once they've joined the team, you can add them to this channel.",
]
}
Expand Down Expand Up @@ -560,23 +561,17 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
/>
</Connect(Component)>
and
<SimpleTooltip
content="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
<WithTooltip
id="usernames-overflow"
key=".2"
placement="top"
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
>
<OverlayTrigger
defaultOverlayShown={false}
delayShow={100}
overlay={
<Tooltip
className="hidden-xs"
id="usernames-overflow"
placement="top"
>
@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10
</Tooltip>
}
delay={400}
disabled={false}
overlay={<Unknown />}
placement="top"
trigger={
Array [
Expand All @@ -587,11 +582,9 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
>
<OverlayTrigger
defaultOverlayShown={false}
delayShow={100}
delay={400}
overlay={
<OverlayWrapper
className="hidden-xs"
id="usernames-overflow"
intl={
Object {
"$t": [Function],
Expand Down Expand Up @@ -631,10 +624,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
"wrapRichTextChunksInFragment": undefined,
}
}
placement="top"
>
@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10
</OverlayWrapper>
/>
}
placement="top"
trigger={
Expand Down Expand Up @@ -668,7 +658,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
</span>
</OverlayTrigger>
</OverlayTrigger>
</SimpleTooltip>
</WithTooltip>
are guest users and need to first be invited to the team before you can add them to the channel. Once they've joined the team, you can add them to this channel.
</div>
</div>
Expand Down Expand Up @@ -786,9 +776,10 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
mentionName="user-0"
/>,
" and ",
<SimpleTooltip
content="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
<WithTooltip
id="usernames-overflow"
placement="top"
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
>
<span
className="add-others-link"
Expand All @@ -803,7 +794,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
}
/>
</span>
</SimpleTooltip>,
</WithTooltip>,
" to this channel once they are members of the ",
<strong>
Team Name Display
Expand Down Expand Up @@ -890,23 +881,17 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
/>
</Connect(Component)>
and
<SimpleTooltip
content="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
<WithTooltip
id="usernames-overflow"
key=".3"
placement="top"
title="@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10"
>
<OverlayTrigger
defaultOverlayShown={false}
delayShow={100}
overlay={
<Tooltip
className="hidden-xs"
id="usernames-overflow"
placement="top"
>
@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10
</Tooltip>
}
delay={400}
disabled={false}
overlay={<Unknown />}
placement="top"
trigger={
Array [
Expand All @@ -917,11 +902,9 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
>
<OverlayTrigger
defaultOverlayShown={false}
delayShow={100}
delay={400}
overlay={
<OverlayWrapper
className="hidden-xs"
id="usernames-overflow"
intl={
Object {
"$t": [Function],
Expand Down Expand Up @@ -961,10 +944,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
"wrapRichTextChunksInFragment": undefined,
}
}
placement="top"
>
@user-1, @user-2, @user-3, @user-4, @user-5, @user-6, @user-7, @user-8, @user-9, @user-10
</OverlayWrapper>
/>
}
placement="top"
trigger={
Expand Down Expand Up @@ -998,7 +978,7 @@ exports[`components/channel_invite_modal/team_warning_banner should match snapsh
</span>
</OverlayTrigger>
</OverlayTrigger>
</SimpleTooltip>
</WithTooltip>
to this channel once they are members of the
<strong
key=".5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {getTeam} from 'mattermost-redux/selectors/entities/teams';
import AlertBanner from 'components/alert_banner';
import AtMention from 'components/at_mention';
import type {Value} from 'components/multiselect/multiselect';
import SimpleTooltip from 'components/widgets/simple_tooltip';
import WithTooltip from 'components/with_tooltip';

type UserProfileValue = Value & UserProfile;

Expand Down Expand Up @@ -62,9 +62,10 @@ const TeamWarningBanner = (props: Props) => {
/>
),
others: (
<SimpleTooltip
id={'usernames-overflow'}
content={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
<WithTooltip
id='usernames-overflow'
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
placement='top'
>
<span
className='add-others-link'
Expand All @@ -77,7 +78,7 @@ const TeamWarningBanner = (props: Props) => {
}}
/>
</span>
</SimpleTooltip>
</WithTooltip>
),
},
)
Expand Down Expand Up @@ -132,9 +133,10 @@ const TeamWarningBanner = (props: Props) => {
/>
),
others: (
<SimpleTooltip
id={'usernames-overflow'}
content={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
<WithTooltip
id='usernames-overflow'
title={commaSeparatedUsernames.replace(`@${firstName}, `, '')}
placement='top'
>
<span
className='add-others-link'
Expand All @@ -147,7 +149,7 @@ const TeamWarningBanner = (props: Props) => {
}}
/>
</span>
</SimpleTooltip>
</WithTooltip>
),
team: (<strong>{team?.display_name}</strong>),
},
Expand Down

0 comments on commit 1bb8298

Please sign in to comment.