Skip to content

feat: Replace loading spinners with skeleton UI in mentorship portal#3814

Closed
fasiho7 wants to merge 1 commit intoOWASP:mainfrom
fasiho7:feat/mentorship-skeleton-ui-replacement
Closed

feat: Replace loading spinners with skeleton UI in mentorship portal#3814
fasiho7 wants to merge 1 commit intoOWASP:mainfrom
fasiho7:feat/mentorship-skeleton-ui-replacement

Conversation

@fasiho7
Copy link

@fasiho7 fasiho7 commented Feb 6, 2026

Major UX improvement to enhance perceived loading time and user experience

Features Added

  • Created comprehensive skeleton UI components for mentorship portal
  • ProgramCardSkeleton - Mimics program card structure with status badges, titles, descriptions
  • ModuleCardSkeleton - Mimics module card structure with drag handles, progress bars
  • MentorshipPageSkeleton - Complete page-level skeletons for different content types

Technical Implementation

  • Added 3 new skeleton components with proper ARIA roles and accessibility
  • Enhanced SkeletonBase to support mentorship-specific skeletons
  • Replaced all LoadingSpinner instances in mentorship pages
  • Maintained responsive design across mobile and desktop
  • Added proper animate-pulse effects for realistic loading states

Pages Updated

  • Public mentorship pages: /mentorship/programs/[key] and /mentorship/programs/[key]/modules/[key]
  • Internal mentorship pages: /my/mentorship/programs/[key] and related module pages
  • SearchPageLayout integration for consistent loading experience

Accessibility Features

  • Proper ARIA roles (status, aria-label) for screen readers
  • Semantic HTML structure maintained
  • Focus management preserved
  • Responsive design intact

Benefits

  • Improved perceived loading time by showing content structure
  • Better user experience with smooth transitions
  • Consistent loading states across mentorship portal
  • Enhanced accessibility compliance
  • Mobile-friendly skeleton layouts

Technical Details

  • Components: ProgramCardSkeleton, ModuleCardSkeleton, MentorshipPageSkeleton
  • Updated: SkeletonBase.tsx, 4+ mentorship pages
  • Responsive: Mobile-first design with proper breakpoints
  • Accessibility: WCAG compliant with proper ARIA attributes

Checklist:

  • I followed the contributing workflow
  • I verified that my code works as intended and resolves the issue as described
  • I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

STOP AND READ BEFORE SUBMITTING! REMOVE THIS PARAGRAPH BEFORE OPENING THE PR

Thank you for your interest in contributing to OWASP Nest!

Before starting any work, all external contributors must first be assigned to an issue in the repository.
This is a mandatory step in the OWASP Nest workflow and ensures that effort is coordinated, approved, and tracked properly.

Exception: OWASP leaders are not required to follow this rule —- just make sure your username is included in the exception list.

If you were not assigned to the issue you are trying to resolve, stop right now and do NOT create this PR.
Unassigned pull requests are automatically closed by our workflows — please don't waste your time.

If you want to be assigned on any available issue, comment on it and wait for confirmation from the maintainers or project leads.

Proposed change

Resolves #(put the issue number here)

Add the PR description here.

Checklist

  • Required: I followed the contributing workflow
  • Required: I verified that my code works as intended and resolves the issue as described
  • Required: I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

Major UX improvement to enhance perceived loading time and user experience

## Features Added
- Created comprehensive skeleton UI components for mentorship portal
- ProgramCardSkeleton - Mimics program card structure with status badges, titles, descriptions
- ModuleCardSkeleton - Mimics module card structure with drag handles, progress bars
- MentorshipPageSkeleton - Complete page-level skeletons for different content types

## Technical Implementation
- Added 3 new skeleton components with proper ARIA roles and accessibility
- Enhanced SkeletonBase to support mentorship-specific skeletons
- Replaced all LoadingSpinner instances in mentorship pages
- Maintained responsive design across mobile and desktop
- Added proper animate-pulse effects for realistic loading states

## Pages Updated
- Public mentorship pages: /mentorship/programs/[key] and /mentorship/programs/[key]/modules/[key]
- Internal mentorship pages: /my/mentorship/programs/[key] and related module pages
- SearchPageLayout integration for consistent loading experience

## Accessibility Features
- Proper ARIA roles (status, aria-label) for screen readers
- Semantic HTML structure maintained
- Focus management preserved
- Responsive design intact

## Benefits
- Improved perceived loading time by showing content structure
- Better user experience with smooth transitions
- Consistent loading states across mentorship portal
- Enhanced accessibility compliance
- Mobile-friendly skeleton layouts

## Technical Details
- Components: ProgramCardSkeleton, ModuleCardSkeleton, MentorshipPageSkeleton
- Updated: SkeletonBase.tsx, 4+ mentorship pages
- Responsive: Mobile-first design with proper breakpoints
- Accessibility: WCAG compliant with proper ARIA attributes

Checklist:
- I followed the contributing workflow
- I verified that my code works as intended and resolves the issue as described
- I ran make check-test locally: all warnings addressed, tests passed
- I used AI for code, documentation, tests, or communication related to this PR
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

PR validation failed: No linked issue and no valid closing issue reference in PR description

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features

    • Enhanced loading experience on mentorship pages with skeleton screens that preview page layouts (programs, modules, issues, mentees) instead of generic spinners.
  • Bug Fixes

    • Improved visual feedback during data loading with structured skeleton UI components across all mentorship-related pages.

Walkthrough

This pull request replaces the generic LoadingSpinner component with specialized skeleton UI components across mentorship pages. It introduces three new skeleton components—MentorshipPageSkeleton, ModuleCardSkeleton, and ProgramCardSkeleton—and updates SkeletonsBase and three page files to use MentorshipPageSkeleton during loading states.

Changes

Cohort / File(s) Summary
Page Loading States
frontend/src/app/mentorship/programs/[programKey]/page.tsx, frontend/src/app/mentorship/programs/[programKey]/modules/[moduleKey]/page.tsx, frontend/src/app/my/mentorship/programs/[programKey]/page.tsx
Replaced LoadingSpinner imports and usage with MentorshipPageSkeleton, specifying type prop as "programs" or "modules" accordingly.
Skeleton Base Registry
frontend/src/components/SkeletonsBase.tsx
Extended switch-case logic to map indexName cases (programs, modules, issues, mentees) to MentorshipPageSkeleton, and removed redundant component renders from the wrapper block.
New Mentorship Skeleton Components
frontend/src/components/skeletons/MentorshipPageSkeleton.tsx, frontend/src/components/skeletons/ModuleCardSkeleton.tsx, frontend/src/components/skeletons/ProgramCardSkeleton.tsx
Added three new React skeleton components with accessibility attributes; MentorshipPageSkeleton delegates to ModuleCardSkeleton and ProgramCardSkeleton based on type prop.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

frontend

Suggested reviewers

  • arkid15r
  • kasya
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot closed this Feb 6, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 7 files

Confidence score: 4/5

  • The only noted issue is a duplicate case 'issues' in frontend/src/components/SkeletonsBase.tsx, which can make the mentorship issues skeleton unreachable and lead to the wrong skeleton being shown.
  • Given this is a single medium-severity UI logic issue, overall merge risk looks low-to-moderate and likely safe with a small fix.
  • Pay close attention to frontend/src/components/SkeletonsBase.tsx - duplicate issues case causes the later branch to be unreachable.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="frontend/src/components/SkeletonsBase.tsx">

<violation number="1" location="frontend/src/components/SkeletonsBase.tsx:82">
P2: Duplicate `case 'issues'` makes the mentorship issues skeleton unreachable; `indexName === 'issues'` will always use the earlier CardSkeleton branch. Rename this case or update the existing `issues` case to avoid the collision.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

return <MentorshipPageSkeleton type="programs" />
case 'modules':
return <MentorshipPageSkeleton type="modules" />
case 'issues':
Copy link
Contributor

Choose a reason for hiding this comment

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

P2: Duplicate case 'issues' makes the mentorship issues skeleton unreachable; indexName === 'issues' will always use the earlier CardSkeleton branch. Rename this case or update the existing issues case to avoid the collision.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At frontend/src/components/SkeletonsBase.tsx, line 82:

<comment>Duplicate `case 'issues'` makes the mentorship issues skeleton unreachable; `indexName === 'issues'` will always use the earlier CardSkeleton branch. Rename this case or update the existing `issues` case to avoid the collision.</comment>

<file context>
@@ -74,6 +75,14 @@ const SkeletonBase = ({
+      return <MentorshipPageSkeleton type="programs" />
+    case 'modules':
+      return <MentorshipPageSkeleton type="modules" />
+    case 'issues':
+      return <MentorshipPageSkeleton type="issues" />
+    case 'mentees':
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant