-
-
Notifications
You must be signed in to change notification settings - Fork 509
feat: add skeleton loaders for Organizations and Members Details pages (#2852) #2890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b1cbf3d
feat: add skeletons for members and organizations detail pages
dhirukumar cf8bbb1
chore: address CodeRabbit suggestions in member and organization pages
dhirukumar c5cf27a
run pnpm run format check pass
dhirukumar 5736174
Update frontend/src/components/skeletons/MemberDetailsPageSkeleton.tsx
dhirukumar 7dc505d
Update frontend/src/components/skeletons/MemberDetailsPageSkeleton.tsx
dhirukumar 150ff46
Update frontend/src/components/skeletons/OrganizationDetailsPageSkele…
dhirukumar 65456c6
Update frontend/src/components/skeletons/OrganizationDetailsPageSkele…
dhirukumar bc0afae
Update frontend/src/components/skeletons/OrganizationDetailsPageSkele…
dhirukumar 0e0cc6a
Update frontend/src/components/skeletons/MemberDetailsPageSkeleton.tsx
dhirukumar 6cdb4ea
issue solve
dhirukumar 1c9d527
Solve duplicate card structures
dhirukumar 9f30d94
Solve bg issue
dhirukumar 246ac08
Solve hight issue
dhirukumar 1689316
Update code
kasya d85aaed
Address code duplication
kasya f4ada14
Update code
kasya 1602c49
Update code
kasya d5cf606
Fix invalid class name
kasya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
frontend/src/components/skeletons/MemberDetailsPageSkeleton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| import { Skeleton } from '@heroui/skeleton' | ||
| import React from 'react' | ||
| import { | ||
| CardSection, | ||
| PageWrapper, | ||
| SectionHeader, | ||
| TitleSection, | ||
| TwoColumnSection, | ||
| } from 'components/skeletons/sharedSkeletons' | ||
|
|
||
| const MemberDetailsPageSkeleton: React.FC = () => { | ||
| return ( | ||
| <PageWrapper> | ||
| <TitleSection skeletonClassName="h-10 w-64" /> | ||
|
|
||
| {/* User Summary Card - bg-gray-100 like SecondaryCard */} | ||
| <div className="mt-6 mb-8 rounded-lg bg-gray-100 p-6 shadow-md dark:bg-gray-800"> | ||
| <div className="mt-4 flex flex-col items-center lg:flex-row"> | ||
| {/* Avatar */} | ||
| <Skeleton | ||
| className="mb-4 h-[200px] w-[200px] shrink-0 rounded-full lg:mr-6 lg:mb-0" | ||
| aria-hidden="true" | ||
| /> | ||
|
|
||
| {/* User Info and Heatmap */} | ||
| <div className="w-full text-center lg:text-left"> | ||
| <div className="pl-0 lg:pl-4"> | ||
| {/* Username with badge */} | ||
| <div className="mb-1 flex items-center justify-center gap-3 text-center text-sm lg:justify-start lg:text-left"> | ||
| <Skeleton className="h-6 w-40" aria-hidden="true" /> | ||
| </div> | ||
| {/* Bio */} | ||
| <Skeleton className="mb-1 h-4 w-full max-w-xl" aria-hidden="true" /> | ||
| </div> | ||
|
|
||
| {/* Heatmap - Only on desktop */} | ||
| <div className="mt-4 hidden w-full lg:block"> | ||
| <div className="overflow-hidden rounded-lg bg-white dark:bg-gray-800"> | ||
| <Skeleton className="h-32 w-full" aria-hidden="true" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Main Grid - User Details and Statistics */} | ||
| <div className="grid grid-cols-1 gap-6 md:grid-cols-7"> | ||
| {/* User Details Card */} | ||
| <CardSection minHeight="min-h-[210px]" className="gap-2" colSpan="md:col-span-5"> | ||
| <SectionHeader titleSkeletonWidth="w-36" /> | ||
| <div> | ||
| {[1, 2, 3, 4].map((i) => ( | ||
| <div key={`detail-${i}`} className="pb-1"> | ||
| <div className="flex flex-row gap-1"> | ||
| <Skeleton className="h-5 w-20" aria-hidden="true" /> | ||
| <Skeleton className="h-5 w-32" aria-hidden="true" /> | ||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </CardSection> | ||
|
|
||
| {/* Statistics Card */} | ||
| <CardSection className="gap-2" colSpan="md:col-span-2"> | ||
| <SectionHeader titleSkeletonWidth="w-24" /> | ||
| <div> | ||
| {[1, 2, 3, 4].map((i) => ( | ||
| <div key={`stat-${i}`}> | ||
| <div className="pb-1"> | ||
| <div className="flex items-center gap-2"> | ||
| <Skeleton className="h-4 w-4" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-16" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-20" aria-hidden="true" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| </CardSection> | ||
| </div> | ||
|
|
||
| {/* Two Column Layout - Issues and Milestones */} | ||
| <TwoColumnSection | ||
| sections={[ | ||
| { | ||
| keyPrefix: 'issue', | ||
| titleWidth: 'w-32', | ||
| itemTitleWidth: 'w-4/5', | ||
| minHeight: 'min-h-[600px]', | ||
| }, | ||
| { | ||
| keyPrefix: 'milestone', | ||
| titleWidth: 'w-40', | ||
| itemTitleWidth: 'w-4/5', | ||
| minHeight: 'min-h-[600px]', | ||
| }, | ||
| ]} | ||
| /> | ||
|
|
||
| {/* Two Column Layout - Pull Requests and Releases */} | ||
| <TwoColumnSection | ||
| sections={[ | ||
| { | ||
| keyPrefix: 'pr', | ||
| titleWidth: 'w-48', | ||
| itemTitleWidth: 'w-3/4', | ||
| minHeight: 'min-h-[600px]', | ||
| }, | ||
| { | ||
| keyPrefix: 'release', | ||
| titleWidth: 'w-48', | ||
| itemTitleWidth: 'w-3/4', | ||
| minHeight: 'min-h-[600px]', | ||
| }, | ||
| ]} | ||
| /> | ||
|
|
||
| {/* Repositories Section */} | ||
| <CardSection> | ||
| <SectionHeader titleSkeletonWidth="w-32" /> | ||
| <div> | ||
| <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"> | ||
| {[1, 2, 3, 4].map((i) => ( | ||
| <div | ||
| key={`repo-${i}`} | ||
| className="flex h-48 w-full flex-col gap-3 rounded-lg border-1 border-gray-200 p-4 shadow-xs ease-in-out hover:shadow-md dark:border-gray-700 dark:bg-gray-800" | ||
| > | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Skeleton className="h-5 w-3/4" aria-hidden="true" /> | ||
| <div className="flex flex-col gap-2 text-sm"> | ||
| <div className="flex items-center gap-2"> | ||
| <Skeleton className="h-4 w-4" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-10" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-10" aria-hidden="true" /> | ||
| </div> | ||
| <div className="flex items-center gap-2"> | ||
| <Skeleton className="h-4 w-4" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-10" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-12" aria-hidden="true" /> | ||
| </div> | ||
| <div className="flex items-center gap-2"> | ||
| <Skeleton className="h-4 w-4" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-16" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-20" aria-hidden="true" /> | ||
| </div> | ||
| <div className="flex items-center gap-2"> | ||
| <Skeleton className="h-4 w-4" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-10" aria-hidden="true" /> | ||
| <Skeleton className="h-4 w-10" aria-hidden="true" /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ))} | ||
| </div> | ||
| <div className="mt-4 flex justify-start"> | ||
| <Skeleton className="h-10 w-24 rounded-md" aria-hidden="true" /> | ||
| </div> | ||
| </div> | ||
| </CardSection> | ||
| </PageWrapper> | ||
| ) | ||
| } | ||
|
|
||
| export default MemberDetailsPageSkeleton | ||
kasya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.