Skip to content

Commit c7d6d09

Browse files
committed
feat: switch dependency icons to be tappable tooltips
This changes the icons to be their own tappable (or clickable) icons which then open their tooltips. Before this change, there was no way to see them on mobile as a tap would click the version link and change page.
1 parent c887a5f commit c7d6d09

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

app/components/Package/Dependencies.vue

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,30 @@ const numberFormatter = useNumberFormatter()
120120
<span class="flex items-center gap-1 max-w-[40%]" dir="ltr">
121121
<TooltipApp
122122
v-if="outdatedDeps[dep]"
123-
class="shrink-0 p-2 -m-2"
123+
class="shrink-0"
124124
:class="getVersionClass(outdatedDeps[dep])"
125-
aria-hidden="true"
126125
:text="getOutdatedTooltip(outdatedDeps[dep], $t)"
127126
>
128-
<span class="i-lucide:circle-alert w-3 h-3" />
127+
<button
128+
type="button"
129+
class="p-2 -m-2"
130+
:aria-label="getOutdatedTooltip(outdatedDeps[dep], $t)"
131+
>
132+
<span class="i-lucide:circle-alert w-3 h-3" aria-hidden="true" />
133+
</button>
129134
</TooltipApp>
130135
<TooltipApp
131136
v-if="replacementDeps[dep]"
132-
class="shrink-0 p-2 -m-2 text-amber-700 dark:text-amber-500"
133-
aria-hidden="true"
137+
class="shrink-0 text-amber-700 dark:text-amber-500"
134138
:text="$t('package.dependencies.has_replacement')"
135139
>
136-
<span class="i-carbon:idea w-3 h-3" />
140+
<button
141+
type="button"
142+
class="p-2 -m-2"
143+
:aria-label="$t('package.dependencies.has_replacement')"
144+
>
145+
<span class="i-lucide:lightbulb w-3 h-3" aria-hidden="true" />
146+
</button>
137147
</TooltipApp>
138148
<LinkBase
139149
v-if="getVulnerableDepInfo(dep)"

0 commit comments

Comments
 (0)