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

fix: avoid awkward overlaps of group cards with lots of members, long project names, and small cards #7915

Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ const StyledTitleRow = styled(StyledRow)(() => ({
alignItems: 'flex-start',
}));

const StyledBottomRow = styled(StyledRow)(() => ({
const StyledBottomRow = styled(StyledRow)(({ theme }) => ({
marginTop: 'auto',
alignItems: 'flex-end',
gap: theme.spacing(1),
}));

const StyledHeaderTitle = styled('h2')(({ theme }) => ({
Expand Down Expand Up @@ -85,6 +87,10 @@ const InfoBadgeDescription = styled('span')(({ theme }) => ({
fontSize: theme.fontSizes.smallBody,
}));

const ProjectNameBadge = styled(Badge)({
wordBreak: 'break-word',
});

interface IGroupCardProps {
group: IGroup;
onEditUsers: (group: IGroup) => void;
Expand Down Expand Up @@ -150,7 +156,7 @@ export const GroupCard = ({
placement='bottom-end'
describeChild
>
<Badge
<ProjectNameBadge
onClick={(e) => {
e.preventDefault();
navigate(
Expand All @@ -161,7 +167,7 @@ export const GroupCard = ({
icon={<TopicOutlinedIcon />}
>
{project}
</Badge>
</ProjectNameBadge>
</Tooltip>
))}
elseShow={
Expand Down
Loading