feat(task-list): add TaskListSkeleton component for improved loading state

- Introduced TaskListSkeleton to provide a visual loading state for the task list, enhancing user experience during data fetching.
- Updated TaskListV2Table to utilize TaskListSkeleton instead of a generic Skeleton component, allowing for a more tailored loading interface.
- The new skeleton component includes customizable column widths and multiple rows to better represent the task list structure while loading.
This commit is contained in:
chamikaJ
2025-07-11 11:18:30 +05:30
parent b9b707410d
commit 278e221c75
2 changed files with 182 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ import OptimizedBulkActionBar from '@/components/task-management/optimized-bulk-
import CustomColumnModal from '@/pages/projects/projectView/taskList/task-list-table/custom-columns/custom-column-modal/custom-column-modal';
import AddTaskRow from './components/AddTaskRow';
import { AddCustomColumnButton, CustomColumnHeader } from './components/CustomColumnComponents';
import TaskListSkeleton from './components/TaskListSkeleton';
// Hooks and utilities
import { useTaskSocketHandlers } from '@/hooks/useTaskSocketHandlers';
@@ -597,7 +598,9 @@ const TaskListV2Section: React.FC = () => {
);
// Loading and error states
if (loading || loadingColumns) return <Skeleton style={{ marginTop: 8 }} active />;
if (loading || loadingColumns) {
return <TaskListSkeleton visibleColumns={visibleColumns} />;
}
if (error)
return (
<div>