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
22 changes: 13 additions & 9 deletions app/components/Package/TrendsChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1758,23 +1758,25 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)

<!-- Custom legend for multiple series -->
<template #legend="{ legend }">
<div class="flex gap-x-6 gap-y-2 flex-wrap justify-center text-sm">
<div class="flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
<template v-if="isMultiPackageMode">
<button
v-for="datapoint in legend"
:key="datapoint.name"
:aria-pressed="datapoint.isSegregated"
:aria-label="datapoint.name"
type="button"
class="flex gap-1 place-items-center"
class="flex shrink-0 items-center gap-1 whitespace-nowrap"
@click="datapoint.segregate()"
>
<div class="h-3 w-3">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="datapoint.color" />
</svg>
</div>

<span
class="shrink-0 whitespace-nowrap"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
:style="{
textDecoration: datapoint.isSegregated ? 'line-through' : undefined,
}"
Expand All @@ -1786,24 +1788,24 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)

<!-- Single series legend (no user interaction) -->
<template v-else-if="legend.length > 0">
<div class="flex gap-1 place-items-center">
<div class="h-3 w-3">
<div class="flex shrink-0 items-center gap-1 whitespace-nowrap">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="legend[0]?.color" />
</svg>
</div>
<span>
<span class="shrink-0 whitespace-nowrap">
{{ legend[0]?.name }}
</span>
</div>
</template>

<!-- Estimation extra legend item -->
<div
class="flex gap-1 place-items-center"
class="flex shrink-0 items-center gap-1 whitespace-nowrap"
v-if="supportsEstimation || hasDownloadAnomalies"
>
<svg viewBox="0 0 20 2" width="20">
<svg viewBox="0 0 20 2" width="20" class="shrink-0">
<line
x1="0"
y1="1"
Expand All @@ -1814,7 +1816,9 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)
stroke-linecap="round"
/>
</svg>
<span class="text-fg-subtle">{{ $t('package.trends.legend_estimation') }}</span>
<span class="shrink-0 whitespace-nowrap text-fg-subtle">
{{ $t('package.trends.legend_estimation') }}
</span>
</div>
</div>
</template>
Expand Down
6 changes: 3 additions & 3 deletions app/components/Package/VersionDistribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -506,13 +506,13 @@ const chartConfig = computed<VueUiXyConfig>(() => {
<template #legend="{ legend }">
<div class="flex gap-4 flex-wrap justify-center pt-8">
<template v-if="legend.length > 0">
<div class="flex gap-1 place-items-center">
<div class="h-3 w-3">
<div class="flex gap-1 shrink-0 items-center whitespace-nowrap">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="legend[0]?.color" />
</svg>
</div>
<span>
<span class="shrink-0 whitespace-nowrap">
{{ legend[0]?.name }}
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"vite-plugin-pwa": "1.3.0",
"vite-plus": "catalog:vite-plus",
"vue": "3.5.42",
"vue-data-ui": "3.25.5",
"vue-data-ui": "3.25.6",
"vue-router": "5.2.0"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ minimumReleaseAgeExclude:
- '@nuxt/nitro-server@4.5.2'
- '@nuxt/schema@4.5.2'
- '@nuxt/vite-builder@4.5.2'
- vue-data-ui@3.25.6

minimumReleaseAgeExcludePrune: true

Expand Down
Loading