From c1f8766571294eef77085f9b57be380c4bacc263 Mon Sep 17 00:00:00 2001 From: gurusainath Date: Sat, 20 May 2023 23:10:04 +0530 Subject: [PATCH 1/5] styles: UI changes in the gantt blocks --- .../components/cycles/cycles-list-gantt-chart.tsx | 6 +++--- apps/app/components/cycles/gantt-chart.tsx | 6 +++--- apps/app/components/gantt-chart/blocks/index.tsx | 12 +++++------- apps/app/components/gantt-chart/chart/index.tsx | 2 +- apps/app/components/gantt-chart/views/month-view.ts | 2 +- apps/app/components/issues/gantt-chart.tsx | 6 +++--- apps/app/components/modules/gantt-chart.tsx | 6 +++--- .../components/modules/modules-list-gantt-chart.tsx | 6 +++--- apps/app/components/views/gantt-chart.tsx | 6 +++--- 9 files changed, 25 insertions(+), 27 deletions(-) diff --git a/apps/app/components/cycles/cycles-list-gantt-chart.tsx b/apps/app/components/cycles/cycles-list-gantt-chart.tsx index 2b783f4e2..ad298e79d 100644 --- a/apps/app/components/cycles/cycles-list-gantt-chart.tsx +++ b/apps/app/components/cycles/cycles-list-gantt-chart.tsx @@ -23,9 +23,9 @@ export const CyclesListGanttChartView: FC = ({ cycles }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: ICycle }) => ( -
-
-
+
+
+
{data?.name}
diff --git a/apps/app/components/cycles/gantt-chart.tsx b/apps/app/components/cycles/gantt-chart.tsx index d38ad727b..04de7afb7 100644 --- a/apps/app/components/cycles/gantt-chart.tsx +++ b/apps/app/components/cycles/gantt-chart.tsx @@ -32,12 +32,12 @@ export const CycleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
+
-
+
{data?.name}
diff --git a/apps/app/components/gantt-chart/blocks/index.tsx b/apps/app/components/gantt-chart/blocks/index.tsx index 24ee4d39e..113ca8964 100644 --- a/apps/app/components/gantt-chart/blocks/index.tsx +++ b/apps/app/components/gantt-chart/blocks/index.tsx @@ -21,14 +21,14 @@ export const GanttChartBlocks: FC<{ className="relative z-10 mt-[58px] h-full w-[4000px] divide-x divide-gray-300 overflow-hidden overflow-y-auto bg-[#999] bg-opacity-5" style={{ width: `${itemsContainerWidth}px` }} > -
+
{blocks && blocks.length > 0 && blocks.map((block: any, _idx: number) => ( <> {block.start_date && block.target_date && (
-
- {blockRender({ ...block?.data })} -
+ {blockRender({ ...block?.data })}
@@ -71,7 +69,7 @@ export const GanttChartBlocks: FC<{ {blocks && blocks.length > 0 && blocks.map((block: any, _idx: number) => ( -
+
{sidebarBlockRender(block?.data)}
))} diff --git a/apps/app/components/gantt-chart/chart/index.tsx b/apps/app/components/gantt-chart/chart/index.tsx index a1b80ef84..6724c3552 100644 --- a/apps/app/components/gantt-chart/chart/index.tsx +++ b/apps/app/components/gantt-chart/chart/index.tsx @@ -214,7 +214,7 @@ export const ChartViewRoot: FC = ({
{/* chart title */}
diff --git a/apps/app/components/gantt-chart/views/month-view.ts b/apps/app/components/gantt-chart/views/month-view.ts index df537ba5e..7211a45eb 100644 --- a/apps/app/components/gantt-chart/views/month-view.ts +++ b/apps/app/components/gantt-chart/views/month-view.ts @@ -184,7 +184,7 @@ export const getMonthChartItemPositionWidthInMonth = (chartData: ChartDataType, diffMonths -= startDate.getMonth(); diffMonths += itemStartDate.getMonth(); - scrollPosition = scrollPosition + diffMonths - 1; + scrollPosition = scrollPosition + diffMonths; // position code ends // width code starts diff --git a/apps/app/components/issues/gantt-chart.tsx b/apps/app/components/issues/gantt-chart.tsx index 5e79822c5..b35d4a749 100644 --- a/apps/app/components/issues/gantt-chart.tsx +++ b/apps/app/components/issues/gantt-chart.tsx @@ -32,12 +32,12 @@ export const IssueGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
+
-
+
{data?.name}
diff --git a/apps/app/components/modules/gantt-chart.tsx b/apps/app/components/modules/gantt-chart.tsx index edc24cfc9..0d11da2c0 100644 --- a/apps/app/components/modules/gantt-chart.tsx +++ b/apps/app/components/modules/gantt-chart.tsx @@ -32,12 +32,12 @@ export const ModuleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
+
-
+
{data?.name}
diff --git a/apps/app/components/modules/modules-list-gantt-chart.tsx b/apps/app/components/modules/modules-list-gantt-chart.tsx index c6fbf329f..edff17a95 100644 --- a/apps/app/components/modules/modules-list-gantt-chart.tsx +++ b/apps/app/components/modules/modules-list-gantt-chart.tsx @@ -27,12 +27,12 @@ export const ModulesListGanttChartView: FC = ({ modules }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: IModule }) => ( -
+
s.value === data.status)?.color }} /> -
+
{data?.name}
diff --git a/apps/app/components/views/gantt-chart.tsx b/apps/app/components/views/gantt-chart.tsx index dbe71fae0..461f46835 100644 --- a/apps/app/components/views/gantt-chart.tsx +++ b/apps/app/components/views/gantt-chart.tsx @@ -32,12 +32,12 @@ export const ViewIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
+
-
+
{data?.name}
From 83a0c8163f107334cffb4364b078dba73355cf06 Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Sun, 21 May 2023 18:37:26 +0530 Subject: [PATCH 2/5] dev: redirection implementation on gantt blocks (#1104) --- .../cycles/cycles-list-gantt-chart.tsx | 21 ++++++++++----- apps/app/components/cycles/gantt-chart.tsx | 24 +++++++++-------- .../components/gantt-chart/blocks/index.tsx | 4 +-- apps/app/components/issues/gantt-chart.tsx | 23 ++++++++-------- apps/app/components/modules/gantt-chart.tsx | 24 +++++++++-------- .../modules/modules-list-gantt-chart.tsx | 27 ++++++++++++------- apps/app/components/views/gantt-chart.tsx | 24 +++++++++-------- 7 files changed, 84 insertions(+), 63 deletions(-) diff --git a/apps/app/components/cycles/cycles-list-gantt-chart.tsx b/apps/app/components/cycles/cycles-list-gantt-chart.tsx index ad298e79d..9c8e922d2 100644 --- a/apps/app/components/cycles/cycles-list-gantt-chart.tsx +++ b/apps/app/components/cycles/cycles-list-gantt-chart.tsx @@ -1,5 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; +import { useRouter } from "next/router"; // components import { GanttChartRoot } from "components/gantt-chart"; // types @@ -10,6 +12,9 @@ type Props = { }; export const CyclesListGanttChartView: FC = ({ cycles }) => { + const router = useRouter(); + const { workspaceSlug, projectId } = router.query; + // rendering issues on gantt sidebar const GanttSidebarBlockView = ({ data }: any) => (
@@ -23,12 +28,14 @@ export const CyclesListGanttChartView: FC = ({ cycles }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: ICycle }) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/cycles/gantt-chart.tsx b/apps/app/components/cycles/gantt-chart.tsx index 04de7afb7..44abc392b 100644 --- a/apps/app/components/cycles/gantt-chart.tsx +++ b/apps/app/components/cycles/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const CycleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/gantt-chart/blocks/index.tsx b/apps/app/components/gantt-chart/blocks/index.tsx index 113ca8964..98284cce8 100644 --- a/apps/app/components/gantt-chart/blocks/index.tsx +++ b/apps/app/components/gantt-chart/blocks/index.tsx @@ -39,7 +39,7 @@ export const GanttChartBlocks: FC<{ >
- {block?.start_date ? datePreview(block?.start_date, true) : "-"} + {block?.start_date ? datePreview(block?.start_date) : "-"}
@@ -54,7 +54,7 @@ export const GanttChartBlocks: FC<{
- {block?.target_date ? datePreview(block?.target_date, true) : "-"} + {block?.target_date ? datePreview(block?.target_date) : "-"}
diff --git a/apps/app/components/issues/gantt-chart.tsx b/apps/app/components/issues/gantt-chart.tsx index b35d4a749..8fce3e96f 100644 --- a/apps/app/components/issues/gantt-chart.tsx +++ b/apps/app/components/issues/gantt-chart.tsx @@ -1,8 +1,7 @@ import { FC } from "react"; - +// next imports import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +31,17 @@ export const IssueGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/modules/gantt-chart.tsx b/apps/app/components/modules/gantt-chart.tsx index 0d11da2c0..fa92964c1 100644 --- a/apps/app/components/modules/gantt-chart.tsx +++ b/apps/app/components/modules/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const ModuleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/modules/modules-list-gantt-chart.tsx b/apps/app/components/modules/modules-list-gantt-chart.tsx index edff17a95..cb1c7bc07 100644 --- a/apps/app/components/modules/modules-list-gantt-chart.tsx +++ b/apps/app/components/modules/modules-list-gantt-chart.tsx @@ -1,5 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; +import { useRouter } from "next/router"; // components import { GanttChartRoot } from "components/gantt-chart"; // types @@ -12,6 +14,9 @@ type Props = { }; export const ModulesListGanttChartView: FC = ({ modules }) => { + const router = useRouter(); + const { workspaceSlug, projectId } = router.query; + // rendering issues on gantt sidebar const GanttSidebarBlockView = ({ data }: any) => (
@@ -27,15 +32,17 @@ export const ModulesListGanttChartView: FC = ({ modules }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: IModule }) => ( -
-
s.value === data.status)?.color }} - /> -
- {data?.name} -
-
+ + +
s.value === data.status)?.color }} + /> +
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/views/gantt-chart.tsx b/apps/app/components/views/gantt-chart.tsx index 461f46835..dc81f70fa 100644 --- a/apps/app/components/views/gantt-chart.tsx +++ b/apps/app/components/views/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const ViewIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date From a44cddb0fc7b1ae2672fa66722ce048b43445c1d Mon Sep 17 00:00:00 2001 From: guru_sainath Date: Sun, 21 May 2023 19:08:28 +0530 Subject: [PATCH 3/5] dev: dropdown overflow issue resolved in kanban (#1106) --- apps/app/components/core/board-view/single-board.tsx | 2 +- apps/app/components/issues/view-select/assignee.tsx | 2 ++ apps/app/components/ui/custom-search-select.tsx | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/app/components/core/board-view/single-board.tsx b/apps/app/components/core/board-view/single-board.tsx index a4f869cb3..16fe0e887 100644 --- a/apps/app/components/core/board-view/single-board.tsx +++ b/apps/app/components/core/board-view/single-board.tsx @@ -99,7 +99,7 @@ export const SingleBoard: React.FC = ({
)} -
+
{groupedByIssues?.[groupTitle].map((issue, index) => ( = ({ noChevron position={position} disabled={isNotAllowed} + selfPositioned={selfPositioned} + dropdownWidth="w-full min-w-[8rem]" /> ); }; diff --git a/apps/app/components/ui/custom-search-select.tsx b/apps/app/components/ui/custom-search-select.tsx index ef0943377..fb1c0a88c 100644 --- a/apps/app/components/ui/custom-search-select.tsx +++ b/apps/app/components/ui/custom-search-select.tsx @@ -29,6 +29,7 @@ type CustomSearchSelectProps = { selfPositioned?: boolean; multiple?: boolean; footerOption?: JSX.Element; + dropdownWidth?: string; }; export const CustomSearchSelect = ({ label, @@ -47,6 +48,7 @@ export const CustomSearchSelect = ({ selfPositioned = false, multiple = false, footerOption, + dropdownWidth, }: CustomSearchSelectProps) => { const [query, setQuery] = useState(""); @@ -108,7 +110,9 @@ export const CustomSearchSelect = ({ position === "right" ? "right-0" : "left-0" } ${ verticalPosition === "top" ? "bottom-full mb-1" : "mt-1" - } z-10 origin-top-right rounded-md bg-brand-surface-1 text-xs shadow-lg focus:outline-none`} + } z-10 origin-top-right rounded-md bg-brand-surface-1 text-xs shadow-lg focus:outline-none ${ + dropdownWidth ? dropdownWidth : `` + } `} >
From 4238f89cec6bc31cd8ddc1820ec9400da3d62f57 Mon Sep 17 00:00:00 2001 From: gurusainath Date: Sun, 21 May 2023 19:27:08 +0530 Subject: [PATCH 4/5] dev: gantt ui changes --- .../components/gantt-chart/blocks/index.tsx | 4 +-- .../components/gantt-chart/chart/index.tsx | 35 ++++++++++++++----- .../components/gantt-chart/chart/month.tsx | 2 +- apps/app/components/gantt-chart/root.tsx | 3 ++ apps/app/components/issues/gantt-chart.tsx | 5 +-- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/apps/app/components/gantt-chart/blocks/index.tsx b/apps/app/components/gantt-chart/blocks/index.tsx index 98284cce8..f2d44b294 100644 --- a/apps/app/components/gantt-chart/blocks/index.tsx +++ b/apps/app/components/gantt-chart/blocks/index.tsx @@ -18,7 +18,7 @@ export const GanttChartBlocks: FC<{ return (
@@ -44,7 +44,7 @@ export const GanttChartBlocks: FC<{
= ({ + border, title, blocks = null, loaderTitle, @@ -214,10 +216,12 @@ export const ChartViewRoot: FC = ({
{/* chart title */} -
+ {/*
{title && (
{title}
@@ -233,7 +237,7 @@ export const ChartViewRoot: FC = ({ {blocks.length} {loaderTitle}
)} -
+
*/} {/* chart header */}
@@ -248,10 +252,23 @@ export const ChartViewRoot: FC = ({ )}
*/} -
- {`${datePreview(currentViewData?.data?.startDate)} - ${datePreview( - currentViewData?.data?.endDate - )}`} + {title && ( +
+
{title}
+
+ Gantt View Beta +
+
+ )} + +
+ {blocks === null ? ( +
Loading...
+ ) : ( +
+ {blocks.length} {loaderTitle} +
+ )}
@@ -260,7 +277,7 @@ export const ChartViewRoot: FC = ({ allViews.map((_chatView: any, _idx: any) => (
handleChartView(_chatView?.key)} @@ -272,7 +289,7 @@ export const ChartViewRoot: FC = ({
Today diff --git a/apps/app/components/gantt-chart/chart/month.tsx b/apps/app/components/gantt-chart/chart/month.tsx index 15d02c488..197ac9930 100644 --- a/apps/app/components/gantt-chart/chart/month.tsx +++ b/apps/app/components/gantt-chart/chart/month.tsx @@ -37,7 +37,7 @@ export const MonthChartView: FC = () => {
diff --git a/apps/app/components/gantt-chart/root.tsx b/apps/app/components/gantt-chart/root.tsx index 787df0e46..eb7a1b225 100644 --- a/apps/app/components/gantt-chart/root.tsx +++ b/apps/app/components/gantt-chart/root.tsx @@ -5,6 +5,7 @@ import { ChartViewRoot } from "./chart"; import { ChartContextProvider } from "./contexts"; type GanttChartRootProps = { + border: boolean; title: null | string; loaderTitle: string; blocks: any; @@ -14,6 +15,7 @@ type GanttChartRootProps = { }; export const GanttChartRoot: FC = ({ + border = true, title = null, blocks, loaderTitle = "blocks", @@ -23,6 +25,7 @@ export const GanttChartRoot: FC = ({ }) => ( = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( - +
= ({}) => { : []; return ( -
+
Date: Sun, 21 May 2023 19:38:33 +0530 Subject: [PATCH 5/5] fix: gantt build issue resolved --- apps/app/components/gantt-chart/root.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/components/gantt-chart/root.tsx b/apps/app/components/gantt-chart/root.tsx index eb7a1b225..c52bc55b0 100644 --- a/apps/app/components/gantt-chart/root.tsx +++ b/apps/app/components/gantt-chart/root.tsx @@ -5,7 +5,7 @@ import { ChartViewRoot } from "./chart"; import { ChartContextProvider } from "./contexts"; type GanttChartRootProps = { - border: boolean; + border?: boolean; title: null | string; loaderTitle: string; blocks: any;