Skip to content

tag: fix bad tag change and flickering text #91927

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
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 4 additions & 30 deletions static/app/components/core/avatar/avatarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import styled from '@emotion/styled';

import {TeamAvatar} from 'sentry/components/core/avatar/teamAvatar';
import {UserAvatar, type UserAvatarProps} from 'sentry/components/core/avatar/userAvatar';
import {Tag} from 'sentry/components/core/badge/tag';
import {Tooltip} from 'sentry/components/core/tooltip';
import {space} from 'sentry/styles/space';
import type {Actor} from 'sentry/types/core';
import type {Team} from 'sentry/types/organization';
import type {AvatarUser} from 'sentry/types/user';
Expand Down Expand Up @@ -39,9 +39,9 @@ export function CollapsedAvatars({

if (hasStreamlinedUI) {
return (
<CollapsedAvatarPill ref={ref} data-test-id="avatarList-collapsedavatars">
<Tag ref={ref} data-test-id="avatarList-collapsedavatars">
{children}
</CollapsedAvatarPill>
</Tag>
);
}
return (
Expand Down Expand Up @@ -102,7 +102,7 @@ function AvatarList({
size={avatarSize}
data-test-id="avatarList-collapsedavatars"
>
{numCollapsedAvatars < 99 && <Plus>+</Plus>}
{numCollapsedAvatars < 99 && '+'}
{numCollapsedAvatars}
</CollapsedAvatars>
</Tooltip>
Expand Down Expand Up @@ -203,29 +203,3 @@ const CollapsedAvatarsCicle = styled('div')<{size: number}>`
border-radius: 50%;
${AvatarStyle};
`;

const CollapsedAvatarPill = styled('div')`
${AvatarStyle};

display: flex;
align-items: center;
gap: ${space(0.25)};
font-weight: ${p => p.theme.fontWeightNormal};
color: ${p => p.theme.subText};
height: 24px;
padding: 0 ${space(1)};
background-color: ${p => p.theme.surface400};
border: 1px solid ${p => p.theme.border};
border-radius: 24px;

${AvatarListWrapper}:hover & {
background-color: ${p => p.theme.surface100};
cursor: pointer;
}
`;

const Plus = styled('span')`
font-size: 10px;
margin-left: 1px;
margin-right: -1px;
`;
7 changes: 1 addition & 6 deletions static/app/components/core/avatar/baseAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function BaseAvatar({
);

return (
<Tooltip title={tooltip} disabled={!hasTooltip} {...tooltipOptions}>
<Tooltip title={tooltip} disabled={!hasTooltip} {...tooltipOptions} skipWrapper>
<AvatarContainer
ref={ref as React.Ref<HTMLSpanElement>}
data-test-id={`${type}-avatar`}
Expand All @@ -115,7 +115,6 @@ export function BaseAvatar({
suggested={!!suggested}
style={{...(size ? {height: size, width: size} : {}), ...style}}
title={title}
hasTooltip={hasTooltip}
{...props}
>
{hasError
Expand All @@ -137,17 +136,13 @@ export function BaseAvatar({
// Note: Avatar will not always be a child of a flex layout, but this seems like a
// sensible default.
const AvatarContainer = styled('span')<{
hasTooltip: boolean;
round: boolean;
suggested: boolean;
}>`
flex-shrink: 0;
border-radius: ${p => (p.round ? '50%' : '3px')};
border: ${p => (p.suggested ? `1px dashed ${p.theme.subText}` : 'none')};
background-color: ${p => (p.suggested ? p.theme.background : 'none')};
:hover {
pointer-events: ${p => (p.hasTooltip ? 'none' : 'auto')};
}
`;

interface BackgroundAvatarProps extends React.HTMLAttributes<SVGSVGElement> {
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/core/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const StyledBadge = styled('span')<BadgeProps>`
min-width: 20px;
line-height: 20px;
border-radius: 20px;
font-weight: ${p => p.theme.fontWeightBold};
font-weight: ${p => p.theme.fontWeightNormal};

/* @TODO(jonasbadalic) can we standardize this transition? */
transition: background 100ms linear;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ function ReleaseCardCommits({release, withHeading = true}: Props) {
].join(' ');

return (
<div className="release-stats">
<ReleaseStatsContainer className="release-stats">
{withHeading && <ReleaseSummaryHeading>{releaseSummary}</ReleaseSummaryHeading>}
<span style={{display: 'inline-block'}}>
<AvatarList users={authors} avatarSize={25} typeAvatars="authors" />
</span>
</div>
<AvatarList users={authors} avatarSize={25} typeAvatars="authors" />
</ReleaseStatsContainer>
);
}

const ReleaseStatsContainer = styled('div')`
display: flex;
align-items: center;
`;

const ReleaseSummaryHeading = styled('div')`
color: ${p => p.theme.subText};
font-size: ${p => p.theme.fontSizeSmall};
Expand Down
Loading