From 38daf7236147459c34a4830a194bf9c514a2162e Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 23 Apr 2024 12:49:29 +0530 Subject: [PATCH 001/107] [WEB-872] chore: add tooltip to peek overview header icons. (#4229) --- .../issues/peek-overview/header.tsx | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/web/components/issues/peek-overview/header.tsx b/web/components/issues/peek-overview/header.tsx index 70c57c3f32f..e2ad668ba1c 100644 --- a/web/components/issues/peek-overview/header.tsx +++ b/web/components/issues/peek-overview/header.tsx @@ -112,22 +112,28 @@ export const IssuePeekOverviewHeader: FC = observer((pr }`} >
- + + + - removeRoutePeekId()}> - - + + removeRoutePeekId()}> + + + {currentMode && (
setPeekMode(val)} customButton={ - + + + } > {PEEK_OPTIONS.map((mode) => ( From c50a0602f70d986ee1f747f25da53595ac10be88 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 23 Apr 2024 12:51:20 +0530 Subject: [PATCH 002/107] [WEB-871] chore: update leave project modal message in members settings page. (#4230) * [WEB-871] chore: update leave project modal message in members settings page. * fix: build errors. --- .../project/confirm-project-member-remove.tsx | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/web/components/project/confirm-project-member-remove.tsx b/web/components/project/confirm-project-member-remove.tsx index 10cd16f44c5..bc814199100 100644 --- a/web/components/project/confirm-project-member-remove.tsx +++ b/web/components/project/confirm-project-member-remove.tsx @@ -1,13 +1,14 @@ import React, { useState } from "react"; import { observer } from "mobx-react-lite"; +import { useRouter } from "next/router"; import { AlertTriangle } from "lucide-react"; import { Dialog, Transition } from "@headlessui/react"; +// types import { IUserLite } from "@plane/types"; -// hooks -import { Button } from "@plane/ui"; -import { useUser } from "@/hooks/store"; // ui -// types +import { Button } from "@plane/ui"; +// hooks +import { useProject, useUser } from "@/hooks/store"; type Props = { data: IUserLite; @@ -18,10 +19,14 @@ type Props = { export const ConfirmProjectMemberRemove: React.FC = observer((props) => { const { data, onSubmit, isOpen, onClose } = props; + // router + const router = useRouter(); + const { projectId } = router.query; // states const [isDeleteLoading, setIsDeleteLoading] = useState(false); // store hooks const { currentUser } = useUser(); + const { getProjectById } = useProject(); const handleClose = () => { onClose(); @@ -36,7 +41,10 @@ export const ConfirmProjectMemberRemove: React.FC = observer((props) => { handleClose(); }; + if (!projectId) return <>; + const isCurrentUser = currentUser?.id === data?.id; + const currentProjectDetails = getProjectById(projectId.toString()); return ( @@ -76,9 +84,19 @@ export const ConfirmProjectMemberRemove: React.FC = observer((props) => {

- Are you sure you want to remove member-{" "} - {data?.display_name}? They will no longer have access to - this project. This action cannot be undone. + {isCurrentUser ? ( + <> + Are you sure you want to leave the{" "} + {currentProjectDetails?.name} project? You will be able + to join the project if invited again or if it{"'"}s public. + + ) : ( + <> + Are you sure you want to remove member-{" "} + {data?.display_name}? They will no longer have access + to this project. This action cannot be undone. + + )}

From f77d2d8c0a3ee90602db92259f1d7fe3a6a5f524 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 23 Apr 2024 12:52:31 +0530 Subject: [PATCH 003/107] [WEB-643] chore: update issue activity tabs. (#4232) * remove `updates` tab. * make `comments` as primary tab. --- .../issue-activity/activity/root.tsx | 33 ------------------- .../issue-detail/issue-activity/index.ts | 1 - .../issue-detail/issue-activity/root.tsx | 25 +++++--------- 3 files changed, 9 insertions(+), 50 deletions(-) delete mode 100644 web/components/issues/issue-detail/issue-activity/activity/root.tsx diff --git a/web/components/issues/issue-detail/issue-activity/activity/root.tsx b/web/components/issues/issue-detail/issue-activity/activity/root.tsx deleted file mode 100644 index 88dbead96ca..00000000000 --- a/web/components/issues/issue-detail/issue-activity/activity/root.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { FC } from "react"; -import { observer } from "mobx-react-lite"; -// hooks -import { useIssueDetail } from "@/hooks/store"; -// components -import { IssueActivityList } from "./activity-list"; - -type TIssueActivityRoot = { - issueId: string; -}; - -export const IssueActivityRoot: FC = observer((props) => { - const { issueId } = props; - // hooks - const { - activity: { getActivitiesByIssueId }, - } = useIssueDetail(); - - const activityIds = getActivitiesByIssueId(issueId); - - if (!activityIds) return <>; - return ( -
- {activityIds.map((activityId, index) => ( - - ))} -
- ); -}); diff --git a/web/components/issues/issue-detail/issue-activity/index.ts b/web/components/issues/issue-detail/issue-activity/index.ts index 13b2088357d..bb6b1405a40 100644 --- a/web/components/issues/issue-detail/issue-activity/index.ts +++ b/web/components/issues/issue-detail/issue-activity/index.ts @@ -3,7 +3,6 @@ export * from "./root"; export * from "./activity-comment-root"; // activity -export * from "./activity/root"; export * from "./activity/activity-list"; // issue comment diff --git a/web/components/issues/issue-detail/issue-activity/root.tsx b/web/components/issues/issue-detail/issue-activity/root.tsx index cdcd63057dc..982fe095214 100644 --- a/web/components/issues/issue-detail/issue-activity/root.tsx +++ b/web/components/issues/issue-detail/issue-activity/root.tsx @@ -1,12 +1,12 @@ import { FC, useMemo, useState } from "react"; import { observer } from "mobx-react-lite"; -import { History, LucideIcon, MessageCircle, ListRestart } from "lucide-react"; +import { History, LucideIcon, MessageCircle } from "lucide-react"; // types import { TIssueComment } from "@plane/types"; // ui import { TOAST_TYPE, setToast } from "@plane/ui"; // components -import { IssueActivityCommentRoot, IssueActivityRoot, IssueCommentRoot, IssueCommentCreate } from "@/components/issues"; +import { IssueActivityCommentRoot, IssueCommentRoot, IssueCommentCreate } from "@/components/issues"; // hooks import { useIssueDetail, useProject } from "@/hooks/store"; @@ -17,24 +17,19 @@ type TIssueActivity = { disabled?: boolean; }; -type TActivityTabs = "all" | "activity" | "comments"; +type TActivityTabs = "all" | "comments"; const activityTabs: { key: TActivityTabs; title: string; icon: LucideIcon }[] = [ - { - key: "all", - title: "All activity", - icon: History, - }, - { - key: "activity", - title: "Updates", - icon: ListRestart, - }, { key: "comments", title: "Comments", icon: MessageCircle, }, + { + key: "all", + title: "All activity", + icon: History, + }, ]; export type TActivityOperations = { @@ -49,7 +44,7 @@ export const IssueActivity: FC = observer((props) => { const { createComment, updateComment, removeComment } = useIssueDetail(); const { getProjectById } = useProject(); // state - const [activityTab, setActivityTab] = useState("all"); + const [activityTab, setActivityTab] = useState("comments"); const activityOperations: TActivityOperations = useMemo( () => ({ @@ -158,8 +153,6 @@ export const IssueActivity: FC = observer((props) => { /> )}
- ) : activityTab === "activity" ? ( - ) : (
Date: Tue, 23 Apr 2024 12:53:52 +0530 Subject: [PATCH 004/107] [WEB-1027] fix: overflow & alignment fixes (#4234) * fix: list layout issue title overflow * fix: project feature toggle modal project name overflow * fix: app sidebar project section alignment * fix: issue title textarea * fix: create issue modal project select overflow * fix: module and cycle applied filters overflow fix --- packages/ui/src/form-fields/textarea.tsx | 14 +------------- web/components/dropdowns/project.tsx | 2 +- .../filters/applied-filters/cycle.tsx | 4 ++-- .../filters/applied-filters/filters-list.tsx | 4 ++-- .../filters/applied-filters/module.tsx | 4 ++-- web/components/issues/issue-layouts/list/block.tsx | 12 ++++++------ web/components/project/project-feature-update.tsx | 4 ++-- web/components/project/sidebar-list-item.tsx | 2 +- 8 files changed, 17 insertions(+), 29 deletions(-) diff --git a/packages/ui/src/form-fields/textarea.tsx b/packages/ui/src/form-fields/textarea.tsx index de225d68f3f..2c47a65f573 100644 --- a/packages/ui/src/form-fields/textarea.tsx +++ b/packages/ui/src/form-fields/textarea.tsx @@ -11,17 +11,7 @@ export interface TextAreaProps extends React.TextareaHTMLAttributes((props, ref) => { - const { - id, - name, - value = "", - rows = 1, - cols = 1, - mode = "primary", - hasError = false, - className = "", - ...rest - } = props; + const { id, name, value = "", mode = "primary", hasError = false, className = "", ...rest } = props; // refs const textAreaRef = useRef(ref); // auto re-size @@ -33,8 +23,6 @@ const TextArea = React.forwardRef((props, re name={name} ref={textAreaRef} value={value} - rows={rows} - cols={cols} className={cn( "no-scrollbar w-full bg-transparent px-3 py-2 placeholder-custom-text-400 outline-none", { diff --git a/web/components/dropdowns/project.tsx b/web/components/dropdowns/project.tsx index 95ed8cd62d4..e281db07b52 100644 --- a/web/components/dropdowns/project.tsx +++ b/web/components/dropdowns/project.tsx @@ -176,7 +176,7 @@ export const ProjectDropdown: React.FC = observer((props) => { )} {BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && ( - {selectedProject?.name ?? placeholder} + {selectedProject?.name ?? placeholder} )} {dropdownArrow && (