-
Notifications
You must be signed in to change notification settings - Fork 32
Add shimmer loading skeleton for analysis dashboard #86
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
4b5b5c2
7e20e05
f037ae9
361b12a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import GlassCard from "../GlassCard"; | ||
| export default function ScanSkeleton() { | ||
| return ( | ||
| <div className="p-6 space-y-6 animate-pulse"> | ||
| <div className="flex flex-col md:flex-row gap-6"> | ||
| <GlassCard className="flex-1 p-8"> | ||
| <div className="h-4 w-32 skeleton-shimmer rounded mb-4"></div> | ||
| <div className="h-16 w-40 skeleton-shimmer rounded mb-4"></div> | ||
| <div className="h-2 w-full skeleton-shimmer rounded"></div> | ||
| </GlassCard> | ||
|
|
||
| <GlassCard className="md:w-72 p-6"> | ||
| <div className="h-4 w-24 skeleton-shimmer rounded mb-4"></div> | ||
| <div className="h-8 w-full skeleton-shimmer rounded mb-3"></div> | ||
| <div className="h-8 w-full skeleton-shimmer rounded"></div> | ||
| </GlassCard> | ||
| </div> | ||
|
|
||
| <GlassCard className="p-6"> | ||
| <div className="h-5 w-40 skeleton-shimmer rounded mb-4"></div> | ||
| <div className="space-y-3"> | ||
| <div className="h-16 skeleton-shimmer rounded"></div> | ||
| <div className="h-16 skeleton-shimmer rounded"></div> | ||
| <div className="h-16 skeleton-shimmer rounded"></div> | ||
| </div> | ||
| </GlassCard> | ||
|
|
||
| <GlassCard className="p-4"> | ||
| <div className="h-12 skeleton-shimmer rounded"></div> | ||
| </GlassCard> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -396,4 +396,25 @@ input::placeholder { | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @media print { | ||||||||||||||||||||||||||
| nav, .print\:hidden { display: none !important; } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| @keyframes shimmer { | ||||||||||||||||||||||||||
| 0% { | ||||||||||||||||||||||||||
| background-position: -200% 0; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 100% { | ||||||||||||||||||||||||||
| background-position: 200% 0; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .skeleton-shimmer { | ||||||||||||||||||||||||||
| background: linear-gradient( | ||||||||||||||||||||||||||
| 90deg, | ||||||||||||||||||||||||||
| var(--color-surface-mid) 25%, | ||||||||||||||||||||||||||
| var(--color-surface-highest) 50%, | ||||||||||||||||||||||||||
| var(--color-surface-mid) 75% | ||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| background-size: 200% 100%; | ||||||||||||||||||||||||||
| animation: shimmer 1.5s linear infinite; | ||||||||||||||||||||||||||
|
Comment on lines
+418
to
+419
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. Fix stylelint violation before There is an empty line before Proposed fix .skeleton-shimmer {
background: linear-gradient(
90deg,
var(--color-surface-mid) 25%,
var(--color-surface-highest) 50%,
var(--color-surface-mid) 75%
);
-
background-size: 200% 100%;
animation: shimmer 1.5s linear infinite;
}📝 Committable suggestion
Suggested change
🧰 Tools🪛 Stylelint (17.12.0)[error] 418-418: Expected no empty line before declaration (declaration-empty-line-before) (declaration-empty-line-before) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loading shell dimensions don’t match the final dashboard, causing avoidable layout shift.
Line 4 uses a different outer layout than the loaded dashboard (
min-h, responsive horizontal padding, centeredmax-w-4xlwrapper), so the page reflows when loading completes. This misses the acceptance requirement to minimize content jumping.Proposed fix
export default function ScanSkeleton() { return ( - <div className="p-6 space-y-6 animate-pulse"> - <div className="flex flex-col md:flex-row gap-6"> + <div className="min-h-[calc(100vh-4rem)] px-6 md:px-16 lg:px-24 py-8 md:py-12"> + <div className="max-w-4xl mx-auto space-y-6 animate-pulse"> + <div className="flex flex-col md:flex-row gap-6"> <GlassCard className="flex-1 p-8"> <div className="h-4 w-32 skeleton-shimmer rounded mb-4"></div> <div className="h-16 w-40 skeleton-shimmer rounded mb-4"></div> <div className="h-2 w-full skeleton-shimmer rounded"></div> </GlassCard> @@ - <GlassCard className="p-4"> - <div className="h-12 skeleton-shimmer rounded"></div> - </GlassCard> + <GlassCard className="p-4"> + <div className="h-12 skeleton-shimmer rounded"></div> + </GlassCard> + </div> </div> ); }📝 Committable suggestion
🤖 Prompt for AI Agents