From 42ccd1de5827a2a4bf87a7d46b4f977be1ebdf49 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Wed, 22 Nov 2023 12:58:55 +0530 Subject: [PATCH 1/6] Style: UI improvements (#2824) * style: update notification Read status toast alert description. * style: update issue subscribe button design. * fix: remove group_by `none` display filter from the kanban view in profile and draft issues. * style: design improvement in members settings. * style: add display name for all user role. * style: remove email for user roles other than admin. * style: fix border color as per designs. --- web/components/issues/issue-peek-overview/view.tsx | 1 + web/components/issues/sidebar.tsx | 13 +++++++------ web/components/notifications/notification-card.tsx | 2 +- web/components/project/member-list-item.tsx | 12 ++++++++++-- .../workspace/settings/members-list-item.tsx | 12 ++++++++++-- web/components/workspace/settings/members-list.tsx | 2 +- web/constants/issue.ts | 4 ++-- 7 files changed, 32 insertions(+), 14 deletions(-) diff --git a/web/components/issues/issue-peek-overview/view.tsx b/web/components/issues/issue-peek-overview/view.tsx index 3d29c1545..88afbd487 100644 --- a/web/components/issues/issue-peek-overview/view.tsx +++ b/web/components/issues/issue-peek-overview/view.tsx @@ -225,6 +225,7 @@ export const IssueView: FC = observer((props) => { size="sm" prependIcon={} variant="outline-primary" + className="hover:!bg-custom-primary-100/20" onClick={() => issueSubscription && issueSubscription.subscribed ? issueSubscriptionRemove() diff --git a/web/components/issues/sidebar.tsx b/web/components/issues/sidebar.tsx index e67b73baa..c0bb2da18 100644 --- a/web/components/issues/sidebar.tsx +++ b/web/components/issues/sidebar.tsx @@ -33,7 +33,7 @@ import { import { CustomDatePicker } from "components/ui"; // icons import { Bell, CalendarDays, LinkIcon, Plus, Signal, Tag, Trash2, Triangle, User2 } from "lucide-react"; -import { ContrastIcon, DiceIcon, DoubleCircleIcon, UserGroupIcon } from "@plane/ui"; +import { Button, ContrastIcon, DiceIcon, DoubleCircleIcon, UserGroupIcon } from "@plane/ui"; // helpers import { copyTextToClipboard } from "helpers/string.helper"; // types @@ -273,17 +273,18 @@ export const IssueDetailsSidebar: React.FC = observer((props) => { !issueDetail?.assignees.includes(user?.id ?? "") && !router.pathname.includes("[archivedIssueId]") && (fieldsToShow.includes("all") || fieldsToShow.includes("subscribe")) && ( - + )} {(fieldsToShow.includes("all") || fieldsToShow.includes("link")) && ( - setGptAssistantModal(false)} - inset="top-8 left-0" - content={watch("description_html")} - htmlContent={watch("description_html")} - onResponse={(response) => { - if (data && handleAiAssistance) { - handleAiAssistance(response); - editorRef.current?.setEditorValue(`${watch("description_html")}

${response}

` ?? ""); - } else { - setValue("description", {}); - setValue("description_html", `${watch("description_html")}

${response}

`); + {envConfig?.has_openai_configured && ( + setGptAssistantModal(false)} + inset="top-8 left-0" + content={watch("description_html")} + htmlContent={watch("description_html")} + onResponse={(response) => { + if (data && handleAiAssistance) { + handleAiAssistance(response); + editorRef.current?.setEditorValue(`${watch("description_html")}

${response}

` ?? ""); + } else { + setValue("description", {}); + setValue("description_html", `${watch("description_html")}

${response}

`); - editorRef.current?.setEditorValue(watch("description_html") ?? ""); - } - }} - projectId={projectId?.toString() ?? ""} - /> + editorRef.current?.setEditorValue(watch("description_html") ?? ""); + } + }} + projectId={projectId?.toString() ?? ""} + /> + )} ); }; diff --git a/web/components/web-hooks/webhooks-list-item.tsx b/web/components/web-hooks/webhooks-list-item.tsx index 4d99e1d22..549caf024 100644 --- a/web/components/web-hooks/webhooks-list-item.tsx +++ b/web/components/web-hooks/webhooks-list-item.tsx @@ -1,10 +1,10 @@ -import { FC, useState } from "react"; +import { FC } from "react"; import { ToggleSwitch } from "@plane/ui"; -import { Pencil, XCircle } from "lucide-react"; -import { IWebhook } from "types"; import Link from "next/link"; import { RootStore } from "store/root"; import { useMobxStore } from "lib/mobx/store-provider"; +// types +import { IWebhook } from "types"; interface IWebhookListItem { workspaceSlug: string; diff --git a/web/types/app.d.ts b/web/types/app.d.ts index d5a7953b1..05f0fc7e5 100644 --- a/web/types/app.d.ts +++ b/web/types/app.d.ts @@ -11,4 +11,6 @@ export interface IAppConfig { slack_client_id: string | null; posthog_api_key: string | null; posthog_host: string | null; + has_openai_configured: boolean; + has_unsplash_configured: boolean; } From 67000892e59e70abd455d62217ef9c9c14d1410b Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 22 Nov 2023 13:47:59 +0530 Subject: [PATCH 3/6] chore: dashboard redirection fix (#2826) --- web/components/workspace/issues-stats.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/components/workspace/issues-stats.tsx b/web/components/workspace/issues-stats.tsx index 22e966ac8..aef5cd108 100644 --- a/web/components/workspace/issues-stats.tsx +++ b/web/components/workspace/issues-stats.tsx @@ -23,7 +23,10 @@ export const IssuesStats: React.FC = ({ data }) => {

Issues assigned to you

{data ? ( -
router.push(`/${workspaceSlug}/me/my-issues`)}> +
router.push(`/${workspaceSlug}/workspace-views/assigned`)} + > {data.assigned_issues_count}
) : ( From 021c0675b79de723b17679f176f66a4d7419bb2e Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:36:29 +0530 Subject: [PATCH 4/6] fix: module sidebar link section (#2830) --- web/components/modules/sidebar.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web/components/modules/sidebar.tsx b/web/components/modules/sidebar.tsx index 62613bd39..df42fc0e4 100644 --- a/web/components/modules/sidebar.tsx +++ b/web/components/modules/sidebar.tsx @@ -429,10 +429,7 @@ export const ModuleDetailsSidebar: React.FC = observer((props) => { {({ open }) => (
- +
Links
From 6cb393983504af5fa62ef072f5e911e8273690bc Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:54:52 +0530 Subject: [PATCH 5/6] style: project card improvement (#2827) --- web/components/project/card.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/project/card.tsx b/web/components/project/card.tsx index 9bfe6b7a7..25faed4b3 100644 --- a/web/components/project/card.tsx +++ b/web/components/project/card.tsx @@ -113,7 +113,7 @@ export const ProjectCard: React.FC = observer((props) => { className="absolute top-0 left-0 h-full w-full object-cover rounded-t" /> -
+
From 59dbbb29cd0a981a5c6236fde06aea2eff50abdb Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:55:18 +0530 Subject: [PATCH 6/6] fix: custom analytics project dropdown fix (#2828) --- web/components/analytics/custom-analytics/select/project.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/analytics/custom-analytics/select/project.tsx b/web/components/analytics/custom-analytics/select/project.tsx index c57e56709..a4220266b 100644 --- a/web/components/analytics/custom-analytics/select/project.tsx +++ b/web/components/analytics/custom-analytics/select/project.tsx @@ -34,7 +34,7 @@ export const SelectProject: React.FC = ({ value, onChange, projects }) => .join(", ") : "All projects" } - optionsClassName="min-w-full" + optionsClassName="min-w-full max-w-[20rem]" multiple /> );