Skip to content

Commit 54711c9

Browse files
abhi123vj4bh1zd
andauthored
fix: improve packages UI (#2530)
Co-authored-by: Abhiram S <120167005+4bh1zd@users.noreply.github.com>
1 parent c8fcd11 commit 54711c9

5 files changed

Lines changed: 13 additions & 11 deletions

File tree

app/components/Code/DirectoryListing.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const bytesFormatter = useBytesFormatter()
7474
<!-- Parent directory link -->
7575
<tr
7676
v-if="parentPath !== null"
77-
class="border-b border-border hover:bg-bg-subtle transition-colors"
77+
class="border-b border-border hover:bg-bg-subtle transition-[color,background-color] duration-100"
7878
>
7979
<td colspan="2">
8080
<LinkBase
@@ -98,7 +98,7 @@ const bytesFormatter = useBytesFormatter()
9898
<tr
9999
v-for="node in currentContents"
100100
:key="node.path"
101-
class="border-b border-border hover:bg-bg-subtle transition-colors"
101+
class="border-b border-border hover:bg-bg-subtle transition-[color,background-color] duration-100"
102102
>
103103
<td colspan="2">
104104
<LinkBase

app/components/Code/FileTree.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ watch(
5353
<!-- Directory -->
5454
<template v-if="node.type === 'directory'">
5555
<ButtonBase
56-
class="w-full justify-start! rounded-none! border-none!"
56+
class="w-full justify-start! rounded-none! border-none! transition-[color,background-color]! duration-100!"
5757
block
5858
:aria-pressed="isNodeActive(node)"
5959
:style="{ paddingLeft: `${depth * 12 + 12}px` }"
@@ -88,7 +88,7 @@ watch(
8888
variant="button-secondary"
8989
:to="getFileRoute(node.path)"
9090
:aria-current="currentPath === node.path"
91-
class="w-full justify-start! rounded-none! border-none!"
91+
class="w-full justify-start! rounded-none! border-none! transition-[color,background-color]! duration-100!"
9292
block
9393
:style="{ paddingLeft: `${depth * 12 + 32}px` }"
9494
>

app/components/Code/Header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ useEventListener('keydown', (event: KeyboardEvent) => {
254254
<ButtonBase
255255
class="px-3 max-xl:hidden"
256256
:disabled="loading"
257-
classicon="i-lucide:unfold-horizontal [.container-full>&]:i-lucide:fold-horizontal"
257+
classicon="i-lucide:unfold-horizontal [.container-full_&]:i-lucide:fold-horizontal"
258258
:aria-label="$t('code.toggle_container')"
259259
@click="toggleCodeContainer()"
260260
/>

app/components/Package/Versions.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,10 @@ function majorGroupContainsCurrent(group: (typeof otherMajorGroups.value)[0]): b
569569
<TooltipApp interactive position="top">
570570
<span
571571
tabindex="0"
572-
class="block cursor-help shrink-0 -m-2 p-2 -me-1 focus-visible:outline-2 focus-visible:outline-accent/70 rounded"
572+
class="group/tooltip block cursor-help shrink-0 -m-2 p-2 -me-1 focus-visible:outline-2 focus-visible:outline-accent/70 rounded"
573573
>
574574
<span
575-
class="block i-lucide:info w-3.5 h-3.5 text-fg-subtle"
575+
class="block i-lucide:info w-3.5 h-3.5 text-fg-subtle transition-colors group-hover/tooltip:text-fg"
576576
role="img"
577577
:aria-label="$t('package.versions.filter_help')"
578578
/>
@@ -783,7 +783,7 @@ function majorGroupContainsCurrent(group: (typeof otherMajorGroups.value)[0]): b
783783
<div class="p-1">
784784
<button
785785
type="button"
786-
class="flex items-center gap-2 text-start rounded-sm w-full"
786+
class="group/version-row flex items-center gap-2 text-start rounded-sm w-full"
787787
:class="otherVersionsContainsCurrent() ? 'bg-bg-subtle' : ''"
788788
:aria-expanded="otherVersionsExpanded"
789789
:aria-label="
@@ -809,7 +809,9 @@ function majorGroupContainsCurrent(group: (typeof otherMajorGroups.value)[0]): b
809809
aria-hidden="true"
810810
/>
811811
</span>
812-
<span class="text-xs text-fg-muted py-1.5">
812+
<span
813+
class="text-xs text-fg-muted py-1.5 group-hover/version-row:text-fg transition-colors"
814+
>
813815
{{ $t('package.versions.other_versions') }}
814816
<span v-if="hiddenTagRows.length > 0" class="text-fg-subtle">
815817
({{

app/pages/package/[[org]]/[name].vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ const showSkeleton = shallowRef(false)
679679
<TooltipApp v-if="sizeTooltip" :text="sizeTooltip" interactive>
680680
<span
681681
tabindex="0"
682-
class="inline-flex items-center justify-center min-w-6 min-h-6 -m-1 p-1 text-fg-subtle cursor-help focus-visible:outline-2 focus-visible:outline-accent/70 rounded"
682+
class="inline-flex items-center justify-center min-w-6 min-h-6 -m-1 p-1 text-fg-subtle hover:text-fg transition-colors cursor-help focus-visible:outline-2 focus-visible:outline-accent/70 rounded"
683683
>
684684
<span class="i-lucide:info w-3 h-3" aria-hidden="true" />
685685
</span>
@@ -937,7 +937,7 @@ const showSkeleton = shallowRef(false)
937937
</div>
938938

939939
<PackageSidebar :class="$style.areaSidebar">
940-
<div class="flex flex-col gap-4 sm:gap-6 xl:pt-4">
940+
<div class="flex flex-col gap-4 sm:gap-6 lg:pt-4">
941941
<!-- Team access controls (for scoped packages when connected) -->
942942
<ClientOnly>
943943
<PackageAccessControls :package-name="pkg.name" />

0 commit comments

Comments
 (0)