Skip to content

Conversation

@joshuasilva414
Copy link
Contributor

@joshuasilva414 joshuasilva414 commented Mar 31, 2025

Why

  • Stats displayed on the admin overview and stat sheets need to be cleaned up
  • We need more stats on the admin overview
  • Loading states look immature right now

What

  • New grid of charts on admin overview page
  • Refactored stats sheets to be more customizable
  • Add skeletons for loading tables and stats sheets on admin

Satisfies

@joshuasilva414 joshuasilva414 linked an issue Mar 31, 2025 that may be closed by this pull request
@joshuasilva414 joshuasilva414 requested a review from Copilot March 31, 2025 18:31
Copy link

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

This PR overhauls the stats and loading states for both the admin overview and stat sheets, providing a cleaner UI presentation along with a grid of charts and updated loading skeletons. Key changes include:

  • New loading skeleton components for events, semesters, members, events, checkins, and categories.
  • Refactoring of admin overview to integrate Suspense components with more polished skeleton loaders.
  • Updates to the admin members column definitions for improved date formatting.

Reviewed Changes

Copilot reviewed 45 out of 47 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/web/src/app/events/loading.tsx Added Loading component with card skeletons for the events page.
apps/web/src/app/events/[slug]/loading.tsx Introduced a skeleton-loaded event detail page with Navbar.
apps/web/src/app/events/[slug]/checkin/page.tsx Removed the Suspense wrapper, rendering EventCheckin directly.
apps/web/src/app/events/[slug]/checkin/loading.tsx Added a straightforward loading component for event checkin.
apps/web/src/app/admin/semesters/page.tsx Updated Suspense fallback to use an AdminPageSkeletonContent.
apps/web/src/app/admin/semesters/loading.tsx Created a loading component for the semesters page.
apps/web/src/app/admin/page.tsx Refactored the admin overview with new Suspense wrappers and skeleton loaders for various sections.
apps/web/src/app/admin/members/page.tsx Removed the Suspense wrapper around the MemberStatsSheet component.
apps/web/src/app/admin/members/loading.tsx Introduced a loading skeleton for the members page.
apps/web/src/app/admin/members/columns.tsx Corrected the date column accessor to use "joinDate" for proper formatting.
apps/web/src/app/admin/loading.tsx Added a loading component for the overall admin page using skeleton loaders.
apps/web/src/app/admin/layout.tsx Removed Suspense fallback in the Admin layout, rendering children directly.
apps/web/src/app/admin/events/page.tsx Modified the Suspense fallback styling for event stats.
apps/web/src/app/admin/events/loading.tsx Added a loading skeleton for admin events.
apps/web/src/app/admin/checkins/page.tsx Updated Suspense fallbacks for both checkin stats and checkin log, introducing styled loading messages.
apps/web/src/app/admin/checkins/loading.tsx Added a loading component for checkins.
apps/web/src/app/admin/categories/page.tsx Simplified the Categories page by removing unnecessary Suspense wrapping.
apps/web/src/app/admin/categories/loading.tsx Added a loading component for categories.
Files not reviewed (2)
  • apps/web/package.json: Language not supported
  • apps/web/src/app/globals.css: Language not supported
Comments suppressed due to low confidence (3)

apps/web/src/app/admin/layout.tsx:45

  • Removing the Suspense fallback here may lead to unhandled loading states if any child component fetches data asynchronously. Consider reintroducing a fallback to provide a consistent loading experience.
{children}

apps/web/src/app/admin/members/page.tsx:15

  • The removal of the Suspense wrapper around MemberStatsSheet might result in a missing loading indicator during data fetches. Wrapping it in a Suspense fallback could provide better feedback for end-users.
<MemberStatsSheet />

apps/web/src/app/events/[slug]/checkin/page.tsx:28

  • Removing the Suspense wrapper that previously provided a loading indicator for the EventCheckin component may lead to a lack of user feedback while data is fetched. Consider adding a fallback to improve the user experience if the data retrieval is delayed.
<Navbar />

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 31, 2025

Deploying clubkit with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7e04429
Status: ✅  Deploy successful!
Preview URL: https://97a1f203.clubkit.pages.dev
Branch Preview URL: https://feat-stats-overhaul.clubkit.pages.dev

View logs

@joshuasilva414
Copy link
Contributor Author

Ran prettier formatter locally and it passed

@christianhelp
Copy link
Contributor

I think something is wrong with the versioning for prettier, but not too sure haven't looked at it too much

@christianhelp christianhelp merged commit 2c000d5 into dev Apr 2, 2025
1 of 2 checks passed
@christianhelp christianhelp deleted the feat/stats-overhaul branch April 5, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More Admin Overview Charts/Actions Refactor Stats for Reusability

3 participants