Skip to content

Commit 704987b

Browse files
RYGRITdanielroe
andauthored
fix: add back button and centre icon on compare page (#941)
Co-authored-by: Daniel Roe <daniel@roe.dev>
1 parent c7ba252 commit 704987b

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

app/components/Compare/FacetCard.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ function getShortName(header: string): string {
7575
<!-- Facet header -->
7676
<div class="flex items-center gap-1.5 px-3 py-2 bg-bg-subtle border-b border-border">
7777
<span class="text-xs text-fg-muted uppercase tracking-wider font-medium">{{ label }}</span>
78-
<span
79-
v-if="description"
80-
class="i-carbon:information w-3 h-3 text-fg-subtle"
81-
:title="description"
82-
aria-hidden="true"
83-
/>
78+
<TooltipApp v-if="description" :text="description" position="top">
79+
<span
80+
class="i-carbon:information w-3 h-3 text-fg-subtle"
81+
:title="description"
82+
aria-hidden="true"
83+
/>
84+
</TooltipApp>
8485
</div>
8586

8687
<!-- Package values -->

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function handleBlur() {
7575
:aria-label="$t('compare.selector.remove_package', { package: pkg })"
7676
@click="removePackage(pkg)"
7777
>
78-
<span class="i-carbon:close w-3.5 h-3.5" aria-hidden="true" />
78+
<span class="i-carbon:close flex items-center w-3.5 h-3.5" aria-hidden="true" />
7979
</button>
8080
</div>
8181
</div>

app/pages/compare.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<script setup lang="ts">
22
import { useRouteQuery } from '@vueuse/router'
33
4-
const router = useRouter()
5-
64
definePageMeta({
75
name: 'compare',
86
})
97
8+
const router = useRouter()
9+
1010
// Sync packages with URL query param (stable ref - doesn't change on other query changes)
1111
const packagesParam = useRouteQuery<string>('packages', '', { mode: 'replace' })
1212
@@ -182,7 +182,10 @@ useSeoMeta({
182182
</section>
183183

184184
<!-- Empty state -->
185-
<section v-else class="text-center py-16 border border-dashed border-border rounded-lg">
185+
<section
186+
v-else
187+
class="text-center px-1.5 py-16 border border-dashed border-border rounded-lg"
188+
>
186189
<div class="i-carbon:compare w-12 h-12 text-fg-subtle mx-auto mb-4" aria-hidden="true" />
187190
<h2 class="font-mono text-lg text-fg-muted mb-2">
188191
{{ $t('compare.packages.empty_title') }}

0 commit comments

Comments
 (0)