From fe19755d4747d1542e6ee08c6e6554ef6eae2b7f Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 28 Oct 2026 04:50:07 +0100 Subject: [PATCH] fix: show the full text of cut-off calendar, event and participant names on hover --- components/calendar/__tests__/calendar-app.test.tsx | 9 +++++++++ components/calendar/calendar-agenda-view.tsx | 4 ++-- components/calendar/calendar-day-view.tsx | 2 +- components/calendar/calendar-sidebar-panel.tsx | 6 +++--- components/calendar/calendar-toolbar.tsx | 8 ++++---- components/calendar/event-detail-popover.tsx | 4 ++-- components/calendar/event-modal.tsx | 8 ++++---- components/calendar/ical-import-modal.tsx | 2 +- components/calendar/participant-availability.tsx | 2 +- components/calendar/participant-input.tsx | 7 ++++--- components/calendar/task-list-view.tsx | 2 +- 11 files changed, 32 insertions(+), 22 deletions(-) diff --git a/components/calendar/__tests__/calendar-app.test.tsx b/components/calendar/__tests__/calendar-app.test.tsx index bb1fce2ce..b3cf8dfeb 100644 --- a/components/calendar/__tests__/calendar-app.test.tsx +++ b/components/calendar/__tests__/calendar-app.test.tsx @@ -591,3 +591,12 @@ describe('CalendarApp view menu', () => { expect(useCalendarStore.getState().viewMode).toBe('day'); }); }); + +describe('CalendarApp long names', () => { + it('shows the full name of a cut-off calendar on hover', () => { + const long = { ...calendars[0], name: 'Stalwart Calendar (usera@internal.bulwarkmail.org)' }; + useCalendarStore.setState({ calendars: [long] } as never); + renderApp(); + expect(screen.getByTestId('calendar-item').querySelector('[title]')).toHaveAttribute('title', long.name); + }); +}); diff --git a/components/calendar/calendar-agenda-view.tsx b/components/calendar/calendar-agenda-view.tsx index b24857449..19cbb7383 100644 --- a/components/calendar/calendar-agenda-view.tsx +++ b/components/calendar/calendar-agenda-view.tsx @@ -264,13 +264,13 @@ export function CalendarAgendaView({ />
-
+
{ev.title || t("events.no_title")}
{(meta || getParticipantCount(ev) > 0) && (
{locationName && } - {meta && {meta}} + {meta && {meta}} {getParticipantCount(ev) > 0 && ( diff --git a/components/calendar/calendar-day-view.tsx b/components/calendar/calendar-day-view.tsx index bfbea0869..bc10e3983 100644 --- a/components/calendar/calendar-day-view.tsx +++ b/components/calendar/calendar-day-view.tsx @@ -415,7 +415,7 @@ export function CalendarDayView({ > {isCompleted && } - + {task.title || t("tasks.no_title")}
diff --git a/components/calendar/calendar-sidebar-panel.tsx b/components/calendar/calendar-sidebar-panel.tsx index b837980c2..a9f99e201 100644 --- a/components/calendar/calendar-sidebar-panel.tsx +++ b/components/calendar/calendar-sidebar-panel.tsx @@ -315,7 +315,7 @@ export function CalendarSidebarPanel({ > {isVisible && } - + {cal.name} {isSubscriptionCalendar(cal.id) && ( @@ -483,7 +483,7 @@ export function CalendarSidebarPanel({ ) : ( )} - {label} + {label} {onAdd && ( )} - + {group.label} {isActive && onCreateCalendar && ( diff --git a/components/calendar/calendar-toolbar.tsx b/components/calendar/calendar-toolbar.tsx index 543c938e9..aab0d46c1 100644 --- a/components/calendar/calendar-toolbar.tsx +++ b/components/calendar/calendar-toolbar.tsx @@ -212,7 +212,7 @@ export function CalendarToolbar({ )} - + {getDateLabel()} {hasDateNav && ( @@ -284,7 +284,7 @@ export function CalendarToolbar({ )} style={isVisible ? { backgroundColor: color, borderColor: color } : undefined} /> - + {cal.name} @@ -324,7 +324,7 @@ export function CalendarToolbar({ )} style={isVisible ? { backgroundColor: color, borderColor: color } : undefined} /> - + {cal.name} @@ -406,7 +406,7 @@ export function CalendarToolbar({ )} -

+

{getDateLabel()}

diff --git a/components/calendar/event-detail-popover.tsx b/components/calendar/event-detail-popover.tsx index cec55f9c6..e2dcce031 100644 --- a/components/calendar/event-detail-popover.tsx +++ b/components/calendar/event-detail-popover.tsx @@ -541,7 +541,7 @@ export function EventDetailPopover({
{participants.slice(0, 5).map((p) => (
- + {p.name || p.email} {p.isOrganizer && ( @@ -582,7 +582,7 @@ export function EventDetailPopover({ {calendar && (
- {calendar.name} + {calendar.name}
)} diff --git a/components/calendar/event-modal.tsx b/components/calendar/event-modal.tsx index 5ce9119a3..fadf52a38 100644 --- a/components/calendar/event-modal.tsx +++ b/components/calendar/event-modal.tsx @@ -967,7 +967,7 @@ export function EventModal({ return (
-

{event.title || t("events.no_title")}

+

{event.title || t("events.no_title")}

{onMore && ( onMore(e.currentTarget)}> @@ -1048,7 +1048,7 @@ export function EventModal({
{participants.map(p => (
- + {p.name || p.email} {p.isOrganizer && ( ({t("participants.organizer").toLowerCase()}) @@ -1095,7 +1095,7 @@ export function EventModal({
-

{event.title || t("events.no_title")}

+

{event.title || t("events.no_title")}

{eventCalendar && (

{eventCalendar.name}

@@ -1205,7 +1205,7 @@ export function EventModal({
{viewParticipants.map((p) => (
- + {p.name || p.email} {p.isOrganizer && ( ({t("participants.organizer").toLowerCase()}) diff --git a/components/calendar/ical-import-modal.tsx b/components/calendar/ical-import-modal.tsx index 8389278ca..29967fc5f 100644 --- a/components/calendar/ical-import-modal.tsx +++ b/components/calendar/ical-import-modal.tsx @@ -380,7 +380,7 @@ export function ICalImportModal({ calendars, client, onClose, initialUrl }: ICal className="mt-0.5 rounded border-input" />
-

+

{event.title || tCal("events.no_title")}

diff --git a/components/calendar/participant-availability.tsx b/components/calendar/participant-availability.tsx index fa1def251..afde5753c 100644 --- a/components/calendar/participant-availability.tsx +++ b/components/calendar/participant-availability.tsx @@ -188,7 +188,7 @@ export function ParticipantAvailability({ attendees, start, end }: ParticipantAv )} aria-hidden="true" /> - {a.name || a.email} + {a.name || a.email} {status === "checking" && } {t(status)} diff --git a/components/calendar/participant-input.tsx b/components/calendar/participant-input.tsx index f615863ae..f4eabc21d 100644 --- a/components/calendar/participant-input.tsx +++ b/components/calendar/participant-input.tsx @@ -182,9 +182,9 @@ export const ParticipantInput = forwardRef
-
{s.name || s.email}
+
{s.name || s.email}
{s.name && ( -
{s.email}
+
{s.email}
)}
@@ -211,11 +211,12 @@ export const ParticipantInput = forwardRef {p.name || p.email} ) : ( - {p.name || p.email} + {p.name || p.email} )} {!disabled && (