[MM-59906] Migrate tooltips of 'components/threading/global_threads/thread_item/thread_item.tsx' to WithTooltip (#27803)

Этот коммит содержится в:
Brandon Shen
2024-08-07 01:22:05 -07:00
коммит произвёл GitHub
родитель 24ae4a6d9e
Коммит 7f35be584d
2 изменённых файлов: 20 добавлений и 16 удалений

Просмотреть файл

@@ -45,14 +45,15 @@ exports[`components/threading/global_threads/thread_item should report total num
threadId="1y8hpek81byspd4enyk9mp1ncw" threadId="1y8hpek81byspd4enyk9mp1ncw"
unreadTimestamp={1611786714912} unreadTimestamp={1611786714912}
> >
<SimpleTooltip <WithTooltip
content={ id="threadActionMenu"
placement="top"
title={
<Memo(MemoizedFormattedMessage) <Memo(MemoizedFormattedMessage)
defaultMessage="Actions" defaultMessage="Actions"
id="threading.threadItem.menu" id="threading.threadItem.menu"
/> />
} }
id="threadActionMenu"
> >
<Memo(Button) <Memo(Button)
className="Button___icon" className="Button___icon"
@@ -62,7 +63,7 @@ exports[`components/threading/global_threads/thread_item should report total num
size={18} size={18}
/> />
</Memo(Button)> </Memo(Button)>
</SimpleTooltip> </WithTooltip>
</Memo(ThreadMenu)> </Memo(ThreadMenu)>
</div> </div>
<div <div
@@ -169,14 +170,15 @@ exports[`components/threading/global_threads/thread_item should report unread me
threadId="1y8hpek81byspd4enyk9mp1ncw" threadId="1y8hpek81byspd4enyk9mp1ncw"
unreadTimestamp={1611786714912} unreadTimestamp={1611786714912}
> >
<SimpleTooltip <WithTooltip
content={ id="threadActionMenu"
placement="top"
title={
<Memo(MemoizedFormattedMessage) <Memo(MemoizedFormattedMessage)
defaultMessage="Actions" defaultMessage="Actions"
id="threading.threadItem.menu" id="threading.threadItem.menu"
/> />
} }
id="threadActionMenu"
> >
<Memo(Button) <Memo(Button)
className="Button___icon" className="Button___icon"
@@ -186,7 +188,7 @@ exports[`components/threading/global_threads/thread_item should report unread me
size={18} size={18}
/> />
</Memo(Button)> </Memo(Button)>
</SimpleTooltip> </WithTooltip>
</Memo(ThreadMenu)> </Memo(ThreadMenu)>
</div> </div>
<div <div
@@ -291,14 +293,15 @@ exports[`components/threading/global_threads/thread_item should report unread me
threadId="1y8hpek81byspd4enyk9mp1ncw" threadId="1y8hpek81byspd4enyk9mp1ncw"
unreadTimestamp={1611786714912} unreadTimestamp={1611786714912}
> >
<SimpleTooltip <WithTooltip
content={ id="threadActionMenu"
placement="top"
title={
<Memo(MemoizedFormattedMessage) <Memo(MemoizedFormattedMessage)
defaultMessage="Actions" defaultMessage="Actions"
id="threading.threadItem.menu" id="threading.threadItem.menu"
/> />
} }
id="threadActionMenu"
> >
<Memo(Button) <Memo(Button)
className="Button___icon" className="Button___icon"
@@ -308,7 +311,7 @@ exports[`components/threading/global_threads/thread_item should report unread me
size={18} size={18}
/> />
</Memo(Button)> </Memo(Button)>
</SimpleTooltip> </WithTooltip>
</Memo(ThreadMenu)> </Memo(ThreadMenu)>
</div> </div>
<div <div

Просмотреть файл

@@ -28,9 +28,9 @@ import PriorityBadge from 'components/post_priority/post_priority_badge';
import Button from 'components/threading/common/button'; import Button from 'components/threading/common/button';
import Timestamp from 'components/timestamp'; import Timestamp from 'components/timestamp';
import CRTListTutorialTip from 'components/tours/crt_tour/crt_list_tutorial_tip'; import CRTListTutorialTip from 'components/tours/crt_tour/crt_list_tutorial_tip';
import SimpleTooltip from 'components/widgets/simple_tooltip';
import Tag from 'components/widgets/tag/tag'; import Tag from 'components/widgets/tag/tag';
import Avatars from 'components/widgets/users/avatars'; import Avatars from 'components/widgets/users/avatars';
import WithTooltip from 'components/with_tooltip';
import {CrtTutorialSteps, Preferences} from 'utils/constants'; import {CrtTutorialSteps, Preferences} from 'utils/constants';
import * as Utils from 'utils/utils'; import * as Utils from 'utils/utils';
@@ -225,9 +225,10 @@ function ThreadItem({
hasUnreads={Boolean(newReplies)} hasUnreads={Boolean(newReplies)}
unreadTimestamp={unreadTimestamp} unreadTimestamp={unreadTimestamp}
> >
<SimpleTooltip <WithTooltip
id='threadActionMenu' id='threadActionMenu'
content={( placement='top'
title={(
<FormattedMessage <FormattedMessage
id='threading.threadItem.menu' id='threading.threadItem.menu'
defaultMessage='Actions' defaultMessage='Actions'
@@ -240,7 +241,7 @@ function ThreadItem({
> >
<DotsVerticalIcon size={18}/> <DotsVerticalIcon size={18}/>
</Button> </Button>
</SimpleTooltip> </WithTooltip>
</ThreadMenu> </ThreadMenu>
</div> </div>
<div <div