Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/components/dashboard/LeaderBoard/leaderboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
.sidebar-badge-icon {
width: 36px;
height: 36px;
border-radius: 50%;
object-fit: contain;
transition: transform 0.15s ease;
}

Expand All @@ -344,23 +344,29 @@
color: #f9fafb;
font-size: 11px;
font-weight: 600;
padding: 8px 12px;
display: flex;
align-items: center;
gap: 6px;
white-space: nowrap;
Comment on lines +347 to 351
padding: 6px 10px;
border-radius: 6px;
clip-path: polygon(
25% 0,
75% 0,
100% 50%,
75% 100%,
25% 100%,
0 50%
);
opacity: 0;
pointer-events: none;
transition: opacity 0.15s ease, transform 0.15s ease;
z-index: 10;
}

.sidebar-badge-tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: #111827;
.sidebar-badge-tooltip > img {
width: 42px;
height: 42px;
object-fit: contain;
}

.sidebar-badge-item:hover .sidebar-badge-tooltip,
Expand Down
5 changes: 4 additions & 1 deletion src/components/dashboard/LeaderBoard/leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
badges?: string[]; // Array of badge image paths
}

interface Stats {

Check warning on line 50 in src/components/dashboard/LeaderBoard/leaderboard.tsx

View workflow job for this annotation

GitHub Actions / lint

'Stats' is defined but never used
flooredTotalPRs: number;
totalContributors: number;
flooredTotalPoints: number;
Expand All @@ -60,7 +60,7 @@
*/
function getContributorBadges(
contributor: Contributor,
_rank: number,

Check warning on line 63 in src/components/dashboard/LeaderBoard/leaderboard.tsx

View workflow job for this annotation

GitHub Actions / lint

'_rank' is defined but never used
): string[] {
return BADGE_CONFIG.filter((badge) =>
badge.criteria(contributor.prs, contributor.points),
Expand Down Expand Up @@ -144,7 +144,7 @@
);
}

function TopPerformerCard({

Check warning on line 147 in src/components/dashboard/LeaderBoard/leaderboard.tsx

View workflow job for this annotation

GitHub Actions / lint

'TopPerformerCard' is defined but never used
contributor,
rank,
onPRClick,
Expand Down Expand Up @@ -297,7 +297,7 @@

const renderPaginationButtons = () => {
const pages = [];
const maxVisibleButtons = 5; // Maximum number of page buttons to show directly

Check warning on line 300 in src/components/dashboard/LeaderBoard/leaderboard.tsx

View workflow job for this annotation

GitHub Actions / lint

'maxVisibleButtons' is assigned a value but never used

// Special case: if we have 7 or fewer pages, show all of them without ellipsis
if (totalPages <= 7) {
Expand Down Expand Up @@ -477,7 +477,7 @@
value={currentTimeFilter}
onChange={(e) => {
// Use setTimeFilter from context
setTimeFilter(e.target.value as any);

Check warning on line 480 in src/components/dashboard/LeaderBoard/leaderboard.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
setCurrentPage(1);
setIsSelectChanged(true);
setTimeout(() => setIsSelectChanged(false), 1200);
Expand Down Expand Up @@ -941,7 +941,10 @@
alt={badgeName}
className="sidebar-badge-icon"
/>
<span className="sidebar-badge-tooltip">{badgeName}</span>
<span className="sidebar-badge-tooltip" aria-hidden="true">
<img src={badge} alt="" />
<span>{badgeName}</span>
</span>
</button>
);
})}
Expand Down
Loading