mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'develop' of gurusainath:makeplane/plane into feat-global-views
This commit is contained in:
commit
01f5a0a4e2
@ -13,7 +13,6 @@ import { TIssueOperations } from "./issue-detail";
|
|||||||
import { FileService } from "services/file.service";
|
import { FileService } from "services/file.service";
|
||||||
import { useMention, useWorkspace } from "hooks/store";
|
import { useMention, useWorkspace } from "hooks/store";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { isNil } from "lodash";
|
|
||||||
|
|
||||||
export interface IssueDescriptionFormValues {
|
export interface IssueDescriptionFormValues {
|
||||||
name: string;
|
name: string;
|
||||||
@ -79,13 +78,13 @@ export const IssueDescriptionForm: FC<IssueDetailsProps> = observer((props) => {
|
|||||||
}, [issue.id]); // TODO: verify the exhaustive-deps warning
|
}, [issue.id]); // TODO: verify the exhaustive-deps warning
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (issue.description_html) {
|
if (["", undefined, null].includes(localIssueDescription.description_html)) {
|
||||||
setLocalIssueDescription((state) => {
|
setLocalIssueDescription((state) => {
|
||||||
if (!isNil(state.description_html)) return state;
|
if (!["", undefined, null].includes(state.description_html)) return state;
|
||||||
return { id: issue.id, description_html: issue.description_html };
|
return { id: issue.id, description_html: issue.description_html || "<p></p>" };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [issue.description_html]);
|
}, [issue.description_html, localIssueDescription.description_html, issue.id]);
|
||||||
|
|
||||||
const handleDescriptionFormSubmit = useCallback(
|
const handleDescriptionFormSubmit = useCallback(
|
||||||
async (formData: Partial<TIssue>) => {
|
async (formData: Partial<TIssue>) => {
|
||||||
@ -177,7 +176,7 @@ export const IssueDescriptionForm: FC<IssueDetailsProps> = observer((props) => {
|
|||||||
</div>
|
</div>
|
||||||
<span>{errors.name ? errors.name.message : null}</span>
|
<span>{errors.name ? errors.name.message : null}</span>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
{issue.description_html ? (
|
{localIssueDescription.description_html ? (
|
||||||
<Controller
|
<Controller
|
||||||
name="description_html"
|
name="description_html"
|
||||||
control={control}
|
control={control}
|
||||||
|
@ -17,8 +17,6 @@ import {
|
|||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { TransferIssues, TransferIssuesModal } from "components/cycles";
|
import { TransferIssues, TransferIssuesModal } from "components/cycles";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
|
|
||||||
@ -56,17 +54,7 @@ export const CycleLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId || !cycleId) return <></>;
|
if (!workspaceSlug || !projectId || !cycleId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -11,7 +11,6 @@ import { ProjectDraftEmptyState } from "../empty-states";
|
|||||||
import { IssuePeekOverview } from "components/issues/peek-overview";
|
import { IssuePeekOverview } from "components/issues/peek-overview";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
// ui
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
import { DraftKanBanLayout } from "../kanban/roots/draft-issue-root";
|
import { DraftKanBanLayout } from "../kanban/roots/draft-issue-root";
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
@ -42,17 +41,7 @@ export const DraftIssueLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId) return <></>;
|
if (!workspaceSlug || !projectId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -16,8 +16,6 @@ import {
|
|||||||
ModuleSpreadsheetLayout,
|
ModuleSpreadsheetLayout,
|
||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// ui
|
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
|
|
||||||
@ -50,17 +48,7 @@ export const ModuleLayoutRoot: React.FC = observer(() => {
|
|||||||
const activeLayout = issuesFilter?.issueFilters?.displayFilters?.layout || undefined;
|
const activeLayout = issuesFilter?.issueFilters?.displayFilters?.layout || undefined;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -15,7 +15,6 @@ import {
|
|||||||
ProjectViewListLayout,
|
ProjectViewListLayout,
|
||||||
ProjectViewSpreadsheetLayout,
|
ProjectViewSpreadsheetLayout,
|
||||||
} from "components/issues";
|
} from "components/issues";
|
||||||
import { Spinner } from "@plane/ui";
|
|
||||||
import { ActiveLoader } from "components/ui";
|
import { ActiveLoader } from "components/ui";
|
||||||
// constants
|
// constants
|
||||||
import { EIssuesStoreType } from "constants/issue";
|
import { EIssuesStoreType } from "constants/issue";
|
||||||
@ -66,17 +65,7 @@ export const ProjectViewLayoutRoot: React.FC = observer(() => {
|
|||||||
if (!workspaceSlug || !projectId || !viewId) return <></>;
|
if (!workspaceSlug || !projectId || !viewId) return <></>;
|
||||||
|
|
||||||
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
if (issues?.loader === "init-loader" || !issues?.groupedIssueIds) {
|
||||||
return (
|
return <>{activeLayout && <ActiveLoader layout={activeLayout} />}</>;
|
||||||
<>
|
|
||||||
{activeLayout ? (
|
|
||||||
<ActiveLoader layout={activeLayout} />
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center">
|
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user