diff --git a/packages/editor/core/src/ui/extensions/index.tsx b/packages/editor/core/src/ui/extensions/index.tsx index fab0d5b74..19d8ce894 100644 --- a/packages/editor/core/src/ui/extensions/index.tsx +++ b/packages/editor/core/src/ui/extensions/index.tsx @@ -56,6 +56,7 @@ export const CoreEditorExtensions = ( code: false, codeBlock: false, horizontalRule: false, + blockquote: false, dropcursor: { color: "rgba(var(--color-text-100))", width: 2, diff --git a/packages/editor/core/src/ui/extensions/quote/index.tsx b/packages/editor/core/src/ui/extensions/quote/index.tsx index a2c968401..9dcae6ad7 100644 --- a/packages/editor/core/src/ui/extensions/quote/index.tsx +++ b/packages/editor/core/src/ui/extensions/quote/index.tsx @@ -1,10 +1,9 @@ -import { isAtStartOfNode } from "@tiptap/core"; import Blockquote from "@tiptap/extension-blockquote"; export const CustomQuoteExtension = Blockquote.extend({ addKeyboardShortcuts() { return { - Enter: ({ editor }) => { + Enter: () => { const { $from, $to, $head } = this.editor.state.selection; const parent = $head.node(-1); diff --git a/packages/editor/extensions/src/extensions/drag-drop.tsx b/packages/editor/extensions/src/extensions/drag-drop.tsx index 269caad93..acdc99cf4 100644 --- a/packages/editor/extensions/src/extensions/drag-drop.tsx +++ b/packages/editor/extensions/src/extensions/drag-drop.tsx @@ -43,22 +43,23 @@ function absoluteRect(node: Element) { } function nodeDOMAtCoords(coords: { x: number; y: number }) { - return document.elementsFromPoint(coords.x, coords.y).find((elem: Element) => { - return ( - elem.parentElement?.matches?.(".ProseMirror") || - elem.matches( - [ - "li", - "p:not(:first-child)", - "pre", - "blockquote", - "h1, h2, h3", - "[data-type=horizontalRule]", - ".tableWrapper", - ].join(", ") - ) + return document + .elementsFromPoint(coords.x, coords.y) + .find( + (elem: Element) => + elem.parentElement?.matches?.(".ProseMirror") || + elem.matches( + [ + "li", + "p:not(:first-child)", + "pre", + "blockquote", + "h1, h2, h3", + "[data-type=horizontalRule]", + ".tableWrapper", + ].join(", ") + ) ); - }); } function nodePosAtDOM(node: Element, view: EditorView) { diff --git a/packages/ui/src/progress/circular-progress-indicator.tsx b/packages/ui/src/progress/circular-progress-indicator.tsx index d445480c7..66c70475f 100644 --- a/packages/ui/src/progress/circular-progress-indicator.tsx +++ b/packages/ui/src/progress/circular-progress-indicator.tsx @@ -35,9 +35,9 @@ export const CircularProgressIndicator: React.FC = ( width="45.2227" height="45.2227" filterUnits="userSpaceOnUse" - color-interpolation-filters="sRGB" + colorInterpolationFilters="sRGB" > - + diff --git a/web/components/cycles/active-cycle-details.tsx b/web/components/cycles/active-cycle-details.tsx index eb06c693a..ed946bd82 100644 --- a/web/components/cycles/active-cycle-details.tsx +++ b/web/components/cycles/active-cycle-details.tsx @@ -1,6 +1,5 @@ import { MouseEvent } from "react"; import Link from "next/link"; -import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import useSWR from "swr"; // hooks @@ -69,15 +68,13 @@ interface IActiveCycleDetails { } export const ActiveCycleDetails: React.FC = observer((props) => { - // router - const router = useRouter(); + // props const { workspaceSlug, projectId } = props; - + // store hooks const { issues: { issues, fetchActiveCycleIssues }, issueMap, } = useIssues(EIssuesStoreType.CYCLE); - // store hooks const { commandPalette: { toggleCreateCycleModal }, } = useApplication(); diff --git a/web/components/cycles/cycles-list.tsx b/web/components/cycles/cycles-list.tsx index 686937b71..87796340e 100644 --- a/web/components/cycles/cycles-list.tsx +++ b/web/components/cycles/cycles-list.tsx @@ -31,7 +31,12 @@ export const CyclesList: FC = observer((props) => {
{cycleIds.map((cycleId) => ( - + ))}
= observer((props) => { const { issues, issueIdList, quickActions, showAllIssues = false } = props; - // router - const router = useRouter(); // hooks const { router: { workspaceSlug, projectId }, diff --git a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index decc816f6..5095b9bec 100644 --- a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -40,7 +40,6 @@ export const HeaderGroupByCard: FC = observer((props) => { handleKanbanFilters, issuePayload, disableIssueCreation, - currentStore, addIssuesToView, } = props; const verticalAlignPosition = sub_group_by ? false : kanbanFilters?.group_by.includes(column_id); diff --git a/web/components/issues/issue-layouts/kanban/kanban-group.tsx b/web/components/issues/issue-layouts/kanban/kanban-group.tsx index cec36ad0c..0858190d3 100644 --- a/web/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/web/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -55,7 +55,6 @@ export const KanbanGroup = (props: IKanbanGroup) => { disableIssueCreation, quickAddCallback, viewId, - groupByVisibilityToggle, } = props; // hooks const projectState = useProjectState(); diff --git a/web/components/issues/issue-layouts/list/quick-add-issue-form.tsx b/web/components/issues/issue-layouts/list/quick-add-issue-form.tsx index a2239d2a4..540d4d7f6 100644 --- a/web/components/issues/issue-layouts/list/quick-add-issue-form.tsx +++ b/web/components/issues/issue-layouts/list/quick-add-issue-form.tsx @@ -4,7 +4,7 @@ import { useForm } from "react-hook-form"; import { PlusIcon } from "lucide-react"; import { observer } from "mobx-react-lite"; // hooks -import { useProject, useWorkspace } from "hooks/store"; +import { useProject } from "hooks/store"; import useToast from "hooks/use-toast"; import useKeypress from "hooks/use-keypress"; import useOutsideClickDetector from "hooks/use-outside-click-detector"; diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx index d8448cc0e..9d2d83071 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/all-issue.tsx @@ -67,7 +67,7 @@ export const AllIssueQuickActions: React.FC = (props) => { ellipsis > { + onClick={() => { handleCopyIssueLink(); }} > @@ -77,7 +77,7 @@ export const AllIssueQuickActions: React.FC = (props) => {
{ + onClick={() => { setIssueToEdit(issue); setCreateUpdateIssueModal(true); }} @@ -88,7 +88,7 @@ export const AllIssueQuickActions: React.FC = (props) => { { + onClick={() => { setCreateUpdateIssueModal(true); }} > @@ -98,7 +98,7 @@ export const AllIssueQuickActions: React.FC = (props) => { { + onClick={() => { setDeleteIssueModal(true); }} > diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx index 100ae99db..264093778 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/archived-issue.tsx @@ -48,7 +48,7 @@ export const ArchivedIssueQuickActions: React.FC = (props) => ellipsis > { + onClick={() => { handleCopyIssueLink(); }} > @@ -58,7 +58,7 @@ export const ArchivedIssueQuickActions: React.FC = (props) => { + onClick={() => { setDeleteIssueModal(true); }} > diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx index 7d708145b..130d9a3b7 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx @@ -67,7 +67,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { ellipsis > { + onClick={() => { handleCopyIssueLink(); }} > @@ -77,7 +77,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { { + onClick={() => { setIssueToEdit({ ...issue, cycle: cycleId?.toString() ?? null, @@ -91,7 +91,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { { + onClick={() => { handleRemoveFromView && handleRemoveFromView(); }} > @@ -101,7 +101,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { { + onClick={() => { setCreateUpdateIssueModal(true); }} > @@ -111,7 +111,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { { + onClick={() => { setDeleteIssueModal(true); }} > diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx index ac12c0d9b..49a086496 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx @@ -67,7 +67,7 @@ export const ModuleIssueQuickActions: React.FC = (props) => { ellipsis > { + onClick={() => { handleCopyIssueLink(); }} > @@ -77,7 +77,7 @@ export const ModuleIssueQuickActions: React.FC = (props) => { { + onClick={() => { setIssueToEdit({ ...issue, module: moduleId?.toString() ?? null }); setCreateUpdateIssueModal(true); }} @@ -88,7 +88,7 @@ export const ModuleIssueQuickActions: React.FC = (props) => { { + onClick={() => { handleRemoveFromView && handleRemoveFromView(); }} > @@ -98,7 +98,7 @@ export const ModuleIssueQuickActions: React.FC = (props) => { { + onClick={() => { setCreateUpdateIssueModal(true); }} > diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx index c0fa556b3..c39633965 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx @@ -76,7 +76,7 @@ export const ProjectIssueQuickActions: React.FC = (props) => ellipsis > { + onClick={() => { handleCopyIssueLink(); }} > @@ -88,7 +88,7 @@ export const ProjectIssueQuickActions: React.FC = (props) => {isEditingAllowed && ( <> { + onClick={() => { setIssueToEdit(issue); setCreateUpdateIssueModal(true); }} @@ -99,7 +99,7 @@ export const ProjectIssueQuickActions: React.FC = (props) => { + onClick={() => { setCreateUpdateIssueModal(true); }} > @@ -109,7 +109,7 @@ export const ProjectIssueQuickActions: React.FC = (props) => { + onClick={() => { setDeleteIssueModal(true); }} > diff --git a/web/components/issues/issue-layouts/roots/all-issue-layout-root.tsx b/web/components/issues/issue-layouts/roots/all-issue-layout-root.tsx index cf585a6fc..18d60bf68 100644 --- a/web/components/issues/issue-layouts/roots/all-issue-layout-root.tsx +++ b/web/components/issues/issue-layouts/roots/all-issue-layout-root.tsx @@ -66,7 +66,7 @@ export const AllIssueLayoutRoot: React.FC = observer((props) => { }; const issueIds = (groupedIssueIds ?? []) as TUnGroupedIssues; - const issuesArray = issueIds?.filter((id) => id && issueMap?.[id]).map((id) => issueMap?.[id]); + const issuesArray = issueIds?.filter((id: string) => id && issueMap?.[id]).map((id: string) => issueMap?.[id]); const issueActions = useMemo( () => ({ diff --git a/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx b/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx index 0091f000c..60847ec54 100644 --- a/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx @@ -1,14 +1,20 @@ -import { IIssueDisplayProperties, TIssue, TIssueMap } from "@plane/types"; -import { SPREADSHEET_PROPERTY_DETAILS, SPREADSHEET_PROPERTY_LIST } from "constants/spreadsheet"; -import { WithDisplayPropertiesHOC } from "../properties/with-display-properties-HOC"; -import { Tooltip } from "@plane/ui"; -import useOutsideClickDetector from "hooks/use-outside-click-detector"; -import { useIssueDetail, useProject } from "hooks/store"; import { useRef, useState } from "react"; import { useRouter } from "next/router"; -import { ChevronRight, MoreHorizontal } from "lucide-react"; -import { EIssueActions } from "../types"; import { observer } from "mobx-react-lite"; +// icons +import { ChevronRight, MoreHorizontal } from "lucide-react"; +// constants +import { SPREADSHEET_PROPERTY_DETAILS, SPREADSHEET_PROPERTY_LIST } from "constants/spreadsheet"; +// components +import { WithDisplayPropertiesHOC } from "../properties/with-display-properties-HOC"; +// ui +import { Tooltip } from "@plane/ui"; +// hooks +import useOutsideClickDetector from "hooks/use-outside-click-detector"; +import { useIssueDetail, useProject } from "hooks/store"; +// types +import { IIssueDisplayProperties, TIssue } from "@plane/types"; +import { EIssueActions } from "../types"; interface Props { displayProperties: IIssueDisplayProperties; diff --git a/web/components/issues/issue-layouts/spreadsheet/quick-add-issue-form.tsx b/web/components/issues/issue-layouts/spreadsheet/quick-add-issue-form.tsx index 44eb3a198..605e8bea1 100644 --- a/web/components/issues/issue-layouts/spreadsheet/quick-add-issue-form.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/quick-add-issue-form.tsx @@ -1,5 +1,4 @@ import { useEffect, useState, useRef } from "react"; -import { useRouter } from "next/router"; import { useForm } from "react-hook-form"; import { observer } from "mobx-react-lite"; import { PlusIcon } from "lucide-react"; @@ -56,10 +55,6 @@ const Inputs = (props: any) => { export const SpreadsheetQuickAddIssueForm: React.FC = observer((props) => { const { formKey, prePopulatedData, quickAddCallback, viewId } = props; - - // router - const router = useRouter(); - const { workspaceSlug, projectId } = router.query; // store hooks const { currentWorkspace } = useWorkspace(); const { currentProjectDetails } = useProject(); diff --git a/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx b/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx index adf1e53f4..89926f281 100644 --- a/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from "react"; +import React, { useEffect, useRef } from "react"; import { observer } from "mobx-react-lite"; // components import { Spinner } from "@plane/ui"; @@ -9,7 +9,6 @@ import { EIssueActions } from "../types"; import { useProject } from "hooks/store"; import { SpreadsheetHeader } from "./spreadsheet-header"; import { SpreadsheetIssueRow } from "./issue-row"; -import { WithDisplayPropertiesHOC } from "../properties/with-display-properties-HOC"; type Props = { displayProperties: IIssueDisplayProperties; diff --git a/web/components/issues/issue-modal/draft-issue-layout.tsx b/web/components/issues/issue-modal/draft-issue-layout.tsx index 15cba3c04..274df2981 100644 --- a/web/components/issues/issue-modal/draft-issue-layout.tsx +++ b/web/components/issues/issue-modal/draft-issue-layout.tsx @@ -14,6 +14,8 @@ import type { TIssue } from "@plane/types"; export interface DraftIssueProps { changesMade: Partial | null; data?: Partial; + isCreateMoreToggleEnabled: boolean; + onCreateMoreToggleChange: (value: boolean) => void; onChange: (formData: Partial | null) => void; onClose: (saveDraftIssueInLocalStorage?: boolean) => void; onSubmit: (formData: Partial) => Promise; @@ -23,7 +25,16 @@ export interface DraftIssueProps { const issueDraftService = new IssueDraftService(); export const DraftIssueLayout: React.FC = observer((props) => { - const { changesMade, data, onChange, onClose, onSubmit, projectId } = props; + const { + changesMade, + data, + onChange, + onClose, + onSubmit, + projectId, + isCreateMoreToggleEnabled, + onCreateMoreToggleChange, + } = props; // states const [issueDiscardModal, setIssueDiscardModal] = useState(false); // router @@ -76,7 +87,15 @@ export const DraftIssueLayout: React.FC = observer((props) => { onClose(false); }} /> - + ); }); diff --git a/web/components/issues/issue-modal/form.tsx b/web/components/issues/issue-modal/form.tsx index 687e32302..1853f9546 100644 --- a/web/components/issues/issue-modal/form.tsx +++ b/web/components/issues/issue-modal/form.tsx @@ -51,6 +51,8 @@ const defaultValues: Partial = { export interface IssueFormProps { data?: Partial; + isCreateMoreToggleEnabled: boolean; + onCreateMoreToggleChange: (value: boolean) => void; onChange?: (formData: Partial | null) => void; onClose: () => void; onSubmit: (values: Partial) => Promise; @@ -62,14 +64,15 @@ const aiService = new AIService(); const fileService = new FileService(); export const IssueFormRoot: FC = observer((props) => { - const { data, onChange, onClose, onSubmit, projectId } = props; + const { data, onChange, onClose, onSubmit, projectId, isCreateMoreToggleEnabled, onCreateMoreToggleChange } = props; + console.log("onCreateMoreToggleChange", typeof onCreateMoreToggleChange); // states const [labelModal, setLabelModal] = useState(false); const [parentIssueListModalOpen, setParentIssueListModalOpen] = useState(false); const [selectedParentIssue, setSelectedParentIssue] = useState(null); const [gptAssistantModal, setGptAssistantModal] = useState(false); const [iAmFeelingLucky, setIAmFeelingLucky] = useState(false); - const [createMore, setCreateMore] = useState(false); + // refs const editorRef = useRef(null); // router @@ -276,7 +279,7 @@ export const IssueFormRoot: FC = observer((props) => { />
- {issueName && issueName.trim() !== "" && ( + {issueName && issueName.trim() !== "" && envConfig?.has_openai_configured && (