Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolved Comment Markers #4692

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editor/src/components/canvas/controls/comment-indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export const CommentIndicatorUI = React.memo<CommentIndicatorUIProps>((props) =>
position: 'fixed',
top: position.y + 3,
left: position.x - 3,
filter: resolved ? 'grayscale(1)' : undefined,
width: IndicatorSize,
height: IndicatorSize,
background: read ? colorTheme.bg1.value : colorTheme.primary.value,
Expand All @@ -208,6 +207,7 @@ export const CommentIndicatorUI = React.memo<CommentIndicatorUIProps>((props) =>
alignItems: 'center',
justifyContent: 'center',
boxShadow: UtopiaStyles.shadowStyles.mid.boxShadow,
opacity: resolved ? 0.6 : 'undefined',
}

const transform: Interpolation<Theme> = {
Expand Down Expand Up @@ -249,7 +249,7 @@ export const CommentIndicatorUI = React.memo<CommentIndicatorUIProps>((props) =>
justifyContent: 'center',
}}
>
<AvatarPicture url={avatarUrl} initials={avatarInitials} />
<AvatarPicture url={avatarUrl} initials={avatarInitials} resolved={resolved} />
</div>
</div>
)
Expand Down
3 changes: 2 additions & 1 deletion editor/src/components/canvas/controls/comment-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ const CommentThread = React.memo(({ comment }: CommentThreadProps) => {
return
}
setThreadReadStatus(thread.id, 'unread')
}, [thread?.id, setThreadReadStatus])
dispatch([switchEditorMode(EditorModes.commentMode(null, 'not-dragging'))])
}, [thread?.id, setThreadReadStatus, dispatch])

const collabs = useStorage((storage) => storage.collaborators)

Expand Down
3 changes: 2 additions & 1 deletion editor/src/components/user-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ interface AvatarPictureProps {
initials: string
size?: number
isOffline?: boolean
resolved?: boolean
}

export const AvatarPicture = React.memo((props: AvatarPictureProps) => {
Expand Down Expand Up @@ -370,7 +371,7 @@ export const AvatarPicture = React.memo((props: AvatarPictureProps) => {
width: size ?? '100%',
height: size ?? '100%',
borderRadius: '100%',
filter: props.isOffline ? 'grayscale(1)' : undefined,
filter: props.isOffline || props.resolved ? 'grayscale(1)' : undefined,
pointerEvents: 'none',
}}
src={url}
Expand Down
Loading