From 898cf98be36a8c8a6002381713245c1cb59f7915 Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Wed, 13 Mar 2024 16:59:12 +0530 Subject: [PATCH 1/7] [WEB-749] fix: rendering empty states with "showEmptyGroup" filter in issue grouping (#3954) * fix: Fixed show empty states in groupBy and subGroupBy in kanban * lint: lint issue resolved --- .../issues/issue-layouts/kanban/default.tsx | 49 ++++-- .../issue-layouts/kanban/kanban-group.tsx | 2 +- .../issues/issue-layouts/kanban/swimlanes.tsx | 161 ++++++++++++------ 3 files changed, 141 insertions(+), 71 deletions(-) diff --git a/web/components/issues/issue-layouts/kanban/default.tsx b/web/components/issues/issue-layouts/kanban/default.tsx index 3cbab589f..5bb46f143 100644 --- a/web/components/issues/issue-layouts/kanban/default.tsx +++ b/web/components/issues/issue-layouts/kanban/default.tsx @@ -58,6 +58,7 @@ export interface IGroupByKanBan { scrollableContainerRef?: MutableRefObject; isDragStarted?: boolean; showEmptyGroup?: boolean; + subGroupIssueHeaderCount?: (listId: string) => number; } const GroupByKanBan: React.FC = observer((props) => { @@ -83,6 +84,7 @@ const GroupByKanBan: React.FC = observer((props) => { scrollableContainerRef, isDragStarted, showEmptyGroup = true, + subGroupIssueHeaderCount, } = props; const member = useMember(); @@ -97,17 +99,27 @@ const GroupByKanBan: React.FC = observer((props) => { if (!list) return null; - const groupWithIssues = list.filter((_list) => (issueIds as TGroupedIssues)?.[_list.id]?.length > 0); - - const groupList = showEmptyGroup ? list : groupWithIssues; - - const visibilityGroupBy = (_list: IGroupByColumn) => { + const visibilityGroupBy = (_list: IGroupByColumn): { showGroup: boolean; showIssues: boolean } => { if (sub_group_by) { - if (kanbanFilters?.sub_group_by.includes(_list.id)) return true; - return false; + const groupVisibility = { + showGroup: true, + showIssues: true, + }; + if (!showEmptyGroup) { + groupVisibility.showGroup = subGroupIssueHeaderCount ? subGroupIssueHeaderCount(_list.id) > 0 : true; + } + return groupVisibility; } else { - if (kanbanFilters?.group_by.includes(_list.id)) return true; - return false; + const groupVisibility = { + showGroup: true, + showIssues: true, + }; + if (!showEmptyGroup) { + if ((issueIds as TGroupedIssues)?.[_list.id]?.length > 0) groupVisibility.showGroup = true; + else groupVisibility.showGroup = false; + } + if (kanbanFilters?.group_by.includes(_list.id)) groupVisibility.showIssues = false; + return groupVisibility; } }; @@ -115,13 +127,18 @@ const GroupByKanBan: React.FC = observer((props) => { return (
- {groupList && - groupList.length > 0 && - groupList.map((_list: IGroupByColumn) => { + {list && + list.length > 0 && + list.map((_list: IGroupByColumn) => { const groupByVisibilityToggle = visibilityGroupBy(_list); + if (groupByVisibilityToggle.showGroup === false) return <>; return ( -
+
{sub_group_by === null && (
= observer((props) => {
)} - {!groupByVisibilityToggle && ( + {groupByVisibilityToggle.showIssues && ( = observer((props) => { viewId={viewId} disableIssueCreation={disableIssueCreation} canEditProperties={canEditProperties} - groupByVisibilityToggle={groupByVisibilityToggle} scrollableContainerRef={scrollableContainerRef} isDragStarted={isDragStarted} /> @@ -197,6 +213,7 @@ export interface IKanBan { canEditProperties: (projectId: string | undefined) => boolean; scrollableContainerRef?: MutableRefObject; isDragStarted?: boolean; + subGroupIssueHeaderCount?: (listId: string) => number; } export const KanBan: React.FC = observer((props) => { @@ -221,6 +238,7 @@ export const KanBan: React.FC = observer((props) => { scrollableContainerRef, isDragStarted, showEmptyGroup, + subGroupIssueHeaderCount, } = props; const issueKanBanView = useKanbanView(); @@ -248,6 +266,7 @@ export const KanBan: React.FC = observer((props) => { scrollableContainerRef={scrollableContainerRef} isDragStarted={isDragStarted} showEmptyGroup={showEmptyGroup} + subGroupIssueHeaderCount={subGroupIssueHeaderCount} /> ); }); diff --git a/web/components/issues/issue-layouts/kanban/kanban-group.tsx b/web/components/issues/issue-layouts/kanban/kanban-group.tsx index a05fb1791..5a46324bd 100644 --- a/web/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/web/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -37,7 +37,7 @@ interface IKanbanGroup { viewId?: string; disableIssueCreation?: boolean; canEditProperties: (projectId: string | undefined) => boolean; - groupByVisibilityToggle: boolean; + groupByVisibilityToggle?: boolean; scrollableContainerRef?: MutableRefObject; isDragStarted?: boolean; } diff --git a/web/components/issues/issue-layouts/kanban/swimlanes.tsx b/web/components/issues/issue-layouts/kanban/swimlanes.tsx index d60e3b618..11f5304b9 100644 --- a/web/components/issues/issue-layouts/kanban/swimlanes.tsx +++ b/web/components/issues/issue-layouts/kanban/swimlanes.tsx @@ -29,6 +29,7 @@ interface ISubGroupSwimlaneHeader { list: IGroupByColumn[]; kanbanFilters: TIssueKanbanFilters; handleKanbanFilters: (toggle: "group_by" | "sub_group_by", value: string) => void; + showEmptyGroup: boolean; } const getSubGroupHeaderIssuesCount = (issueIds: TSubGroupedIssues, groupById: string) => { @@ -39,6 +40,22 @@ const getSubGroupHeaderIssuesCount = (issueIds: TSubGroupedIssues, groupById: st return headerCount; }; +const visibilitySubGroupByGroupCount = ( + issueIds: TSubGroupedIssues, + _list: IGroupByColumn, + showEmptyGroup: boolean +): boolean => { + let subGroupHeaderVisibility = true; + + if (showEmptyGroup) subGroupHeaderVisibility = true; + else { + if (getSubGroupHeaderIssuesCount(issueIds, _list.id) > 0) subGroupHeaderVisibility = true; + else subGroupHeaderVisibility = false; + } + + return subGroupHeaderVisibility; +}; + const SubGroupSwimlaneHeader: React.FC = ({ issueIds, sub_group_by, @@ -46,25 +63,36 @@ const SubGroupSwimlaneHeader: React.FC = ({ list, kanbanFilters, handleKanbanFilters, + showEmptyGroup, }) => (
{list && list.length > 0 && - list.map((_list: IGroupByColumn) => ( -
- -
- ))} + list.map((_list: IGroupByColumn) => { + const subGroupByVisibilityToggle = visibilitySubGroupByGroupCount( + issueIds as TSubGroupedIssues, + _list, + showEmptyGroup + ); + + if (subGroupByVisibilityToggle === false) return <>; + + return ( +
+ +
+ ); + })}
); @@ -124,52 +152,74 @@ const SubGroupSwimlane: React.FC = observer((props) => { return issueCount; }; + const visibilitySubGroupBy = (_list: IGroupByColumn): { showGroup: boolean; showIssues: boolean } => { + const subGroupVisibility = { + showGroup: true, + showIssues: true, + }; + if (showEmptyGroup) subGroupVisibility.showGroup = true; + else { + if (calculateIssueCount(_list.id) > 0) subGroupVisibility.showGroup = true; + else subGroupVisibility.showGroup = false; + } + if (kanbanFilters?.sub_group_by.includes(_list.id)) subGroupVisibility.showIssues = false; + return subGroupVisibility; + }; + return (
{list && list.length > 0 && - list.map((_list: any) => ( -
-
-
- -
-
-
+ list.map((_list: any) => { + const subGroupByVisibilityToggle = visibilitySubGroupBy(_list); + if (subGroupByVisibilityToggle.showGroup === false) return <>; - {!kanbanFilters?.sub_group_by.includes(_list.id) && ( -
- + return ( +
+
+
+ +
+
- )} -
- ))} + + {subGroupByVisibilityToggle.showIssues && ( +
+ + getSubGroupHeaderIssuesCount(issueIds as TSubGroupedIssues, groupByListId) + } + /> +
+ )} +
+ ); + })}
); }); @@ -261,6 +311,7 @@ export const KanBanSwimLanes: React.FC = observer((props) => { kanbanFilters={kanbanFilters} handleKanbanFilters={handleKanbanFilters} list={groupByList} + showEmptyGroup={showEmptyGroup} />
From 1363ef0b2dc50ec7cd3f508994ccdacd331f214d Mon Sep 17 00:00:00 2001 From: P B Date: Wed, 13 Mar 2024 17:13:11 +0530 Subject: [PATCH 2/7] Updated one-click deploy's readme for readability and presentation (#3962) Changed title, first paragraph, and bullets. --- deploy/1-click/README.md | 93 +++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index 88ea66c4c..fbaac930c 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -1,78 +1,73 @@ -# 1-Click Self-Hosting +# One-click deploy -In this guide, we will walk you through the process of setting up a 1-click self-hosted environment. Self-hosting allows you to have full control over your applications and data. It's a great way to ensure privacy, control, and customization. +Deployment methods for Plane have improved significantly to make self-managing super-easy. One of those is a single-line-command installation of Plane. -Let's get started! +This short guide will guide you through the process, the background tasks that run with the command for the Community, One, and Entprise editions, and the post-deployment configuration options available to you. -## Installing Plane +### Requirements -Installing Plane is a very easy and minimal step process. - -### Prerequisite - -- Operating System (latest): Debian / Ubuntu / Centos -- Supported CPU Architechture: AMD64 / ARM64 / x86_64 / aarch64 - -### Downloading Latest Stable Release +- Operating systems: Debian, Ubuntu, CentOS +- Supported CPU architechtures: AMD64, ARM64, x86_64, aarch64 +### Download the latest stable release +Run ↓ on any CLI. ``` curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/1-click/install.sh | sh - ``` -
- Downloading Preview Release +### Download the Preview release +`Preview` builds do not support ARM64/AARCH64 CPU architecture + +Run ↓ on any CLI. ``` export BRANCH=preview curl -fsSL https://raw.githubusercontent.com/makeplane/plane/preview/deploy/1-click/install.sh | sh - ``` - -NOTE: `Preview` builds do not support ARM64/AARCH64 CPU architecture -
- --- - - -Expect this after a successful install +--- +### Successful installation +You should see ↓ if there are no hitches. That output will also list the IP address you can use to access your Plane instance. ![Install Output](images/install.png) -Access the application on a browser via http://server-ip-address - --- +### Manage your Plane instance -### Get Control of your Plane Server Setup - -Plane App is available via the command `plane-app`. Running the command `plane-app --help` helps you to manage Plane +Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of all operators with `plane-app ---help`. ![Plane Help](images/help.png) -Basic Operations: -1. Start Server using `plane-app start` -1. Stop Server using `plane-app stop` -1. Restart Server using `plane-app restart` +1. Basic operators + 1. `plane-app start` starts the Plane server. + 2. `plane-app restart` restarts the Plane server. + 3. `plane-app stop` stops the Plane server. -Advanced Operations: -1. Configure Plane using `plane-app --configure`. This will give you options to modify - - NGINX Port (default 80) - - Domain Name (default is the local server public IP address) - - File Upload Size (default 5MB) - - External Postgres DB Url (optional - default empty) - - External Redis URL (optional - default empty) - - AWS S3 Bucket (optional - to be configured only in case the user wants to use an S3 Bucket) +2. Advanced operations + 1. `plane-app --configure` will show advanced configurators. + - Change your proxy or listening port +
Default: 80 + - Change your domain name +
Default: Deployed server's public IP address + - File upload size +
Default: 5MB + - Specify external database address when using an external database +
Default: `Empty` +
`Default folder: /opt/plane/data/postgres` + - Specify external Redis URL when using external Redis +
Default: `Empty` +
`Default folder: /opt/plane/data/redis` + - Configure AWS S3 bucket +
Use only when you or your users want to use S3 +
`Default folder: /opt/plane/data/minio` -1. Upgrade Plane using `plane-app --upgrade`. This will get the latest stable version of Plane files (docker-compose.yaml, .env, and docker images) +3. Version operators + 1. `plane-app --upgrade` gets the latest stable version of docker-compose.yaml, .env, and Docker images -1. Updating Plane App installer using `plane-app --update-installer` will update the `plane-app` utility. + 2. `plane-app --update-installer` updates the installer and the `plane-app` utility. -1. Uninstall Plane using `plane-app --uninstall`. This will uninstall the Plane application from the server and all docker containers but do not remove the data stored in Postgres, Redis, and Minio. - -1. Plane App can be reinstalled using `plane-app --install`. - -Application Data is stored in the mentioned folders: -1. DB Data: /opt/plane/data/postgres -1. Redis Data: /opt/plane/data/redis -1. Minio Data: /opt/plane/data/minio \ No newline at end of file + 3. `plane-app --uninstall` uninstalls the Plane application and all Docker containers from the server but leaves the data stored in + Postgres, Redis, and Minio alone. + 4. `plane-app --install` installs the Plane app again. From 552c66457a2408cb3295f8c92a012fb1b6a12fd3 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Mar 2024 17:17:40 +0530 Subject: [PATCH 3/7] chore: 1click docs update --- deploy/1-click/README.md | 62 +++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index fbaac930c..783f88371 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -10,30 +10,37 @@ This short guide will guide you through the process, the background tasks that r - Supported CPU architechtures: AMD64, ARM64, x86_64, aarch64 ### Download the latest stable release + Run ↓ on any CLI. + ``` curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/1-click/install.sh | sh - ``` - ### Download the Preview release + `Preview` builds do not support ARM64/AARCH64 CPU architecture Run ↓ on any CLI. + ``` export BRANCH=preview curl -fsSL https://raw.githubusercontent.com/makeplane/plane/preview/deploy/1-click/install.sh | sh - ``` + --- + ### Successful installation + You should see ↓ if there are no hitches. That output will also list the IP address you can use to access your Plane instance. ![Install Output](images/install.png) --- + ### Manage your Plane instance Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of all operators with `plane-app ---help`. @@ -41,33 +48,36 @@ Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of a ![Plane Help](images/help.png) 1. Basic operators - 1. `plane-app start` starts the Plane server. - 2. `plane-app restart` restarts the Plane server. - 3. `plane-app stop` stops the Plane server. -2. Advanced operations - 1. `plane-app --configure` will show advanced configurators. - - Change your proxy or listening port -
Default: 80 - - Change your domain name -
Default: Deployed server's public IP address - - File upload size -
Default: 5MB - - Specify external database address when using an external database -
Default: `Empty` -
`Default folder: /opt/plane/data/postgres` - - Specify external Redis URL when using external Redis -
Default: `Empty` -
`Default folder: /opt/plane/data/redis` - - Configure AWS S3 bucket -
Use only when you or your users want to use S3 -
`Default folder: /opt/plane/data/minio` + 1. `plane-app start` starts the Plane server. + 2. `plane-app restart` restarts the Plane server. + 3. `plane-app stop` stops the Plane server. + +2. Advanced operators + `plane-app --configure` will show advanced configurators. + + - Change your proxy or listening port +
Default: 80 + - Change your domain name +
Default: Deployed server's public IP address + - File upload size +
Default: 5MB + - Specify external database address when using an external database +
Default: `Empty` +
`Default folder: /opt/plane/data/postgres` + - Specify external Redis URL when using external Redis +
Default: `Empty` +
`Default folder: /opt/plane/data/redis` + - Configure AWS S3 bucket +
Use only when you or your users want to use S3 +
`Default folder: /opt/plane/data/minio` 3. Version operators - 1. `plane-app --upgrade` gets the latest stable version of docker-compose.yaml, .env, and Docker images - 2. `plane-app --update-installer` updates the installer and the `plane-app` utility. + 1. `plane-app --upgrade` gets the latest stable version of docker-compose.yaml, .env, and Docker images - 3. `plane-app --uninstall` uninstalls the Plane application and all Docker containers from the server but leaves the data stored in - Postgres, Redis, and Minio alone. - 4. `plane-app --install` installs the Plane app again. + 2. `plane-app --update-installer` updates the installer and the `plane-app` utility. + + 3. `plane-app --uninstall` uninstalls the Plane application and all Docker containers from the server but leaves the data stored in + Postgres, Redis, and Minio alone. + 4. `plane-app --install` installs the Plane app again. From 884856b02103011c8c374887231174e1dbc0ae84 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Mar 2024 17:18:11 +0530 Subject: [PATCH 4/7] chore: 1click docs update --- deploy/1-click/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index 783f88371..e586d700c 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -54,6 +54,7 @@ Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of a 3. `plane-app stop` stops the Plane server. 2. Advanced operators + `plane-app --configure` will show advanced configurators. - Change your proxy or listening port From 4ccb505f368eaa15a5c0fa54c7bc03368b0d4c39 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Mar 2024 17:24:37 +0530 Subject: [PATCH 5/7] chore: 1click docs changes --- deploy/1-click/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index e586d700c..e114b19f3 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -2,12 +2,12 @@ Deployment methods for Plane have improved significantly to make self-managing super-easy. One of those is a single-line-command installation of Plane. -This short guide will guide you through the process, the background tasks that run with the command for the Community, One, and Entprise editions, and the post-deployment configuration options available to you. +This short guide will guide you through the process, the background tasks that run with the command for the Community, One, and Enterprise editions, and the post-deployment configuration options available to you. ### Requirements - Operating systems: Debian, Ubuntu, CentOS -- Supported CPU architechtures: AMD64, ARM64, x86_64, aarch64 +- Supported CPU architectures: AMD64, ARM64, x86_64, AArch64 ### Download the latest stable release @@ -20,7 +20,7 @@ curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/1-cli ### Download the Preview release -`Preview` builds do not support ARM64/AARCH64 CPU architecture +`Preview` builds do not support ARM64, AArch64 CPU architectures Run ↓ on any CLI. @@ -75,7 +75,7 @@ Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of a 3. Version operators - 1. `plane-app --upgrade` gets the latest stable version of docker-compose.yaml, .env, and Docker images + 1. `plane-app --upgrade` gets the latest stable version of `docker-compose.yaml`, `.env`, and Docker images 2. `plane-app --update-installer` updates the installer and the `plane-app` utility. From 8d9adf4d87c736d60eeef97a312a9150de101256 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Mar 2024 17:26:04 +0530 Subject: [PATCH 6/7] chore: 1click docs readme update --- deploy/1-click/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index e114b19f3..17d9eefee 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -76,9 +76,7 @@ Use `plane-app` [OPERATOR] to manage your Plane instance easily. Get a list of a 3. Version operators 1. `plane-app --upgrade` gets the latest stable version of `docker-compose.yaml`, `.env`, and Docker images - 2. `plane-app --update-installer` updates the installer and the `plane-app` utility. - 3. `plane-app --uninstall` uninstalls the Plane application and all Docker containers from the server but leaves the data stored in Postgres, Redis, and Minio alone. 4. `plane-app --install` installs the Plane app again. From 9c13dbd95796a724e098911a0b24b7d2be73309d Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Mar 2024 17:26:52 +0530 Subject: [PATCH 7/7] chore: 1click docs readme update --- deploy/1-click/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/deploy/1-click/README.md b/deploy/1-click/README.md index 17d9eefee..9ed2323de 100644 --- a/deploy/1-click/README.md +++ b/deploy/1-click/README.md @@ -15,7 +15,6 @@ Run ↓ on any CLI. ``` curl -fsSL https://raw.githubusercontent.com/makeplane/plane/master/deploy/1-click/install.sh | sh - - ``` ### Download the Preview release @@ -26,9 +25,7 @@ Run ↓ on any CLI. ``` export BRANCH=preview - curl -fsSL https://raw.githubusercontent.com/makeplane/plane/preview/deploy/1-click/install.sh | sh - - ``` ---