Skip to content

Commit 7bdca9c

Browse files
authored
show current version in the help section dropdown (#2353)
1 parent 05920a7 commit 7bdca9c

File tree

8 files changed

+52
-45
lines changed

8 files changed

+52
-45
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"repository": "https://github.com/makeplane/plane.git",
3+
"version": "0.13.2",
34
"license": "AGPL-3.0",
45
"private": true,
56
"workspaces": [

packages/eslint-config-custom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-custom",
3-
"version": "0.0.0",
3+
"version": "0.13.2",
44
"main": "index.js",
55
"license": "MIT",
66
"dependencies": {

packages/tailwind-config-custom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tailwind-config-custom",
3-
"version": "0.0.1",
3+
"version": "0.13.2",
44
"description": "common tailwind configuration across monorepo",
55
"main": "index.js",
66
"devDependencies": {

packages/tsconfig/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tsconfig",
3-
"version": "0.0.0",
3+
"version": "0.13.2",
44
"private": true,
55
"files": [
66
"base.json",

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui",
3-
"version": "0.0.0",
3+
"version": "0.13.2",
44
"main": "./index.tsx",
55
"types": "./index.tsx",
66
"license": "MIT",

space/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "space",
3-
"version": "0.0.1",
3+
"version": "0.13.2",
44
"private": true,
55
"scripts": {
66
"dev": "next dev -p 4000",

web/components/workspace/help-section.tsx

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
import React, { useRef, useState } from "react";
2-
32
import Link from "next/link";
4-
5-
// headless ui
63
import { Transition } from "@headlessui/react";
4+
5+
// mobx store
6+
import { useMobxStore } from "lib/mobx/store-provider";
77
// hooks
8-
import useTheme from "hooks/use-theme";
98
import useOutsideClickDetector from "hooks/use-outside-click-detector";
109
// icons
1110
import { Bolt, HelpOutlineOutlined, WestOutlined } from "@mui/icons-material";
12-
import { ChatBubbleOvalLeftEllipsisIcon } from "@heroicons/react/24/outline";
13-
import { DocumentIcon, DiscordIcon, GithubIcon } from "components/icons";
14-
// mobx store
15-
import { useMobxStore } from "lib/mobx/store-provider";
11+
import { DiscordIcon } from "components/icons";
12+
import { FileText, Github, MessagesSquare } from "lucide-react";
13+
// assets
14+
import packageJson from "package.json";
1615

1716
const helpOptions = [
1817
{
1918
name: "Documentation",
2019
href: "https://docs.plane.so/",
21-
Icon: DocumentIcon,
20+
Icon: FileText,
2221
},
2322
{
2423
name: "Join our Discord",
@@ -28,13 +27,13 @@ const helpOptions = [
2827
{
2928
name: "Report a bug",
3029
href: "https://github.com/makeplane/plane/issues/new/choose",
31-
Icon: GithubIcon,
30+
Icon: Github,
3231
},
3332
{
3433
name: "Chat with us",
3534
href: null,
3635
onClick: () => (window as any).$crisp.push(["do", "chat:show"]),
37-
Icon: ChatBubbleOvalLeftEllipsisIcon,
36+
Icon: MessagesSquare,
3837
},
3938
];
4039

@@ -123,37 +122,44 @@ export const WorkspaceHelpSection: React.FC<WorkspaceHelpSectionProps> = ({ setS
123122
leaveTo="transform opacity-0 scale-95"
124123
>
125124
<div
126-
className={`absolute bottom-2 ${
127-
store?.theme?.sidebarCollapsed ? "left-full" : "left-[-75px]"
128-
} space-y-2 rounded-sm bg-custom-background-80 p-1 shadow-md`}
125+
className={`absolute bottom-2 min-w-[10rem] ${
126+
store?.theme?.sidebarCollapsed ? "left-full" : "-left-[75px]"
127+
} rounded bg-custom-background-100 p-1 shadow-custom-shadow-xs whitespace-nowrap divide-y divide-custom-border-200`}
129128
ref={helpOptionsRef}
130129
>
131-
{helpOptions.map(({ name, Icon, href, onClick }) => {
132-
if (href)
133-
return (
134-
<Link href={href} key={name}>
135-
<a
136-
target="_blank"
137-
className="flex items-center gap-x-2 whitespace-nowrap rounded-md px-2 py-1 text-xs hover:bg-custom-background-90"
130+
<div className="space-y-1 pb-2">
131+
{helpOptions.map(({ name, Icon, href, onClick }) => {
132+
if (href)
133+
return (
134+
<Link href={href} key={name}>
135+
<a
136+
target="_blank"
137+
className="flex items-center gap-x-2 rounded px-2 py-1 text-xs hover:bg-custom-background-80"
138+
>
139+
<div className="grid place-items-center flex-shrink-0">
140+
<Icon className="text-custom-text-200 h-3.5 w-3.5" size={14} />
141+
</div>
142+
<span className="text-xs">{name}</span>
143+
</a>
144+
</Link>
145+
);
146+
else
147+
return (
148+
<button
149+
key={name}
150+
type="button"
151+
onClick={onClick ?? undefined}
152+
className="flex w-full items-center gap-x-2 rounded px-2 py-1 text-xs hover:bg-custom-background-80"
138153
>
139-
<Icon className="h-4 w-4 text-custom-text-200" />
140-
<span className="text-sm">{name}</span>
141-
</a>
142-
</Link>
143-
);
144-
else
145-
return (
146-
<button
147-
key={name}
148-
type="button"
149-
onClick={onClick ? onClick : undefined}
150-
className="flex w-full items-center gap-x-2 whitespace-nowrap rounded-md px-2 py-1 text-xs hover:bg-custom-background-90"
151-
>
152-
<Icon className="h-4 w-4 text-custom-sidebar-text-200" />
153-
<span className="text-sm">{name}</span>
154-
</button>
155-
);
156-
})}
154+
<div className="grid place-items-center flex-shrink-0">
155+
<Icon className="text-custom-text-200 h-3.5 w-3.5" size={14} />
156+
</div>
157+
<span className="text-xs">{name}</span>
158+
</button>
159+
);
160+
})}
161+
</div>
162+
<div className="px-2 pt-2 pb-1 text-[10px]">Version: v{packageJson.version}</div>
157163
</div>
158164
</Transition>
159165
</div>

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web",
3-
"version": "0.1.0",
3+
"version": "0.13.2",
44
"private": true,
55
"scripts": {
66
"dev": "next dev --port 3000",

0 commit comments

Comments
 (0)