Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions app/components/Compare/ComparisonGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ function getReplacementTooltip(col: ComparisonGridColumn): string {
<div class="flex items-start justify-center gap-1.5 min-w-0">
<LinkBase
:to="packageRoute(col.name, col.version)"
class="flex min-w-0 flex-col items-center text-center text-sm"
class="flex min-w-0 flex-1 flex-col items-center text-center text-sm"
:title="col.version ? `${col.name}@${col.version}` : col.name"
>
<span class="min-w-0 break-words line-clamp-1">
<span class="w-full truncate">
{{ col.name }}
</span>
<span v-if="col.version" class="text-fg-muted line-clamp-1">
<span v-if="col.version" class="w-full truncate text-fg-muted">
@{{ col.version }}
</span>
</LinkBase>
Expand Down
4 changes: 2 additions & 2 deletions test/nuxt/components/compare/ComparisonGrid.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('ComparisonGrid', () => {
expect(component.find('.comparison-cell-nodep').exists()).toBe(true)
})

it('renders package name and version on separate clamped lines with a full title attribute', async () => {
it('renders package name and version on separate truncated lines with a full title attribute', async () => {
const longName = 'very-long-package-name@1.0.0-beta.1'
const component = await mountSuspended(ComparisonGrid, {
props: {
Expand All @@ -56,7 +56,7 @@ describe('ComparisonGrid', () => {
const link = component.find(`a[title="${longName}"]`)
expect(link.exists()).toBe(true)
expect(link.attributes('title')).toBe(longName)
expect(link.findAll('.line-clamp-1')).toHaveLength(2)
expect(link.findAll('.truncate')).toHaveLength(2)
})
})

Expand Down
Loading