Skip to content

Commit

Permalink
fix(structure): remove avatar stack from review changes inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin committed Nov 7, 2024
1 parent eb1b2ef commit 7cc1b57
Showing 1 changed file with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import {type ObjectDiff} from '@sanity/diff'
import {AvatarStack, BoundaryElementProvider, Box, Card, Flex, Text} from '@sanity/ui'
import {BoundaryElementProvider, Box, Card, Flex, Text} from '@sanity/ui'
import {type ReactElement, useMemo, useRef} from 'react'
import {
ChangeFieldWrapper,
ChangeList,
DiffTooltip,
type DocumentChangeContextInstance,
LoadingBlock,
NoChanges,
type ObjectSchemaType,
ScrollContainer,
UserAvatar,
useTimelineSelector,
useTranslation,
} from 'sanity'
Expand Down Expand Up @@ -76,7 +74,7 @@ export function ChangesInspector({showChanges}: {showChanges: boolean}): ReactEl
return (
<Flex data-testid="review-changes-pane" direction="column" height="fill" overflow="hidden">
<Box padding={3}>
<Grid paddingX={1}>
<Grid paddingX={1} paddingBottom={2}>
<Text size={1} muted>
{structureT('changes.from.label')}
</Text>
Expand All @@ -87,21 +85,6 @@ export function ChangesInspector({showChanges}: {showChanges: boolean}): ReactEl
</Text>
<TimelineMenu chunk={rev} mode="rev" placement="bottom-end" />
</Grid>
{changeAnnotations.length > 0 && (
<Flex width={'full'} justify={'flex-end'} padding={3} paddingBottom={0}>
<DiffTooltip
annotations={changeAnnotations}
description={t('changes.changes-by-author')}
portal
>
<AvatarStack maxLength={4} aria-label={t('changes.changes-by-author')}>
{changeAnnotations.map(({author}) => (
<UserAvatar key={author} user={author} size={0} />
))}
</AvatarStack>
</DiffTooltip>
</Flex>
)}
</Box>

<Card flex={1}>
Expand Down

0 comments on commit 7cc1b57

Please sign in to comment.