From 46836fde2e89aada06a1a0bad293221585dcb988 Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Mon, 26 Jan 2026 22:15:03 -0500 Subject: [PATCH] Refactor Calendar component to adjust default meeting times and improve event item styling This commit updates the Calendar component by changing the default start time for meetings to 9:00 AM and the end time to 5:01 PM, ensuring better alignment with typical work hours. Additionally, the styling of calendar event items is refined by removing fixed width and height properties, allowing for more flexible rendering. These changes enhance the usability and visual presentation of the calendar feature, contributing to an improved user experience. --- .../Components/Features/Calendar/Index.razor | 2 +- WebApp/Models/CalendarMeetingItem.cs | 8 ++++---- WebApp/wwwroot/app.css | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/WebApp/Components/Features/Calendar/Index.razor b/WebApp/Components/Features/Calendar/Index.razor index f17aafb..490aa31 100644 --- a/WebApp/Components/Features/Calendar/Index.razor +++ b/WebApp/Components/Features/Calendar/Index.razor @@ -50,7 +50,7 @@ -
+
@context.Text
diff --git a/WebApp/Models/CalendarMeetingItem.cs b/WebApp/Models/CalendarMeetingItem.cs index 4bd5a30..c30d6f5 100644 --- a/WebApp/Models/CalendarMeetingItem.cs +++ b/WebApp/Models/CalendarMeetingItem.cs @@ -30,9 +30,9 @@ public class CalendarMeetingItem : CalendarItem MeetingHistoryData = meetingHistory; // Set base class properties that the calendar component uses Text = "Team Meeting"; - // Use meeting date at 3:00 PM as default time - Start = meetingHistory.MeetingDate.Date.AddHours(15); - // Default to 1 hour duration - End = Start.AddHours(1); + // Set start to 9:00 AM on the meeting date + Start = meetingHistory.MeetingDate.Date.AddHours(9); + // Set end to 5:00 PM on the meeting date (5:01 PM to ensure it displays until 5pm if end is exclusive) + End = meetingHistory.MeetingDate.Date.AddHours(17).AddMinutes(1); } } diff --git a/WebApp/wwwroot/app.css b/WebApp/wwwroot/app.css index 4ca3478..6185f5d 100644 --- a/WebApp/wwwroot/app.css +++ b/WebApp/wwwroot/app.css @@ -280,10 +280,20 @@ cursor: pointer; transition: background-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); - margin: 2px 0; - min-height: 24px; - display: flex; - align-items: center; + width: 100% !important; + height: 100% !important; + display: block !important; + box-sizing: border-box; + text-align: center; +} + +/* Ensure tooltip wrapper doesn't constrain width or height and adds spacing */ +.event-calendar .mud-tooltip-root { + width: 100%; + height: 100%; + display: block; + padding: 2px; + box-sizing: border-box; } .calendar-event-item:hover {