From e3a9618dc9f5d4c7ec7e5a3e2749405c0efc3295 Mon Sep 17 00:00:00 2001 From: chamikaJ Date: Fri, 4 Jul 2025 20:54:11 +0530 Subject: [PATCH] feat(task-list): improve layout and scrolling behavior in TaskListV2 component - Adjusted the layout to ensure fixed heights for the task list and table container, enhancing usability. - Implemented horizontal scrolling for the table container and ensured the bulk action bar is positioned absolutely for better accessibility. - Updated styles for column headers and task list content to improve visual consistency and user experience. --- .../components/task-list-v2/TaskListV2.tsx | 103 +++++++++++++----- 1 file changed, 73 insertions(+), 30 deletions(-) diff --git a/worklenz-frontend/src/components/task-list-v2/TaskListV2.tsx b/worklenz-frontend/src/components/task-list-v2/TaskListV2.tsx index 4b6d209e..943c9ad3 100644 --- a/worklenz-frontend/src/components/task-list-v2/TaskListV2.tsx +++ b/worklenz-frontend/src/components/task-list-v2/TaskListV2.tsx @@ -1317,24 +1317,65 @@ const TaskListV2: React.FC = () => { onDragOver={handleDragOver} onDragEnd={handleDragEnd} > -
+
{/* Task Filters */} -
+
- {/* Table Container with synchronized horizontal scrolling */} -
-
- {/* Column Headers - Fixed at top */} -
-
- {columnHeaders} + {/* Table Container with fixed height and horizontal scroll */} +
+
+ {/* Column Headers - Sticky at top */} +
+
+ {visibleColumns.map(column => { + const columnStyle: ColumnStyle = { + width: column.width, + flexShrink: 0, + ...(column.id === 'labels' && column.width === 'auto' + ? { + minWidth: '200px', + flexGrow: 1, + } + : {}), + }; + + return ( +
+ {column.id === 'dragHandle' ? ( + + ) : column.id === 'checkbox' ? ( + + ) : (column as any).isCustom ? ( + + ) : ( + t(column.label || '') + )} +
+ ); + })} +
+ +
- {/* Task List - Scrollable content */} -
+ {/* Task List Content */} +
!('isAddTaskRow' in item) && !item.parent_task_id) @@ -1343,7 +1384,7 @@ const TaskListV2: React.FC = () => { strategy={verticalListSortingStrategy} > { ) : null} - {/* Bulk Action Bar */} + {/* Bulk Action Bar - Positioned absolutely to not affect layout */} {selectedTaskIds.length > 0 && urlProjectId && ( - +
+ +
)} {/* Custom Column Modal */}