-
-
Notifications
You must be signed in to change notification settings - Fork 148
Enhance Dashboard UX with Skeletons, Empty States, and Backend Dependency Alignmen #270
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
Open
Kalpana-chavhan
wants to merge
3
commits into
AOSSIE-Org:main
Choose a base branch
from
Kalpana-chavhan:feature/dashboard-ux-refinement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import React from 'react'; | ||
| import { LucideIcon } from 'lucide-react'; | ||
|
|
||
| interface EmptyStateProps { | ||
| icon?: LucideIcon; | ||
| title: string; | ||
| description: string; | ||
| actionText?: string; | ||
| onAction?: () => void; | ||
| } | ||
|
|
||
| const EmptyState: React.FC<EmptyStateProps> = ({ | ||
| icon: Icon, | ||
| title, | ||
| description, | ||
| actionText, | ||
| onAction | ||
| }) => { | ||
| return ( | ||
| <div className="flex flex-col items-center justify-center p-8 text-center bg-white dark:bg-gray-800 rounded-xl border-2 border-dashed border-gray-200 dark:border-gray-700"> | ||
| {Icon && <Icon className="w-12 h-12 mb-4 text-gray-400 dark:text-gray-500" />} | ||
| <h3 className="text-lg font-semibold text-gray-900 dark:text-white">{title}</h3> | ||
| <p className="mt-2 text-sm text-gray-500 dark:text-gray-400 max-w-xs"> | ||
| {description} | ||
| </p> | ||
| {actionText && onAction && ( | ||
| <button | ||
| onClick={onAction} | ||
| className="mt-6 px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white text-sm font-medium rounded-lg transition-colors" | ||
| > | ||
| {actionText} | ||
| </button> | ||
| )} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default EmptyState; |
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,29 @@ | ||
| import React from "react"; | ||
|
|
||
| interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> | ||
| { | ||
| className?: string; | ||
| variant?: "rect" | "circle"; | ||
| } | ||
|
|
||
|
|
||
| const Skeleton: React.FC<SkeletonProps> = ({ | ||
| className, | ||
| variant = "rect", | ||
| ...props | ||
| }) => { | ||
| // Base classes for the pulse animation and color | ||
| const baseClasses = "animate-pulse bg-gray-200 dark:bg-gray-700"; | ||
|
|
||
| // Shape variants | ||
| const variantClasses = variant === "circle" ? "rounded-full" : "rounded-md"; | ||
|
|
||
| return ( | ||
| <div | ||
| className={`${baseClasses} ${variantClasses} ${className}`} | ||
| {...props} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| export default Skeleton; |
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.