Skip to content

Comments

✨ Feat: Include recurring events during import#295

Merged
tyler-dane merged 8 commits intomainfrom
feat/293-import-recurrences
Mar 12, 2025
Merged

✨ Feat: Include recurring events during import#295
tyler-dane merged 8 commits intomainfrom
feat/293-import-recurrences

Conversation

@tyler-dane
Copy link
Contributor

@tyler-dane tyler-dane commented Mar 9, 2025

Changes

Recurring Events (readonly, first-time import)

This PR is the first step to getting recurring events to work in Compass. It does so by updating how events are imported to include recurring events.

Here is the relevant code for that:

// sync.service.helpers.ts
    const params: gParamsImportAllEvents = {
      calendarId,
      singleEvents: true, //expands recurrences into individual events
      pageToken: nextPageToken,
    };

// see: https://developers.google.com/calendar/api/v3/reference/events/list

Since we're not allowing users to edit recurring events in Compass, this PR also updates the UI to prevent a user from opening to form, dragging, or resizing a recurring event.

Recurring events are distinguished on the UI with a * to make it easier for users to understand not to click them (yet).

Demo-Recurring.mov

TypeScript improvements

More strictly types event schemas

Closes #293 and #294.


Usage

The changes in this PR will only take effect if you signed up for Compass using this code. If you signed up for Compass locally in development before, we will not import your recurring events as part of this PR. This PR only focuses on getting recurring events to import during the initial sign up process, which involves importing all of a user's events.

TL;DR - To get this to work in local dev, use a new test account or delete the data from your existing account using CLIso you can sign up again.

If you're still having issues, try manually logging out by going to /logout and trying again.

@tyler-dane tyler-dane force-pushed the feat/293-import-recurrences branch from 00ce7f5 to bbc4b30 Compare March 9, 2025 13:48
- Add checks to block editing of recurring events in GridContextMenu, GridEvent, and AllDayEvent
- Display an asterisk (*) for recurring events
- Show alert when attempting to edit recurring events
strictly types recurrence and event schema
Although these params would've helped narrow down the events needed to import, they'd prevent us from receiving a nextSyncToken, which would break sync.

There are several query parameters that cannot be specified together with nextSyncToken to ensure consistency of the client state.

See `syncToken` description here: https://developers.google.com/calendar/api/v3/reference/events/list
@tyler-dane tyler-dane force-pushed the feat/293-import-recurrences branch from 4b719f0 to 02bbc98 Compare March 12, 2025 02:46
@tyler-dane tyler-dane marked this pull request as ready for review March 12, 2025 03:13
@tyler-dane tyler-dane merged commit 1d51e1c into main Mar 12, 2025
3 checks passed
@tyler-dane tyler-dane deleted the feat/293-import-recurrences branch March 12, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include recurrences in GET events response

1 participant