🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Refactor SessionCardSkeleton components for improved visual consistency
Bill Yang24ae7179a644
diff --git a/client/src/app/[site]/globe/components/GlobeSessions.tsx b/client/src/app/[site]/globe/components/GlobeSessions.tsxindex cf02a3917..11f60a214 100644--- a/client/src/app/[site]/globe/components/GlobeSessions.tsx+++ b/client/src/app/[site]/globe/components/GlobeSessions.tsx@@ -32,9 +32,9 @@ function SessionCardSkeleton() {return (<div className="rounded-lg bg-neutral-850 border border-neutral-800 overflow-hidden p-2 space-y-2 animate-pulse"><div className="flex justify-between border-b border-neutral-700 pb-2">- <div className="flex items-center gap-2">- <div className="h-4 w-24 bg-neutral-700 rounded" />- <div className="h-4 w-4 bg-neutral-700 rounded" />+ <div className="flex items-center gap-1.5">+ <div className="h-4 w-4 bg-neutral-700 rounded-full" />+ <div className="h-3 w-24 bg-neutral-700 rounded" /></div><div className="flex items-center gap-1.5"><div className="h-3 w-20 bg-neutral-700 rounded" />@@ -43,13 +43,13 @@ function SessionCardSkeleton() {</div></div><div className="flex space-x-2 items-center">- <div className="h-6 w-6 bg-neutral-700 rounded" />- <div className="h-6 w-6 bg-neutral-700 rounded" />- <div className="h-6 w-6 bg-neutral-700 rounded" />- <div className="h-6 w-6 bg-neutral-700 rounded" />- <div className="h-6 w-16 bg-neutral-700 rounded" />- <div className="h-6 w-16 bg-neutral-700 rounded" />- <div className="h-6 w-20 bg-neutral-700 rounded" />+ <div className="h-4 w-4 bg-neutral-700 rounded-sm" />+ <div className="h-4 w-4 bg-neutral-700 rounded-sm" />+ <div className="h-4 w-4 bg-neutral-700 rounded-sm" />+ <div className="h-4 w-4 bg-neutral-700 rounded-sm" />+ <div className="h-[21px] w-12 bg-neutral-700 rounded-sm" />+ <div className="h-[21px] w-12 bg-neutral-700 rounded-sm" />+ <div className="h-[21px] w-16 bg-neutral-700 rounded-sm" /></div><div className="items-center flex-1 min-w-0 hidden md:flex gap-2"><div className="h-3 w-32 bg-neutral-700 rounded" />diff --git a/client/src/components/Sessions/SessionCard.tsx b/client/src/components/Sessions/SessionCard.tsxindex c5118d5e5..08a1e5a68 100644--- a/client/src/components/Sessions/SessionCard.tsx+++ b/client/src/components/Sessions/SessionCard.tsx@@ -182,19 +182,19 @@ export const SessionCardSkeleton = memo(() => {<div className="flex items-center gap-2">{/* Avatar and User ID */}<div className="hidden md:flex items-center gap-2">- <Skeleton className="h-3 w-14" />+ <Skeleton className="h-6 w-6 rounded-full" />+ <Skeleton className="h-3 w-24" /></div>- {/* Icons */}- <div className="flex space-x-2 items-center md:ml-3">+ {/* Icons section */}+ <div className="flex space-x-2 items-center">+ <Skeleton className="h-4 w-4 rounded-sm" />+ <Skeleton className="h-4 w-4 rounded-sm" /><Skeleton className="h-4 w-4 rounded-sm" />- <Skeleton className="h-4 w-4 rounded-sm flex-shrink-0" />- <Skeleton className="h-4 w-4 rounded-sm flex-shrink-0" /><Skeleton className="h-4 w-4 rounded-sm" /><Skeleton className="h-[21px] w-12 rounded-sm" /><Skeleton className="h-[21px] w-12 rounded-sm" />- <Skeleton className="h-[21px] w-12 rounded-sm" />- <Skeleton className="h-[21px] w-12 rounded-sm" />+ <Skeleton className="h-[21px] w-16 rounded-sm" /></div>{/* Entry/Exit paths with randomized widths */}@@ -206,13 +206,11 @@ export const SessionCardSkeleton = memo(() => {<Skeleton className={cn("h-3 max-w-[200px]", getRandomWidth())} /></div>- {/* Time */}- <div className="flex items-center gap-4">- {/* Date/time skeleton */}+ {/* Time information */}+ <div className="flex items-center gap-1.5"><Skeleton className={cn("h-3", getRandomTimeWidth())} />-- {/* Duration skeleton */}- <Skeleton className={cn("h-3", getRandomDurationWidth(), "hidden md:block")} />+ <Skeleton className="h-3 w-1" />+ <Skeleton className={cn("h-3 hidden md:block", getRandomDurationWidth())} /></div>{/* Expand icon */}