-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(ui): Simplify badges implementation #68946
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
ref(ui): Simplify badges implementation #68946
Conversation
Bundle ReportChanges will decrease total bundle size by 2.36kB ⬇️
|
331d7fc
to
9f3c748
Compare
0be814f
to
bbefb4e
Compare
9f205bf
to
1f6e43f
Compare
const membersUrl = | ||
member && org && !disableLink | ||
? `/settings/${org.slug}/members/${member.id}/` | ||
: undefined; | ||
|
||
const StyledNameAndEmail = styled('div')` | ||
flex-shrink: 1; | ||
min-width: 0; | ||
line-height: 1; | ||
`; | ||
|
||
const StyledEmail = styled('div')` | ||
font-size: 0.875em; | ||
margin-top: ${space(0.25)}; | ||
color: ${p => p.theme.gray300}; | ||
${p => p.theme.overflowEllipsis}; | ||
`; | ||
|
||
interface NameProps { | ||
hideEmail: boolean; | ||
to: LinkProps['to']; | ||
useLink: boolean; | ||
children?: React.ReactNode; | ||
return <UserBadge to={membersUrl} user={user} {...props} />; |
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.
this is amazing
const Wrapper = styled('div')` | ||
display: flex; | ||
gap: ${space(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.
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.
waiting to see the combo with #69009, will return to look again!
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.
this will have a merge conflict once #69009 merges
- The UserBadge no longer has a bunch of custom styling and uses the existing styles - The MemberBadge delegates to the User badge now
71de491
to
cc8df41
Compare
The UserBadge no longer has a bunch of custom styling and uses the
existing styles
The MemberBadge delegates to the User badge now