[WEB-2500] feat: Product updates modal (What's new in Plane) (#5690)

* [WEB-2500] feat: Product updates modal (What's new in Plane)

* fix: build errors.

* fix: lint errors resolved.

* chore: minor improvements.

* chore: minor fixes
This commit is contained in:
Prateek Shourya 2024-10-29 19:26:00 +05:30 committed by GitHub
parent c423d7d9df
commit 4bc751b7ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 250 additions and 151 deletions

View file

@ -5,14 +5,16 @@ import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import { FileText, HelpCircle, MessagesSquare, MoveLeft, User } from "lucide-react";
// ui
import { CustomMenu, ToggleSwitch, Tooltip } from "@plane/ui";
import { CustomMenu, Tooltip, ToggleSwitch } from "@plane/ui";
// components
import { ProductUpdatesModal } from "@/components/global";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useAppTheme, useCommandPalette, useInstance, useTransient, useUserSettings } from "@/hooks/store";
import { usePlatformOS } from "@/hooks/use-platform-os";
// plane web components
import { PlaneVersionNumber, ProductUpdates, ProductUpdatesModal } from "@/plane-web/components/global";
import { PlaneVersionNumber } from "@/plane-web/components/global";
import { WorkspaceEditionBadge } from "@/plane-web/components/workspace";
import { ENABLE_LOCAL_DB_CACHE } from "@/plane-web/constants/issues";
@ -135,7 +137,15 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
<span className="text-xs">Keyboard shortcuts</span>
</button>
</CustomMenu.MenuItem>
<ProductUpdates setIsChangeLogOpen={setIsChangeLogOpen} />
<CustomMenu.MenuItem>
<button
type="button"
onClick={() => setIsChangeLogOpen(true)}
className="flex w-full items-center justify-start text-xs hover:bg-custom-background-80"
>
<span className="text-xs">What&apos;s new</span>
</button>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem>
<a
href="https://go.plane.so/p-discord"
@ -163,9 +173,8 @@ export const SidebarHelpSection: React.FC<WorkspaceHelpSectionProps> = observer(
<Tooltip tooltipContent={`${isCollapsed ? "Expand" : "Hide"}`} isMobile={isMobile}>
<button
type="button"
className={`grid place-items-center rounded-md p-1 text-custom-text-200 outline-none hover:bg-custom-background-90 hover:text-custom-text-100 ${
isCollapsed ? "w-full" : ""
}`}
className={`grid place-items-center rounded-md p-1 text-custom-text-200 outline-none hover:bg-custom-background-90 hover:text-custom-text-100 ${isCollapsed ? "w-full" : ""
}`}
onClick={() => toggleSidebar()}
>
<MoveLeft className={`h-4 w-4 duration-300 ${isCollapsed ? "rotate-180" : ""}`} />