π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
chore: community edition product updates link (#6132)
Prateek Shourya849d9891d266
diff --git a/packages/types/src/instance/base.d.ts b/packages/types/src/instance/base.d.tsindex 41198b27c9..33d0734ad3 100644--- a/packages/types/src/instance/base.d.ts+++ b/packages/types/src/instance/base.d.ts@@ -57,6 +57,7 @@ export interface IInstanceConfig {// intercomis_intercom_enabled: boolean;intercom_app_id: string | undefined;+ instance_changelog_url?: string;}export interface IInstanceAdmin {diff --git a/web/core/components/common/logo.tsx b/web/core/components/common/logo.tsxindex 02b26a10be..0638b8410a 100644--- a/web/core/components/common/logo.tsx+++ b/web/core/components/common/logo.tsx@@ -1,14 +1,14 @@"use client";import { FC } from "react";-// emoji-picker-reactimport { Emoji } from "emoji-picker-react";+import useFontFaceObserver from "use-font-face-observer";+// typesimport { TLogoProps } from "@plane/types";-// helpers+// uiimport { LUCIDE_ICONS_LIST } from "@plane/ui";+// helpersimport { emojiCodeToUnicode } from "@/helpers/emoji.helper";-// import { icons } from "lucide-react";-import useFontFaceObserver from "use-font-face-observer";type Props = {logo: TLogoProps;diff --git a/web/core/components/global/product-updates/modal.tsx b/web/core/components/global/product-updates/modal.tsxindex 6bdacc9470..4288d68ee3 100644--- a/web/core/components/global/product-updates/modal.tsx+++ b/web/core/components/global/product-updates/modal.tsx@@ -1,19 +1,13 @@-import { FC, useRef } from "react";+import { FC } from "react";import { observer } from "mobx-react-lite";-import useSWR from "swr";-// editor-import { DocumentReadOnlyEditorWithRef, EditorRefApi } from "@plane/editor";// uiimport { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";-// helpers-import { LogoSpinner } from "@/components/common";+// componentsimport { ProductUpdatesFooter } from "@/components/global";+// hooks+import { useInstance } from "@/hooks/store";// plane web componentsimport { ProductUpdatesHeader } from "@/plane-web/components/global";-// services-import { InstanceService } from "@/services/instance.service";--const instanceService = new InstanceService();export type ProductUpdatesModalProps = {isOpen: boolean;@@ -22,20 +16,16 @@ export type ProductUpdatesModalProps = {export const ProductUpdatesModal: FC<ProductUpdatesModalProps> = observer((props) => {const { isOpen, handleClose } = props;- // refs- const editorRef = useRef<EditorRefApi>(null);- // swr- const { data, isLoading, error } = useSWR(`INSTANCE_CHANGELOG`, () => instanceService.getInstanceChangeLog(), {- shouldRetryOnError: false,- revalidateIfStale: false,- revalidateOnFocus: false,- });++ const { config } = useInstance();return (<ModalCore isOpen={isOpen} handleClose={handleClose} position={EModalPosition.CENTER} width={EModalWidth.XXL}><ProductUpdatesHeader /><div className="flex flex-col h-[60vh] vertical-scrollbar scrollbar-xs overflow-hidden overflow-y-scroll px-6 mx-0.5">- {!isLoading && !!error ? (+ {config?.instance_changelog_url && config?.instance_changelog_url !== "" ? (+ <iframe src={config?.instance_changelog_url} className="w-full h-full" />+ ) : (<div className="flex flex-col items-center justify-center w-full h-full mb-8"><div className="text-lg font-medium">We are having trouble fetching the updates.</div><div className="text-sm text-custom-text-200">@@ -50,33 +40,6 @@ export const ProductUpdatesModal: FC<ProductUpdatesModalProps> = observer((propsfor the latest updates.</div></div>- ) : isLoading ? (- <div className="flex items-center justify-center w-full h-full">- <LogoSpinner />- </div>- ) : (- <div className="ml-5">- {data?.id && (- <DocumentReadOnlyEditorWithRef- ref={editorRef}- disabledExtensions={[]}- id={data.id}- initialValue={data.description_html ?? "<p></p>"}- containerClassName="p-0 border-none"- mentionHandler={{- highlights: () => Promise.resolve([]),- }}- embedHandler={{- issue: {- widgetCallback: () => <></>,- },- }}- fileHandler={{- getAssetSrc: () => Promise.resolve(""),- }}- />- )}- </div>)}</div><ProductUpdatesFooter />diff --git a/web/core/components/workspace/sidebar/help-section.tsx b/web/core/components/workspace/sidebar/help-section.tsxindex e15c4fb75d..7f67e4083c 100644--- a/web/core/components/workspace/sidebar/help-section.tsx+++ b/web/core/components/workspace/sidebar/help-section.tsx@@ -32,7 +32,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(const { canUseLocalDB, toggleLocalDB } = useUserSettings();// statesconst [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false);- const [isChangeLogOpen, setIsChangeLogOpen] = useState(false);+ const [isProductUpdatesModalOpen, setProductUpdatesModalOpen] = useState(false);const handleCrispWindowShow = () => {toggleIntercom(!isIntercomToggle);@@ -42,7 +42,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(return (<>- <ProductUpdatesModal isOpen={isChangeLogOpen} handleClose={() => setIsChangeLogOpen(false)} />+ <ProductUpdatesModal isOpen={isProductUpdatesModalOpen} handleClose={() => setProductUpdatesModalOpen(false)} /><divclassName={cn("flex w-full items-center justify-between px-2 self-baseline border-t border-custom-border-200 bg-custom-sidebar-background-100 h-12 flex-shrink-0",@@ -56,8 +56,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(><CustomMenucustomButton={- <button- type="button"+ <divclassName={cn("grid place-items-center rounded-md p-1 outline-none text-custom-text-200 hover:text-custom-text-100 hover:bg-custom-background-90",{@@ -68,7 +67,7 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(<Tooltip tooltipContent="Help" isMobile={isMobile} disabled={isNeedHelpOpen}><HelpCircle className="h-[18px] w-[18px] outline-none" /></Tooltip>- </button>+ </div>}customButtonClassName={`relative grid place-items-center rounded-md p-1.5 outline-none ${isCollapsed ? "w-full" : ""}`}menuButtonOnClick={() => !isNeedHelpOpen && setIsNeedHelpOpen(true)}@@ -135,14 +134,13 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(</button></CustomMenu.MenuItem><CustomMenu.MenuItem>- <a- target="_blank"+ <buttontype="button"- href="https://plane.so/changelog/community"+ onClick={() => setProductUpdatesModalOpen(true)}className="flex w-full items-center justify-start text-xs hover:bg-custom-background-80"><span className="text-xs">What's new</span>- </a>+ </button></CustomMenu.MenuItem><CustomMenu.MenuItem><a