Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function ProjectIssueDetailsLayout({ children }: { children: Reac
return (
<>
<AppHeader header={<ProjectIssueDetailsHeader />} />
<ContentWrapper>{children}</ContentWrapper>
<ContentWrapper className="overflow-hidden">{children}</ContentWrapper>
</>
);
}
7 changes: 5 additions & 2 deletions web/core/components/core/content-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -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>
);
2 changes: 1 addition & 1 deletion web/core/components/issues/issue-detail/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading