[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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

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

View file

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

View file

@ -360,7 +360,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
/> />
</div> </div>
<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` } : {}} style={issueDetailSidebarCollapsed ? { right: `-${window?.innerWidth || 0}px` } : {}}
> >
<IssueDetailsSidebar <IssueDetailsSidebar