2023-09-01 11:12:30 +00:00
|
|
|
import { observer } from "mobx-react-lite";
|
|
|
|
// components
|
2024-03-19 14:38:35 +00:00
|
|
|
import { Loader } from "@plane/ui";
|
2023-09-01 11:12:30 +00:00
|
|
|
import {
|
|
|
|
PeekOverviewHeader,
|
|
|
|
PeekOverviewIssueActivity,
|
|
|
|
PeekOverviewIssueDetails,
|
|
|
|
PeekOverviewIssueProperties,
|
2024-03-19 14:38:35 +00:00
|
|
|
} from "@/components/issues/peek-overview";
|
2023-09-01 11:12:30 +00:00
|
|
|
// types
|
2024-04-11 15:58:59 +00:00
|
|
|
import { IIssue } from "@/types/issue";
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
handleClose: () => void;
|
|
|
|
issueDetails: IIssue | undefined;
|
2024-05-14 08:56:54 +00:00
|
|
|
workspaceSlug: string;
|
|
|
|
projectId: string;
|
2023-09-01 11:12:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const FullScreenPeekView: React.FC<Props> = observer((props) => {
|
2024-05-14 08:56:54 +00:00
|
|
|
const { handleClose, issueDetails, workspaceSlug, projectId } = props;
|
2023-09-01 11:12:30 +00:00
|
|
|
|
|
|
|
return (
|
2023-12-01 07:55:48 +00:00
|
|
|
<div className="grid h-full w-full grid-cols-10 divide-x divide-custom-border-200 overflow-hidden">
|
|
|
|
<div className="col-span-7 flex h-full w-full flex-col overflow-hidden">
|
2023-09-01 11:12:30 +00:00
|
|
|
<div className="w-full p-5">
|
|
|
|
<PeekOverviewHeader handleClose={handleClose} issueDetails={issueDetails} />
|
|
|
|
</div>
|
|
|
|
{issueDetails ? (
|
2023-12-01 07:55:48 +00:00
|
|
|
<div className="h-full w-full overflow-y-auto px-6">
|
2023-09-01 11:12:30 +00:00
|
|
|
{/* issue title and description */}
|
|
|
|
<div className="w-full">
|
|
|
|
<PeekOverviewIssueDetails issueDetails={issueDetails} />
|
|
|
|
</div>
|
|
|
|
{/* divider */}
|
2023-12-01 07:55:48 +00:00
|
|
|
<div className="my-5 h-[1] w-full border-t border-custom-border-200" />
|
2023-09-01 11:12:30 +00:00
|
|
|
{/* issue activity/comments */}
|
|
|
|
<div className="w-full pb-5">
|
2024-05-14 08:56:54 +00:00
|
|
|
<PeekOverviewIssueActivity
|
|
|
|
issueDetails={issueDetails}
|
|
|
|
workspaceSlug={workspaceSlug}
|
|
|
|
projectId={projectId}
|
|
|
|
/>
|
2023-09-01 11:12:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : (
|
|
|
|
<Loader className="px-6">
|
|
|
|
<Loader.Item height="30px" />
|
2023-12-01 07:55:48 +00:00
|
|
|
<div className="mt-3 space-y-2">
|
2023-09-01 11:12:30 +00:00
|
|
|
<Loader.Item height="20px" width="70%" />
|
|
|
|
<Loader.Item height="20px" width="60%" />
|
|
|
|
<Loader.Item height="20px" width="60%" />
|
|
|
|
</div>
|
|
|
|
</Loader>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
<div className="col-span-3 h-full w-full overflow-y-auto">
|
|
|
|
{/* issue properties */}
|
|
|
|
<div className="w-full px-6 py-5">
|
|
|
|
{issueDetails ? (
|
|
|
|
<PeekOverviewIssueProperties issueDetails={issueDetails} />
|
|
|
|
) : (
|
|
|
|
<Loader className="mt-11 space-y-4">
|
|
|
|
<Loader.Item height="30px" />
|
|
|
|
<Loader.Item height="30px" />
|
|
|
|
<Loader.Item height="30px" />
|
|
|
|
<Loader.Item height="30px" />
|
|
|
|
</Loader>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|