Skip to content

Commit eac610a

Browse files
Adebesin-Cellclaude
andcommitted
fix: truncate long package names in compare OG image
Add max-width and ellipsis truncation to package names so they don't overflow when paired with large download numbers and version badges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 838cf32 commit eac610a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/components/OgImage/Compare.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ function barPct(downloads: number): string {
137137
<div v-for="pkg in stats" :key="pkg.name" class="flex flex-col gap-1">
138138
<!-- Label row: name + downloads + version -->
139139
<div class="flex items-center gap-3" style="font-family: 'Geist', sans-serif">
140-
<span class="text-2xl font-semibold tracking-tight" :style="{ color: pkg.color }">
140+
<span
141+
class="text-2xl font-semibold tracking-tight truncate max-w-[400px]"
142+
:style="{ color: pkg.color }"
143+
>
141144
{{ pkg.name }}
142145
</span>
143146
<span class="text-3xl font-bold text-[#fafafa]">

0 commit comments

Comments
 (0)