Skip to content

Commit 78f4a72

Browse files
authored
[WEB-5676] style: gantt column outline #8374
1 parent ad2291d commit 78f4a72

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

apps/web/core/components/gantt-chart/chart/views/month.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const MonthChartView = observer(function MonthChartView(_props: any) {
6262
<div className="h-5 w-full flex">
6363
{weeks?.map((weekBlock) => (
6464
<div
65-
key={`sub-title-${weekBlock.startDate}-${weekBlock.endDate}`}
65+
key={`sub-title-${weekBlock.startDate.toString()}-${weekBlock.endDate.toString()}`}
6666
className={cn(
6767
"flex flex-shrink-0 py-1 px-2 text-center capitalize justify-between outline-[0.25px] outline-subtle-1",
6868
{
@@ -89,7 +89,7 @@ export const MonthChartView = observer(function MonthChartView(_props: any) {
8989
<div className="h-full w-full flex-grow flex">
9090
{weeks?.map((weekBlock) => (
9191
<div
92-
key={`column-${weekBlock.startDate}-${weekBlock.endDate}`}
92+
key={`column-${weekBlock.startDate.toString()}-${weekBlock.endDate.toString()}`}
9393
className={cn("h-full overflow-hidden outline-[0.25px] outline-subtle", {
9494
"bg-accent-primary/20": weekBlock.today,
9595
})}

apps/web/core/components/gantt-chart/chart/views/quarter.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { FC } from "react";
21
import { observer } from "mobx-react";
32
// plane utils
43
import { cn } from "@plane/utils";
@@ -21,11 +20,11 @@ export const QuarterChartView = observer(function QuarterChartView(_props: any)
2120
quarterBlocks?.map((quarterBlock, rootIndex) => (
2221
<div
2322
key={`month-${quarterBlock.quarterNumber}-${quarterBlock.year}`}
24-
className="relative flex flex-col outline-[0.25px] outline outline-subtle-1"
23+
className="relative flex flex-col outline-[0.25px] outline-subtle-1"
2524
>
2625
{/** Header Div */}
2726
<div
28-
className="w-full sticky top-0 z-[5] bg-surface-1 flex-shrink-0 outline-[1px] outline outline-subtle-1"
27+
className="w-full sticky top-0 z-[5] bg-surface-1 flex-shrink-0 outline-[1px] outline-subtle-1"
2928
style={{
3029
height: `${HEADER_HEIGHT}px`,
3130
}}
@@ -55,7 +54,7 @@ export const QuarterChartView = observer(function QuarterChartView(_props: any)
5554
<div
5655
key={`sub-title-${rootIndex}-${index}`}
5756
className={cn(
58-
"flex flex-shrink-0 text-center capitalize justify-center outline-[0.25px] outline outline-subtle-1",
57+
"flex flex-shrink-0 text-center capitalize justify-center outline-[0.25px] outline-subtle-1",
5958
{
6059
"bg-accent-primary/20": monthBlock.today,
6160
}
@@ -80,7 +79,7 @@ export const QuarterChartView = observer(function QuarterChartView(_props: any)
8079
{quarterBlock?.children?.map((monthBlock, index) => (
8180
<div
8281
key={`column-${rootIndex}-${index}`}
83-
className={cn("h-full overflow-hidden outline-[0.25px] outline outline-subtle", {
82+
className={cn("h-full overflow-hidden outline-[0.25px] outline-subtle", {
8483
"bg-accent-primary/20": monthBlock.today,
8584
})}
8685
style={{ width: `${currentViewData?.data.dayWidth * monthBlock.days}px` }}

apps/web/core/components/gantt-chart/chart/views/week.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { FC } from "react";
21
import { observer } from "mobx-react";
32
// plane utils
43
import { cn } from "@plane/utils";
@@ -17,7 +16,7 @@ export const WeekChartView = observer(function WeekChartView(_props: any) {
1716
{currentViewData &&
1817
weekBlocks?.map((block, rootIndex) => (
1918
<div
20-
key={`month-${block?.startDate}-${block?.endDate}`}
19+
key={`month-${block?.startDate.toString()}-${block?.endDate.toString()}`}
2120
className="relative flex flex-col outline-[0.25px] outline-subtle-1"
2221
>
2322
{/** Header Div */}
@@ -47,7 +46,7 @@ export const WeekChartView = observer(function WeekChartView(_props: any) {
4746
<div
4847
key={`sub-title-${rootIndex}-${index}`}
4948
className={cn(
50-
"flex flex-shrink-0 p-1 text-center capitalize justify-between outline-[0.25px] outline outline-subtle-1",
49+
"flex flex-shrink-0 p-1 text-center capitalize justify-between outline-[0.25px] outline-subtle-1",
5150
{
5251
"bg-accent-primary/20": weekDay.today,
5352
}
@@ -73,13 +72,13 @@ export const WeekChartView = observer(function WeekChartView(_props: any) {
7372
{block?.children?.map((weekDay, index) => (
7473
<div
7574
key={`column-${rootIndex}-${index}`}
76-
className={cn("h-full overflow-hidden outline-[0.25px] outline outline-subtle", {
75+
className={cn("h-full overflow-hidden outline-[0.25px] outline-subtle", {
7776
"bg-accent-primary/20": weekDay.today,
7877
})}
7978
style={{ width: `${currentViewData?.data.dayWidth}px` }}
8079
>
8180
{["sat", "sun"].includes(weekDay?.dayData?.shortTitle) && (
82-
<div className="h-full bg-surface-2 outline-[0.25px] outline outline-strong" />
81+
<div className="h-full bg-surface-2 outline-[0.25px] outline-strong" />
8382
)}
8483
</div>
8584
))}

0 commit comments

Comments
 (0)