Skip to content

feat(calendar): show Google logo for events synced from Google Calendar #2658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/web/public/media/google-calendar-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/ui/src/components/ui/legacy/calendar/AllDayEventBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@
)}
onClick={() => openModal(event.id, 'all-day')}
>
{typeof event.google_event_id === 'string' &&
event.google_event_id.trim() !== '' && (
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="mr-1 inline-block h-[1.25em] w-[1.25em] align-middle opacity-80 dark:opacity-90"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>

Check warning on line 106 in packages/ui/src/components/ui/legacy/calendar/AllDayEventBar.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/AllDayEventBar.tsx#L98-L106

Added lines #L98 - L106 were not covered by tests
)}
{event.title}
</div>
);
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/src/components/ui/legacy/calendar/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,16 @@
aria-label="Event locked"
/>
)}
{typeof localEvent.google_event_id === 'string' &&
localEvent.google_event_id.trim() !== '' && (
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="mr-1 inline-block h-4 w-4 align-text-bottom"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>

Check warning on line 1025 in packages/ui/src/components/ui/legacy/calendar/EventCard.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/EventCard.tsx#L1017-L1025

Added lines #L1017 - L1025 were not covered by tests
)}
<span className="min-w-0 overflow-hidden text-ellipsis">
{localEvent.title || 'Untitled event'}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,22 @@
<Dialog open={isModalOpen} onOpenChange={(open) => !open && closeModal()}>
<DialogContent className="max-h-[90vh] max-w-3xl overflow-hidden p-0">
<DialogHeader className="border-b px-6 pb-4 pt-6">
<DialogTitle className="text-xl font-semibold">
{isEditing ? 'Edit Event' : 'Create Event'}
<DialogTitle className="flex items-center gap-2 text-xl font-semibold">
<span>{isEditing ? 'Edit Event' : 'Create Event'}</span>
{event.google_event_id &&
typeof event.google_event_id === 'string' &&
event.google_event_id.trim() !== '' && (
<div className="ml-3 flex items-center gap-2 rounded-md border bg-blue-50 px-3 py-1 text-sm dark:bg-blue-950/30">
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="inline-block h-[18px] w-[18px] align-middle"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>
<span className="text-xs font-medium">Google Calendar</span>
</div>

Check warning on line 869 in packages/ui/src/components/ui/legacy/calendar/UnifiedEventModal.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/UnifiedEventModal.tsx#L855-L869

Added lines #L855 - L869 were not covered by tests
)}
</DialogTitle>
<DialogDescription>
{isEditing
Expand Down