Skip to content

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

Merged

Conversation

evanpurkhiser
Copy link
Member

  • The UserBadge no longer has a bunch of custom styling and uses the
    existing styles

  • The MemberBadge delegates to the User badge now

@evanpurkhiser evanpurkhiser requested review from a team as code owners April 15, 2024 22:15
@evanpurkhiser evanpurkhiser requested review from a team and removed request for a team April 15, 2024 22:15
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Bundle Report

Changes will decrease total bundle size by 2.36kB ⬇️

Bundle name Size Change
app-webpack-bundle-array-push 26.29MB 2.36kB ⬇️

@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-ui-simplify-badges-implementation branch from 331d7fc to 9f3c748 Compare April 15, 2024 22:28
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-ui-simplify-badges-implementation branch from 0be814f to bbefb4e Compare April 16, 2024 15:30
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-ui-simplify-badges-implementation branch from 9f205bf to 1f6e43f Compare April 16, 2024 16:05
Comment on lines +32 to +37
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} />;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is amazing

@ryan953 ryan953 requested a review from a team April 16, 2024 16:48
const Wrapper = styled('div')`
display: flex;
gap: ${space(1)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk if this is properly replacing the margin-right that StyledAvatar had before.

The problem I'm seeing is that the replay breadcrumbItem has no spacing now:
SCR-20240416-jpqv

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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!

Copy link
Member Author

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
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-ui-simplify-badges-implementation branch from 71de491 to cc8df41 Compare April 16, 2024 18:10
@evanpurkhiser evanpurkhiser merged commit 4f24d94 into master Apr 16, 2024
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-ui-simplify-badges-implementation branch April 16, 2024 18:53
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants