Skip to content

Commit f0a4034

Browse files
committed
further page optimizations
1 parent f508d0b commit f0a4034

3 files changed

Lines changed: 32 additions & 42 deletions

File tree

assets/styles.css

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,7 @@ a {
804804
/* Size badges */
805805
.badge-size {
806806
font-weight: 700;
807-
margin-right: var(--space-1);
808-
}
807+
809808

810809
.badge-size-xxs {
811810
background: rgb(236 252 203 / 0.5);
@@ -863,17 +862,25 @@ a {
863862

864863
/* Skeleton Loading */
865864
.skeleton {
866-
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
867-
background-size: 200% 100%;
868-
animation: loading 1.5s ease-in-out infinite;
865+
background: #f0f0f0;
869866
border-radius: 4px;
867+
position: relative;
868+
overflow: hidden;
870869
}
871870

872-
@keyframes loading {
873-
0% { background-position: 200% 0; }
874-
100% { background-position: -200% 0; }
871+
.skeleton::after {
872+
content: "";
873+
position: absolute;
874+
top: 0;
875+
left: 0;
876+
right: 0;
877+
bottom: 0;
878+
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
879+
transform: translateX(-100%);
875880
}
876881

882+
/* Removed loading animation for performance */
883+
877884
.skeleton-pr-card {
878885
background: #ffffff;
879886
border: 1px solid rgba(0, 0, 0, 0.1);
@@ -1311,23 +1318,15 @@ a {
13111318
display: inline-block;
13121319
color: var(--color-text-muted);
13131320
font-size: var(--text-sm);
1314-
animation: pulse 1.5s ease-in-out infinite;
1321+
opacity: 0.6;
13151322
}
13161323

13171324
.stat-value.loading {
13181325
color: var(--color-text-muted);
1319-
animation: pulse 1.5s ease-in-out infinite;
1326+
opacity: 0.6;
13201327
}
13211328

1322-
@keyframes pulse {
1323-
0%,
1324-
100% {
1325-
opacity: 0.4;
1326-
}
1327-
50% {
1328-
opacity: 1;
1329-
}
1330-
}
1329+
/* Removed pulse animation for performance */
13311330

13321331
.chart-container {
13331332
display: flex;
@@ -1559,19 +1558,7 @@ a {
15591558
}
15601559

15611560
.floating-icon.pulse {
1562-
animation: pulse 2s infinite;
1563-
}
1564-
1565-
@keyframes pulse {
1566-
0% {
1567-
transform: rotate(-15deg) scale(1);
1568-
}
1569-
50% {
1570-
transform: rotate(-15deg) scale(1.05);
1571-
}
1572-
100% {
1573-
transform: rotate(-15deg) scale(1);
1574-
}
1561+
/* Removed animation for performance */
15751562
}
15761563

15771564
.card-content {
@@ -2838,10 +2825,7 @@ a {
28382825
text-transform: uppercase;
28392826
letter-spacing: 0.5px;
28402827
margin-left: 0.375rem;
2841-
animation: pulse 2s ease-in-out infinite;
2828+
/* Removed animation for performance */
28422829
}
28432830

2844-
@keyframes pulse {
2845-
0%, 100% { opacity: 1; transform: scale(1); }
2846-
50% { opacity: 0.9; transform: scale(1.05); }
2847-
}
2831+
/* Removed pulse animation for performance */

assets/user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// User PR Dashboard Module for Ready To Review
2-
import { $, $$, show, hide, escapeHtml } from './utils.js';
2+
import { $, $$, show, hide, escapeHtml } from './utils.js';\n\n// Request deduplication cache\nconst pendingRequests = new Map();
33

44
export const User = (() => {
55
"use strict";
@@ -515,13 +515,13 @@ export const User = (() => {
515515

516516
if (state.currentUser) {
517517
displayContent = `
518-
<img src="${state.currentUser.avatar_url}" alt="${state.currentUser.login}" class="user-avatar">
518+
<img src="${state.currentUser.avatar_url}" alt="${state.currentUser.login}" class="user-avatar" width="32" height="32">
519519
<span class="user-name">${state.currentUser.name || state.currentUser.login}</span>
520520
<button onclick="window.App.logout()" class="btn btn-primary">Logout</button>
521521
`;
522522
} else if (viewingUser) {
523523
displayContent = `
524-
<img src="${viewingUser.avatar_url}" alt="${viewingUser.login}" class="user-avatar">
524+
<img src="${viewingUser.avatar_url}" alt="${viewingUser.login}" class="user-avatar" width="32" height="32">
525525
<span class="user-name">Viewing: ${viewingUser.name || viewingUser.login}</span>
526526
<button id="loginBtn" class="btn btn-primary">Login</button>
527527
`;
@@ -940,7 +940,7 @@ export const User = (() => {
940940
</div>
941941
<div class="pr-meta">
942942
<div class="pr-meta-left">
943-
<img src="${pr.user.avatar_url}" alt="${pr.user.login}" class="author-avatar" loading="lazy">
943+
<img src="${pr.user.avatar_url}" alt="${pr.user.login}" class="author-avatar" loading="lazy" width="20" height="20">
944944
<span class="pr-repo">${pr.repository.full_name}</span>
945945
<span class="pr-number">#${pr.number}</span>
946946
<span class="pr-author">by ${pr.user.login}</span>
@@ -1089,7 +1089,7 @@ export const User = (() => {
10891089
.slice(0, maxShow)
10901090
.map(
10911091
(reviewer) =>
1092-
`<img src="${reviewer.avatar_url}" alt="${reviewer.login}" class="reviewer-avatar" loading="lazy" title="${reviewer.login}">`,
1092+
`<img src="${reviewer.avatar_url}" alt="${reviewer.login}" class="reviewer-avatar" loading="lazy" width="16" height="16" title="${reviewer.login}">`,
10931093
)
10941094
.join("");
10951095

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
<link rel="stylesheet" href="/assets/styles.css" />
1212
<link rel="icon" href="/favicon.ico" />
1313
<link rel="preconnect" href="https://api.github.com" />
14+
<link rel="dns-prefetch" href="https://api.github.com" />
15+
<link rel="preconnect" href="https://avatars.githubusercontent.com" />
16+
<link rel="dns-prefetch" href="https://avatars.githubusercontent.com" />
17+
<link rel="modulepreload" href="/assets/app.js" />
18+
<link rel="modulepreload" href="/assets/user.js" />
19+
<link rel="modulepreload" href="/assets/utils.js" />
1420
</head>
1521
<body>
1622
<div id="app">

0 commit comments

Comments
 (0)