From 1364c842e0b6b3553f9ec354830e29454777f638 Mon Sep 17 00:00:00 2001 From: anmolsinghbhatia Date: Tue, 25 Apr 2023 17:33:53 +0530 Subject: [PATCH] feat: product updates button added --- .../command-palette/command-pallette.tsx | 8 -------- apps/app/components/command-palette/index.ts | 1 - apps/app/components/ui/index.ts | 1 + .../product-updates-modal.tsx | 12 ++++++------ apps/app/pages/[workspaceSlug]/index.tsx | 15 ++++++++++++--- 5 files changed, 19 insertions(+), 18 deletions(-) rename apps/app/components/{command-palette => ui}/product-updates-modal.tsx (89%) diff --git a/apps/app/components/command-palette/command-pallette.tsx b/apps/app/components/command-palette/command-pallette.tsx index 101ae25fd..26555ddf1 100644 --- a/apps/app/components/command-palette/command-pallette.tsx +++ b/apps/app/components/command-palette/command-pallette.tsx @@ -45,7 +45,6 @@ import { ChangeIssuePriority, ChangeIssueAssignee, ChangeInterfaceTheme, - ProductUpdatesModal, } from "components/command-palette"; import { BulkDeleteIssuesModal } from "components/core"; import { CreateUpdateCycleModal } from "components/cycles"; @@ -75,7 +74,6 @@ export const CommandPalette: React.FC = () => { const [isIssueModalOpen, setIsIssueModalOpen] = useState(false); const [isProjectModalOpen, setIsProjectModalOpen] = useState(false); const [isShortcutsModalOpen, setIsShortcutsModalOpen] = useState(false); - const [isProductUpdatesModalOpen, setIsProductUpdatesModalOpen] = useState(false); const [isCreateCycleModalOpen, setIsCreateCycleModalOpen] = useState(false); const [isCreateViewModalOpen, setIsCreateViewModalOpen] = useState(false); const [isCreateModuleModalOpen, setIsCreateModuleModalOpen] = useState(false); @@ -223,8 +221,6 @@ export const CommandPalette: React.FC = () => { setIsCreateCycleModalOpen(true); } else if (keyPressed === "m") { setIsCreateModuleModalOpen(true); - } else if (keyPressed === "u") { - setIsProductUpdatesModalOpen(true); } } }, @@ -328,10 +324,6 @@ export const CommandPalette: React.FC = () => { return ( <> - {workspaceSlug && ( )} diff --git a/apps/app/components/command-palette/index.ts b/apps/app/components/command-palette/index.ts index 27bad1357..858aba401 100644 --- a/apps/app/components/command-palette/index.ts +++ b/apps/app/components/command-palette/index.ts @@ -4,4 +4,3 @@ export * from "./change-issue-state"; export * from "./change-issue-priority"; export * from "./change-issue-assignee"; export * from "./change-interface-theme"; -export * from "./product-updates-modal"; diff --git a/apps/app/components/ui/index.ts b/apps/app/components/ui/index.ts index 5c23ecdf5..3f50d1a21 100644 --- a/apps/app/components/ui/index.ts +++ b/apps/app/components/ui/index.ts @@ -21,3 +21,4 @@ export * from "./spinner"; export * from "./tooltip"; export * from "./toggle-switch"; export * from "./markdown-to-component"; +export * from "./product-updates-modal"; diff --git a/apps/app/components/command-palette/product-updates-modal.tsx b/apps/app/components/ui/product-updates-modal.tsx similarity index 89% rename from apps/app/components/command-palette/product-updates-modal.tsx rename to apps/app/components/ui/product-updates-modal.tsx index c099cf505..b37517343 100644 --- a/apps/app/components/command-palette/product-updates-modal.tsx +++ b/apps/app/components/ui/product-updates-modal.tsx @@ -18,7 +18,7 @@ export const ProductUpdatesModal: React.FC = ({ isOpen, setIsOpen }) => { console.log("updates:", updates); return ( - + = ({ isOpen, setIsOpen }) => { leaveFrom="opacity-100" leaveTo="opacity-0" > -
+
@@ -42,19 +42,19 @@ export const ProductUpdatesModal: React.FC = ({ isOpen, setIsOpen }) => { leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - -
+ +
Product Updates diff --git a/apps/app/pages/[workspaceSlug]/index.tsx b/apps/app/pages/[workspaceSlug]/index.tsx index adf893f88..a39bc163a 100644 --- a/apps/app/pages/[workspaceSlug]/index.tsx +++ b/apps/app/pages/[workspaceSlug]/index.tsx @@ -15,6 +15,7 @@ import { IssuesPieChart, IssuesStats, } from "components/workspace"; +import { ProductUpdatesModal } from "components/ui"; // types import type { NextPage } from "next"; // fetch-keys @@ -22,6 +23,7 @@ import { USER_WORKSPACE_DASHBOARD } from "constants/fetch-keys"; const WorkspacePage: NextPage = () => { const [month, setMonth] = useState(new Date().getMonth() + 1); + const [isProductUpdatesModalOpen, setIsProductUpdatesModalOpen] = useState(false); const router = useRouter(); const { workspaceSlug } = router.query; @@ -39,6 +41,10 @@ const WorkspacePage: NextPage = () => { return ( +
{ Plane is open source, support us by starring us on GitHub.

- {/* - View roadmap - */} +