[MM-52627] Only show the team/channel name on search items in the RHS (#23649)

* [MM-52627] Only show the team/channel name on search items in the RHS

* Remove additional date separator

* PR feedback
This commit is contained in:
Devin Binnie 2023-06-09 13:01:41 -04:00 committed by GitHub
parent f4539bc65a
commit 19f33f332c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -513,7 +513,7 @@ const PostComponent = (props: Props): JSX.Element => {
className={props.location === 'SEARCH' ? 'search-item__container' : undefined}
data-testid={props.location === 'SEARCH' ? 'search-item-container' : undefined}
>
{(isSearchResultItem || (props.location !== Locations.CENTER && props.isPinnedPosts) || props.isFlagged) && <DateSeparator date={currentPostDay}/>}
{(isSearchResultItem || (props.location !== Locations.CENTER && (props.isPinnedPosts || props.isFlaggedPosts))) && <DateSeparator date={currentPostDay}/>}
<PostAriaLabelDiv
ref={postRef}
role='listitem'
@ -531,9 +531,11 @@ const PostComponent = (props: Props): JSX.Element => {
className='search-channel__name__container'
aria-hidden='true'
>
{Boolean(isSearchResultItem) &&
<span className='search-channel__name'>
{channelDisplayName}
</span>
}
{props.channelIsArchived &&
<span className='search-channel__archived'>
<ArchiveIcon className='icon icon__archive channel-header-archived-icon svg-text-color'/>
@ -543,7 +545,7 @@ const PostComponent = (props: Props): JSX.Element => {
/>
</span>
}
{Boolean(props.teamDisplayName) &&
{Boolean(isSearchResultItem) && Boolean(props.teamDisplayName) &&
<span className='search-team__name'>
{props.teamDisplayName}
</span>