-
-
Notifications
You must be signed in to change notification settings - Fork 197
fix(ui): improve MetricsBadges skeleton alignment #929
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 |
|---|---|---|
|
|
@@ -585,8 +585,8 @@ defineOgImageComponent('Package', { | |
| </span> | ||
|
|
||
| <!-- Package metrics (module format, types) --> | ||
| <ClientOnly> | ||
| <div class="flex gap-2 sm:gap-3 flex-wrap"> | ||
| <div class="flex gap-2 sm:gap-3 flex-wrap"> | ||
| <ClientOnly> | ||
| <PackageMetricsBadges | ||
| v-if="resolvedVersion" | ||
| :package-name="pkg.name" | ||
|
|
@@ -613,16 +613,18 @@ defineOgImageComponent('Package', { | |
| /> | ||
| <span>{{ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) }}</span> | ||
| </button> | ||
| </div> | ||
|
|
||
| <template #fallback> | ||
| <div class="flex items-center gap-1.5 self-baseline ms-1 sm:ms-2"> | ||
| <SkeletonBlock class="w-8 h-5 rounded" /> | ||
| <SkeletonBlock class="w-12 h-5 rounded" /> | ||
| <SkeletonBlock class="w-5 h-5 rounded" /> | ||
| </div> | ||
| </template> | ||
| </ClientOnly> | ||
| <template #fallback> | ||
| <div | ||
| class="flex items-center gap-1.5 list-none m-0 p-0 relative top-[5px] self-baseline ms-1 sm:ms-2" | ||
|
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. The
Member
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. what about having the text visible so it's just the icon that loads? we could even replace it with a spinner to give better feedback
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. That's probably a good idea, but if I may have a say, I'd do it as a next iterative improvement. It's likely not going to be such an easy fix as this was.
Member
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. pushed a first stab - what do you think?
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. Sweet!
wojtekmaj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > | ||
| <SkeletonBlock class="w-16 h-5.5 rounded" /> | ||
| <SkeletonBlock class="w-13 h-5.5 rounded" /> | ||
| <SkeletonBlock class="w-13 h-5.5 rounded" /> | ||
wojtekmaj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <SkeletonBlock class="w-13 h-5.5 rounded bg-bg-subtle" /> | ||
|
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. I intentionally used a white div as the like button is itself white, but I'm okay with this. |
||
| </div> | ||
| </template> | ||
| </ClientOnly> | ||
| </div> | ||
|
|
||
| <!-- Internal navigation: Docs + Code + Compare (hidden on mobile, shown in external links instead) --> | ||
| <nav | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.