From 9d97b7468462a13f17c5d1a0f02b1838e6eec601 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 2 Apr 2026 14:56:04 +0200 Subject: [PATCH] fix: adjust max width of calendar invitation banner for better layout --- .../email/calendar-invitation-banner.tsx | 113 +++++++++--------- components/email/email-viewer.tsx | 2 +- 2 files changed, 58 insertions(+), 57 deletions(-) diff --git a/components/email/calendar-invitation-banner.tsx b/components/email/calendar-invitation-banner.tsx index dd398658..33daf087 100644 --- a/components/email/calendar-invitation-banner.tsx +++ b/components/email/calendar-invitation-banner.tsx @@ -754,49 +754,67 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp {/* Content */}
- {/* Event title */} - {summary?.title && ( -
-

- {summary.title} -

- {parsedEvent?.sequence != null && parsedEvent.sequence > 0 && ( - - {t('event_updated', { sequence: parsedEvent.sequence })} - +
+ {/* Left: Event info */} +
+ {/* Event title */} + {summary?.title && ( +
+

+ {summary.title} +

+ {parsedEvent?.sequence != null && parsedEvent.sequence > 0 && ( + + {t('event_updated', { sequence: parsedEvent.sequence })} + + )} +
)} -
- )} - {/* Event details */} -
- {summary?.start && ( -
- - - {formatDateTime(summary.start)} - {summary.end && ` – ${formatDateTime(summary.end)}`} - + {/* Event details */} +
+ {summary?.start && ( +
+ + + {formatDateTime(summary.start)} + {summary.end && ` – ${formatDateTime(summary.end)}`} + +
+ )} + {summary?.location && ( +
+ + {summary.location} +
+ )} + {summary?.organizer && ( + + + {t('organizer', { name: summary.organizer })} + + )} + {summary && summary.attendeeCount > 0 && ( + {t('attendees', { count: summary.attendeeCount })} + )}
- )} - {summary?.location && ( -
- - {summary.location} -
- )} -
- {summary?.organizer && ( - - - {t('organizer', { name: summary.organizer })} - +
+ + {/* Right: Info & actor messages on large screens */} +
+ {bannerInfo && ( +

{bannerInfo}

)} - {summary && summary.attendeeCount > 0 && ( - {t('attendees', { count: summary.attendeeCount })} + {actorMessage && ( +

{actorMessage}

+ )} + {actorSummary?.participationComment && ( +

+ {t('actor_note', { comment: actorSummary.participationComment })} +

)}
@@ -840,23 +858,6 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp
)} - {/* Info text */} - {bannerInfo && ( -

{bannerInfo}

- )} - - {/* Actor message */} - {actorMessage && ( -

{actorMessage}

- )} - - {/* Actor comment */} - {actorSummary?.participationComment && ( -

- {t('actor_note', { comment: actorSummary.participationComment })} -

- )} - {/* Proposed changes */} {proposedChanges.length > 0 && (
diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index 5af5cca9..4e72a70f 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -4507,7 +4507,7 @@ export function EmailViewer({ {((hasBlockedContent && !allowExternalContent && externalContentPolicy !== 'allow') || hasCalendarInvitation) && (
-
+
{/* External Content Controls */} {hasBlockedContent && !allowExternalContent && externalContentPolicy !== 'allow' && (