-
Notifications
You must be signed in to change notification settings - Fork 432
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
chore(comments): add support for comments layout avatar config #5944
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
Component Testing Report Updated Mar 11, 2024 11:30 AM (UTC)
|
packages/sanity/src/structure/comments/src/components/list/CommentsListItemLayout.tsx
Outdated
Show resolved
Hide resolved
packages/sanity/src/structure/comments/src/components/list/CommentsListItem.tsx
Outdated
Show resolved
Hide resolved
packages/sanity/src/structure/comments/src/components/list/CommentsListItem.tsx
Outdated
Show resolved
Hide resolved
398a1bf
to
1e96825
Compare
@@ -325,7 +344,7 @@ export function CommentsListItemLayout(props: CommentsListItemLayoutProps) { | |||
> | |||
<InnerStack space={1} data-muted={displayError}> | |||
<Flex align="center" gap={FLEX_GAP} flex={1}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the parent comment does not have an avatar, the spacing between the author name and the comment message is a bit off (see image). To address this, I suggest creating a styled component of this Flex
– like HeaderFlex
– which has a min height of 25px
.
const HeaderFlex = styled(Flex)`
min-height: ${AVATAR_HEIGHT};
`
Before and after:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pedrobonamin!
* chore(comments): add support for comments layout avatar config * chore(comments): remove show prop from SpacerAvatar * fix(comments): nitpicks * fix(comments): add min height to the comment list item header
* chore(comments): add support for comments layout avatar config * chore(comments): remove show prop from SpacerAvatar * fix(comments): nitpicks * fix(comments): add min height to the comment list item header
Description
Adds support for avatar config in comments layout.
Supports building the UI needed for tasks.
Notice how the avatar size is reduced and also removed from the parent comment.
What to review
Testing
Notes for release