Remove DeletedPostMessage created tooltip

closes VICE-2417

flag=react_discussions_post

test plan:
  - Specs pass
  - Go to a discussion
  - Delete a reply
  - Notice that you aren't able to tab
      thru it and doesn't have a tooltip.

qa risk: low

Change-Id: I1ac2694df57bfc25cf81e486706f49314637a3fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283113
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
This commit is contained in:
Omar Gerardo Soto-Fortuño 2022-01-19 11:53:14 -05:00 committed by Omar Soto-Fortuño
parent eb3a5eb084
commit 9ad29a7fc0
3 changed files with 11 additions and 24 deletions

View File

@ -22,7 +22,6 @@ import React from 'react'
import {responsiveQuerySizes} from '../../utils'
import {Responsive} from '@instructure/ui-responsive'
import {Text} from '@instructure/ui-text'
import {Tooltip} from '@instructure/ui-tooltip'
import {View} from '@instructure/ui-view'
export function DeletedPostMessage({...props}) {
@ -49,27 +48,18 @@ export function DeletedPostMessage({...props}) {
</Text>
</View>
)}
<Tooltip
renderTip={I18n.t('Created %{timingDisplay}', {timingDisplay: props.timingDisplay})}
<Text
size={
props.deleterName
? responsiveProps.timestampTextSize
: responsiveProps.deletedByTextSize
}
weight={props.deleterName ? undefined : 'bold'}
>
<span
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
tabIndex="0"
>
<Text
size={
props.deleterName
? responsiveProps.timestampTextSize
: responsiveProps.deletedByTextSize
}
weight={props.deleterName ? undefined : 'bold'}
>
{I18n.t('Deleted %{deletedTimingDisplay}', {
deletedTimingDisplay: props.deletedTimingDisplay
})}
</Text>
</span>
</Tooltip>
{I18n.t('Deleted %{deletedTimingDisplay}', {
deletedTimingDisplay: props.deletedTimingDisplay
})}
</Text>
{props.children}
</>
)}

View File

@ -39,13 +39,11 @@ describe('DeletedPostMessage', () => {
const container = setup()
expect(container.getByText('Deleted by Rick Sanchez')).toBeInTheDocument()
expect(container.getByText('Deleted Feb 2 2:00pm')).toBeInTheDocument()
expect(container.getByText('Created Jan 1 1:00pm')).toBeInTheDocument()
})
it('displays some deletion info when missing deleter name', () => {
const container = setup()
expect(container.queryByText('Deleted by')).toBeNull()
expect(container.getByText('Deleted Feb 2 2:00pm')).toBeInTheDocument()
expect(container.getByText('Created Jan 1 1:00pm')).toBeInTheDocument()
})
})

View File

@ -79,7 +79,6 @@ describe('DiscussionEntryMessageContainer', () => {
it('displays deletion info if delete', () => {
const {getByText} = setup(defaultProps({deleted: true}))
expect(getByText('Deleted by Hank Mccoy')).toBeInTheDocument()
expect(getByText('Created Feb 8, 2021 8:35pm')).toBeInTheDocument()
expect(getByText('Deleted Apr 13, 2021 4pm')).toBeInTheDocument()
})