Skip to content

feat: add loading skeletons#1342

Open
TUPM96 wants to merge 1 commit into
SolFoundry:mainfrom
TUPM96:feat/bounty-827-loading-skeletons
Open

feat: add loading skeletons#1342
TUPM96 wants to merge 1 commit into
SolFoundry:mainfrom
TUPM96:feat/bounty-827-loading-skeletons

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 26, 2026

Closes #827

Summary

  • Add reusable shimmer skeleton components for bounty cards, leaderboard rows, profile bounty rows, and bounty detail layout.
  • Replace generic loading spinners/blocks on bounties, featured bounties, leaderboard, profile bounties, and bounty detail views.
  • Keep placeholder shapes close to the final content layout for smoother transitions into real data.
  • Add focused skeleton tests for status labels, shimmer rendering, and repeated row/card placeholders.
  • Restore tracked frontend shared helpers needed by the existing app imports and build.

Verification

  • git diff --check
  • npm run test -- loading-skeletons.test.tsx
  • npm run build

Wallet

  • Not included by automation; contributor should add their Solana wallet address before payout.

Copilot AI review requested due to automatic review settings May 26, 2026 02:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR introduces a shared skeleton-loading system across key frontend pages/components, and adds supporting utility/animation modules plus tests.

Changes:

  • Replaced several inline loading spinners/placeholders with reusable skeleton components.
  • Added new shared frontend utilities (utils.ts) and motion variants (animations.ts).
  • Added Vitest coverage for skeleton components’ accessibility/test IDs.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/src/pages/LeaderboardPage.tsx Switches leaderboard loading UI to shared LeaderboardSkeleton.
frontend/src/pages/BountyDetailPage.tsx Switches bounty detail loading UI to shared BountyDetailSkeleton.
frontend/src/lib/utils.ts Adds shared formatting + relative-time helpers used across UI.
frontend/src/lib/animations.ts Adds shared Framer Motion variants for consistent animations.
frontend/src/components/ui/Skeletons.tsx Introduces reusable skeleton components for multiple screens.
frontend/src/components/profile/ProfileDashboard.tsx Uses ProfileBountyListSkeleton for loading state.
frontend/src/components/home/FeaturedBounties.tsx Uses BountyGridSkeleton for homepage loading state.
frontend/src/components/bounty/BountyGrid.tsx Uses BountyGridSkeleton for grid loading state.
frontend/src/tests/loading-skeletons.test.tsx Adds tests asserting skeleton rendering and accessibility labels.
.gitignore Adjusts ignore rules so frontend/src/lib/** is committed.

Comment thread frontend/src/lib/utils.ts
const date = new Date(timestamp);
if (Number.isNaN(date.getTime())) return 'unknown';

const deltaSeconds = Math.max(0, Math.floor((Date.now() - date.getTime()) / 1000));
);
}

export function BountyGridSkeleton({ count = 6, className = 'grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5' }: { count?: number; className?: string }) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-wallet PR is missing a Solana wallet for bounty payout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T1: Loading Skeleton Animations

2 participants