Skip to content

Commit 62e85e4

Browse files
committed
feat: add social likes facet to package trends charts
Generalize the download analytics chart into a trends chart that supports both downloads and likes, extensibly allowing for more facets in the future. - Add a facet selector (Downloads / Likes) shown on Compare page and in the single-package chart modal - Add server endpoint and utility for fetching per-package likes evolution from ATProto
1 parent 299a877 commit 62e85e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+945
-346
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import DownloadAnalytics from '../Package/DownloadAnalytics.vue'
2+
import TrendsChart from '../Package/TrendsChart.vue'
33
44
const { packages } = defineProps<{
55
packages: string[]
@@ -8,6 +8,6 @@ const { packages } = defineProps<{
88

99
<template>
1010
<div class="font-mono">
11-
<DownloadAnalytics :package-names="packages" :in-modal="false" />
11+
<TrendsChart :package-names="packages" :in-modal="false" show-facet-selector />
1212
</div>
1313
</template>

app/components/Package/ChartModal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
<script setup lang="ts"></script>
1+
<script setup lang="ts">
2+
defineProps<{
3+
modalTitle?: string
4+
}>()
5+
</script>
26

37
<template>
48
<Modal
5-
:modalTitle="$t('package.downloads.modal_title')"
9+
:modalTitle="modalTitle ?? $t('package.trends.title')"
610
id="chart-modal"
711
class="h-full sm:h-min sm:border sm:border-border sm:rounded-lg shadow-xl sm:max-h-[90vh] sm:max-w-3xl"
812
>

0 commit comments

Comments
 (0)