Skip to content

Commit f4a208b

Browse files
fix: handled label overflow in modules (#6451)
1 parent 8edff26 commit f4a208b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web/core/components/core/sidebar/single-progress-stats.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export const SingleProgressStats: React.FC<TSingleProgressStatsProps> = ({
2121
} ${selected ? "bg-custom-background-90" : ""}`}
2222
onClick={onClick}
2323
>
24-
<div className="w-1/2">{title}</div>
25-
<div className="flex w-1/2 items-center justify-end gap-1 px-2">
24+
<div className="w-4/6">{title}</div>
25+
<div className="flex w-2/6 items-center justify-end gap-1 px-2">
2626
<div className="flex h-5 items-center justify-center gap-1">
2727
<span className="w-8 text-right">
2828
{isNaN(Math.round((completed / total) * 100)) ? "0" : Math.round((completed / total) * 100)}%

web/core/components/modules/analytics-sidebar/progress-stats.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ export const LabelStatComponent = observer((props: TLabelStatComponent) => {
135135
<SingleProgressStats
136136
key={label.id}
137137
title={
138-
<div className="flex items-center gap-2">
139-
<span
140-
className="block h-3 w-3 rounded-full"
138+
<div className="flex items-center gap-2 truncate">
139+
<div
140+
className="h-3 w-3 rounded-full flex-shrink-0"
141141
style={{
142142
backgroundColor: label.color ?? "transparent",
143143
}}
144144
/>
145-
<span className="text-xs">{label.title ?? "No labels"}</span>
145+
<p className="text-xs text-ellipsis truncate">{label.title ?? "No labels"}</p>
146146
</div>
147147
}
148148
completed={label.completed}

0 commit comments

Comments
 (0)