From f1cc96defbed3b0cd458743d3a518ae160f809c4 Mon Sep 17 00:00:00 2001 From: M-ZubairAhmed Date: Thu, 30 May 2024 13:04:09 +0000 Subject: [PATCH] [MM-58400] Migrate tooltips of 'components/rename_channel_modal' & 'components/size_aware_image' to WithTooltip (#27145) --- .../size_aware_image.test.tsx.snap | 180 +++++------------- .../rename_channel_modal.test.tsx.snap | 21 +- .../rename_channel_modal.tsx | 14 +- .../src/components/size_aware_image.tsx | 66 +++---- 4 files changed, 81 insertions(+), 200 deletions(-) diff --git a/webapp/channels/src/components/__snapshots__/size_aware_image.test.tsx.snap b/webapp/channels/src/components/__snapshots__/size_aware_image.test.tsx.snap index 3066414075..81a4a98320 100644 --- a/webapp/channels/src/components/__snapshots__/size_aware_image.test.tsx.snap +++ b/webapp/channels/src/components/__snapshots__/size_aware_image.test.tsx.snap @@ -46,28 +46,14 @@ exports[`components/SizeAwareImage should load download and copy link buttons wh - - - - } + } > - - - - - } + + } > - + @@ -172,28 +144,14 @@ exports[`components/SizeAwareImage should match snapshot when handleSmallImageCo - - - - } + } > - - - - - } + + } > - + @@ -311,28 +255,14 @@ exports[`components/SizeAwareImage should render a placeholder and has loader wh - - - - } + } > - - - - - } + + } > - + diff --git a/webapp/channels/src/components/rename_channel_modal/__snapshots__/rename_channel_modal.test.tsx.snap b/webapp/channels/src/components/rename_channel_modal/__snapshots__/rename_channel_modal.test.tsx.snap index 5980dbffa2..4461507bfd 100644 --- a/webapp/channels/src/components/rename_channel_modal/__snapshots__/rename_channel_modal.test.tsx.snap +++ b/webapp/channels/src/components/rename_channel_modal/__snapshots__/rename_channel_modal.test.tsx.snap @@ -87,30 +87,17 @@ exports[`components/RenameChannelModal should match snapshot 1`] = `
- - fake-channel/channels - - } + fake-channel/channels/ - + { const fullUrl = this.props.currentTeamUrl + '/channels'; const shortUrl = `${getShortenedURL(fullUrl, 35)}/`; - const urlTooltip = ( - {fullUrl} - ); return ( {
- {shortUrl} - + { // copyLinkTooltip, downloadTooltip are tooltips for the buttons respectively. // if linkCopiedRecently is true, defaultMessage would be 'Copy Link', else 'Copied!' - const copyLinkTooltip = ( - - {this.state.linkCopiedRecently ? ( - - ) : ( - - )} - + const copyLinkTooltipText = this.state.linkCopiedRecently ? ( + + ) : ( + ); const copyLink = ( - - + ); - const downloadTooltip = ( - - - + const downloadTooltipText = ( + ); - const download = ( - { size={20} /> - + ); if (this.props.handleSmallImageContainer && this.state.isSmallImage) {