[WEB-2765] fix: issue detail page unnecessary scroll (#6068)

* fix: issue dertail page unnecessary scroll

* fix: issue detail sidebar ui
This commit is contained in:
Anmol Singh Bhatia
2024-11-21 15:16:47 +05:30
committed by GitHub
parent daed58be0f
commit a446bc043e
3 changed files with 7 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ export default function ProjectIssueDetailsLayout({ children }: { children: Reac
return (
<>
<AppHeader header={<ProjectIssueDetailsHeader />} />
<ContentWrapper>{children}</ContentWrapper>
<ContentWrapper className="overflow-hidden">{children}</ContentWrapper>
</>
);
}

View File

@@ -1,13 +1,16 @@
"use client";
import { ReactNode } from "react";
// helpers
import { cn } from "@/helpers/common.helper";
export interface ContentWrapperProps {
className?: string;
children: ReactNode;
}
export const ContentWrapper = ({ children }: ContentWrapperProps) => (
export const ContentWrapper = ({ className, children }: ContentWrapperProps) => (
<div className="h-full w-full overflow-hidden">
<div className="relative h-full w-full overflow-x-hidden overflow-y-scroll">{children}</div>
<div className={cn("relative h-full w-full overflow-x-hidden overflow-y-scroll", className)}>{children}</div>
</div>
);

View File

@@ -360,7 +360,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
/>
</div>
<div
className="fixed right-0 z-[5] h-full w-full min-w-[300px] overflow-hidden border-l border-custom-border-200 bg-custom-sidebar-background-100 pb-5 sm:w-1/2 md:relative md:w-1/3 lg:min-w-80 xl:min-w-96"
className="fixed right-0 z-[5] h-full w-full min-w-[300px] overflow-hidden border-l border-custom-border-200 bg-custom-sidebar-background-100 py-5 sm:w-1/2 md:relative md:w-1/3 lg:min-w-80 xl:min-w-96"
style={issueDetailSidebarCollapsed ? { right: `-${window?.innerWidth || 0}px` } : {}}
>
<IssueDetailsSidebar