Skip to content

Commit 5519ca3

Browse files
committed
fix: address CLS in downloads modal
1 parent f4943b9 commit 5519ca3

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

app/components/Package/TrendsChart.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,11 @@ watch(selectedMetric, value => {
16821682
</h2>
16831683

16841684
<!-- Chart panel (active metric) -->
1685-
<div role="region" aria-labelledby="trends-chart-title" class="min-h-[260px]">
1685+
<div
1686+
role="region"
1687+
aria-labelledby="trends-chart-title"
1688+
:class="isMobile ? 'min-h-[260px]' : 'min-h-[567px]'"
1689+
>
16861690
<ClientOnly v-if="chartData.dataset">
16871691
<div :data-pending="pending" :data-minimap-visible="maxDatapoints > 6">
16881692
<VueUiXy

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,7 @@ const config = computed<VueUiSparklineConfig>(() => {
351351

352352
<!-- This placeholder bears the same dimensions as the PackageTrendsChart component -->
353353
<!-- Avoids CLS when the dialog has transitioned -->
354-
<div
355-
v-if="!hasChartModalTransitioned"
356-
class="w-full aspect-[390/634.5] sm:aspect-[718/622.797]"
357-
/>
354+
<div v-if="!hasChartModalTransitioned" class="w-full aspect-[390/634.5] sm:aspect-[718/647]" />
358355
</PackageChartModal>
359356
</template>
360357

0 commit comments

Comments
 (0)