From 6bf9d84bea17b97921ba8b3309f6ee8eff4f0ae4 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:03:58 +0530 Subject: [PATCH] chore : calendar layout improvement (#3705) * chore: current date indicator added in calendar layout * style: calendar layout ui improvement --- .../issues/issue-layouts/calendar/calendar.tsx | 2 +- .../issues/issue-layouts/calendar/day-tile.tsx | 15 ++++++++++++--- .../issues/issue-layouts/calendar/week-days.tsx | 2 +- .../issues/issue-layouts/calendar/week-header.tsx | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/web/components/issues/issue-layouts/calendar/calendar.tsx b/web/components/issues/issue-layouts/calendar/calendar.tsx index c48f23068..733b3a097 100644 --- a/web/components/issues/issue-layouts/calendar/calendar.tsx +++ b/web/components/issues/issue-layouts/calendar/calendar.tsx @@ -76,7 +76,7 @@ export const CalendarChart: React.FC = observer((props) => {
{layout === "month" && ( -
+
{allWeeksOfActiveMonth && Object.values(allWeeksOfActiveMonth).map((week: ICalendarWeek, weekIndex) => ( = observer((props) => { const issueIdList = groupedIssueIds ? groupedIssueIds[formattedDatePayload] : null; const totalIssues = issueIdList?.length ?? 0; + + const isToday = date.date.toDateString() === new Date().toDateString(); + return ( <>
{/* header */}
= observer((props) => { date.date.getDay() === 0 || date.date.getDay() === 6 ? "bg-custom-background-90" : "bg-custom-background-100" - }`} + } `} > {date.date.getDate() === 1 && MONTHS_LIST[date.date.getMonth() + 1].shortTitle + " "} - {date.date.getDate()} + {isToday ? ( + + {date.date.getDate()} + + ) : ( + <>{date.date.getDate()} + )}
{/* content */} diff --git a/web/components/issues/issue-layouts/calendar/week-days.tsx b/web/components/issues/issue-layouts/calendar/week-days.tsx index 5a640a566..f65b69491 100644 --- a/web/components/issues/issue-layouts/calendar/week-days.tsx +++ b/web/components/issues/issue-layouts/calendar/week-days.tsx @@ -50,7 +50,7 @@ export const CalendarWeekDays: React.FC = observer((props) => { return (
diff --git a/web/components/issues/issue-layouts/calendar/week-header.tsx b/web/components/issues/issue-layouts/calendar/week-header.tsx index 5e7b0fcb7..ca6b05568 100644 --- a/web/components/issues/issue-layouts/calendar/week-header.tsx +++ b/web/components/issues/issue-layouts/calendar/week-header.tsx @@ -13,7 +13,7 @@ export const CalendarWeekHeader: React.FC = observer((props) => { return (
@@ -24,7 +24,7 @@ export const CalendarWeekHeader: React.FC = observer((props) => { if (!showWeekends && (day.shortTitle === "Sat" || day.shortTitle === "Sun")) return null; return ( -
+
{day.shortTitle}
);