-
-
Notifications
You must be signed in to change notification settings - Fork 433
fix: address CLS in downloads modal #1619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -264,7 +264,7 @@ const config = computed<VueUiSparklineConfig>(() => { | |
| </script> | ||
|
|
||
| <template> | ||
| <div class="space-y-8"> | ||
| <div class="space-y-8 h-[110px] motion-safe:h-[140px]"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @graphieros, I've noticed that this change causes a large blank area after the "Weekly Downloads" section collapses.
I'm considering moving the height limit ( If it does, please let me know, and I'd be happy to submit a follow-up PR!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes please :) |
||
| <CollapsibleSection id="downloads" :title="$t('package.downloads.title')"> | ||
| <template #actions> | ||
| <ButtonBase | ||
|
|
@@ -307,6 +307,10 @@ const config = computed<VueUiSparklineConfig>(() => { | |
| <SkeletonInline class="h-px w-full" /> | ||
| </div> | ||
| </div> | ||
| <!-- Animation toggle placeholder --> | ||
| <div class="w-full hidden motion-safe:flex flex-1 items-end justify-end"> | ||
| <SkeletonInline class="h-[20px] w-30" /> | ||
| </div> | ||
| </div> | ||
| </template> | ||
| </ClientOnly> | ||
|
|
@@ -351,10 +355,7 @@ const config = computed<VueUiSparklineConfig>(() => { | |
|
|
||
| <!-- This placeholder bears the same dimensions as the PackageTrendsChart component --> | ||
| <!-- Avoids CLS when the dialog has transitioned --> | ||
| <div | ||
| v-if="!hasChartModalTransitioned" | ||
| class="w-full aspect-[390/634.5] sm:aspect-[718/622.797]" | ||
| /> | ||
| <div v-if="!hasChartModalTransitioned" class="w-full aspect-[390/634.5] sm:aspect-[718/647]" /> | ||
| </PackageChartModal> | ||
| </template> | ||
|
|
||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.