From f3988ea98bef52df1f5091dc2fcdb192dfabb4fd Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 12 Sep 2024 22:48:25 +0200 Subject: [PATCH 1/2] fix overlap on team member card| table view --- apps/web/components/ui/data-table.tsx | 63 ++++++++++--------- apps/web/components/ui/table.tsx | 6 +- apps/web/lib/features/team-member-cell.tsx | 16 ++--- .../team/user-team-card/task-estimate.tsx | 2 +- .../team/user-team-card/task-info.tsx | 5 +- .../team/user-team-card/user-info.tsx | 2 +- 6 files changed, 45 insertions(+), 49 deletions(-) diff --git a/apps/web/components/ui/data-table.tsx b/apps/web/components/ui/data-table.tsx index 2baa8f34c..8a9ceaf8e 100644 --- a/apps/web/components/ui/data-table.tsx +++ b/apps/web/components/ui/data-table.tsx @@ -78,7 +78,7 @@ function DataTable({ columns, data, footerRows, isHeader }: DataT style={{ textAlign: index === 0 ? 'left' : 'center' }} - className="!w-40 text-base" + className="!w-40 text-base" key={header.id} > @@ -86,9 +86,9 @@ function DataTable({ columns, data, footerRows, isHeader }: DataT {header.isPlaceholder ? null : flexRender( - header.column.columnDef.header, - header.getContext() - )} + header.column.columnDef.header, + header.getContext() + )} @@ -98,32 +98,39 @@ function DataTable({ columns, data, footerRows, isHeader }: DataT ))} )} -
+
{table.getRowModel().rows?.length ? ( - table.getRowModel().rows.map((row, i) => ( - - {row.getVisibleCells().map((cell, index) => ( - - {flexRender(cell.column.columnDef.cell, cell.getContext())} - - ))} - - )) + table.getRowModel().rows.map((row, i) => { + return ( + + {row.getVisibleCells().map((cell, index) => { + return ( + + {flexRender(cell.column.columnDef.cell, cell.getContext())} + + ); + })} + + ); + }) ) : ( diff --git a/apps/web/components/ui/table.tsx b/apps/web/components/ui/table.tsx index 9f104cba0..fbf5986c2 100644 --- a/apps/web/components/ui/table.tsx +++ b/apps/web/components/ui/table.tsx @@ -57,11 +57,7 @@ TableHead.displayName = 'TableHead'; const TableCell = React.forwardRef>( ({ className, ...props }, ref) => ( - + ) ); TableCell.displayName = 'TableCell'; diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index 1476c38ec..5a6620985 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -24,8 +24,8 @@ export function TaskCell({ row }: { row: any }) { edition={taskEdition} memberInfo={memberInfo} className={clsxm( - 'flex-1 flex justify-center items-center w-full px-2', - fullWidth ? 'max-w-[40vw]' : 'max-w-[30vw]' + 'flex-1 flex justify-center items-center px-2', + fullWidth ? 'max-w-[40rem]' : 'max-w-[30rem]' )} publicTeam={publicTeam} /> @@ -38,13 +38,12 @@ export function UserInfoCell({ cell }: { cell: any }) { const publicTeam = get(cell, 'column.columnDef.meta.publicTeam', false); const memberInfo = useTeamMemberCard(member); - return ; + return ; } export function WorkedOnTaskCell({ row }: { row: any }) { const member = row.original as OT_Member; const memberInfo = useTeamMemberCard(member); - const fullWidth = useRecoilValue(fullWidthState); return ( ); } @@ -70,9 +66,7 @@ export function TaskEstimateInfoCell({ row }: { row: any }) { memberInfo={memberInfo} edition={taskEdition} activeAuthTask={true} - className={clsxm( - 'flex flex-col justify-center items-center 2xl:w-[7rem] 3xl:w-[10rem]' - )} + className={clsxm('flex flex-col justify-center items-center')} /> ); } diff --git a/apps/web/lib/features/team/user-team-card/task-estimate.tsx b/apps/web/lib/features/team/user-team-card/task-estimate.tsx index 511bdf2c2..5dbc9b695 100644 --- a/apps/web/lib/features/team/user-team-card/task-estimate.tsx +++ b/apps/web/lib/features/team/user-team-card/task-estimate.tsx @@ -34,7 +34,7 @@ export function TaskEstimateInfo({ className, activeAuthTask, showTime = true, r return (
-
+
{showTime && (
diff --git a/apps/web/lib/features/team/user-team-card/task-info.tsx b/apps/web/lib/features/team/user-team-card/task-info.tsx index 36b291c9d..f2cb9187b 100644 --- a/apps/web/lib/features/team/user-team-card/task-info.tsx +++ b/apps/web/lib/features/team/user-team-card/task-info.tsx @@ -19,9 +19,8 @@ export function TaskInfo({ className, memberInfo, edition, publicTeam, tab, dayP
{/* task */} diff --git a/apps/web/lib/features/team/user-team-card/user-info.tsx b/apps/web/lib/features/team/user-team-card/user-info.tsx index 3860a3e4b..09bb4fb92 100644 --- a/apps/web/lib/features/team/user-team-card/user-info.tsx +++ b/apps/web/lib/features/team/user-team-card/user-info.tsx @@ -33,7 +33,7 @@ export function UserInfo({ className, memberInfo, publicTeam = false }: Props) { return (
Date: Tue, 17 Sep 2024 21:56:49 +0200 Subject: [PATCH 2/2] feat: adapt sub-menus of 'Team' & 'Personal' menus UI (#3023) --- apps/web/lib/components/sidebar-accordian.tsx | 4 +-- .../lib/settings/left-side-setting-menu.tsx | 26 ++++++------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/apps/web/lib/components/sidebar-accordian.tsx b/apps/web/lib/components/sidebar-accordian.tsx index d71f0f60f..cae994279 100644 --- a/apps/web/lib/components/sidebar-accordian.tsx +++ b/apps/web/lib/components/sidebar-accordian.tsx @@ -19,7 +19,7 @@ export const SidebarAccordian = ({ children, title, className, wrapperClassName, {({ open }) => ( <> {children && ( - + {children} )} diff --git a/apps/web/lib/settings/left-side-setting-menu.tsx b/apps/web/lib/settings/left-side-setting-menu.tsx index d145a0182..cf6b3d1d2 100644 --- a/apps/web/lib/settings/left-side-setting-menu.tsx +++ b/apps/web/lib/settings/left-side-setting-menu.tsx @@ -99,14 +99,9 @@ export const LeftSideSettingMenu = ({ className }: { className?: string }) => { : 'border-l-transparent font-normal dark:text-[#7E7991]' } `} - wrapperClassName={`w-full border-t-0 border-r-0 border-b-0 rounded-none - font-normal text-[#7e7991] justify-start pt-[24px] pb-[24px] pl-[24px] - border-l-[5px] ${ - activePage === '/settings/personal' - ? 'text-[#3826a6] border-l-solid border-l-primary bg-[#E9E5F9] dark:bg-[#6755C9]' - : 'border-l-transparent' - } - `} + wrapperClassName={ + 'w-full border-t-0 border-r-0 border-b-0 rounded-none font-normal text-[#7e7991] justify-start pt-[24px] pb-[24px] pl-[24px] border-l-[5px]' + } >
{PersonalAccordianData.map((ad, index) => { @@ -117,7 +112,7 @@ export const LeftSideSettingMenu = ({ className }: { className?: string }) => { key={index} > @@ -146,14 +141,9 @@ export const LeftSideSettingMenu = ({ className }: { className?: string }) => { ? ' text-[#3826a6] text-primary font-semibold' : ' border-l-transparent font-normal dark:text-[#7E7991]' }`} - wrapperClassName={`w-full border-t-0 border-r-0 border-b-0 rounded-none - font-normal text-[#7e7991] justify-start text-sm pt-[24px] pb-[24px] pl-[24px] - border-l-[5px] ${ - activePage === '/settings/team' - ? ' text-[#3826a6] border-l-solid border-l-primary bg-primary/5 text-primary dark:bg-[#6755C9]' - : ' border-l-transparent' - } - `} + wrapperClassName={ + 'w-full border-t-0 border-r-0 border-b-0 rounded-none font-normal text-[#7e7991] justify-start text-sm pt-[24px] pb-[24px] pl-[24px] border-l-[5px]' + } >
{TeamAccordianData.filter((ad) => (!isTeamManager && !ad.managerOnly) || isTeamManager).map( @@ -165,7 +155,7 @@ export const LeftSideSettingMenu = ({ className }: { className?: string }) => { key={index} >