Skip to content

calendar: use the host's calendar field names so all-day and multi-day events render in the Calendar view #172

Description

@michielbdejong

From Michiel's calendar user-testing session.

The calendar drive app (#101/#145) writes the shortnames day and all-day, and has no end-day property. The host's Calendar view (atomic-server CalendarView.tsx) reads the shared contract in @tomic/lib calendarFields (browser/lib/src/calendar-date.ts):

  • atomic-calendar-day: a civil date YYYY-MM-DD;
  • atomic-calendar-all-day: a boolean;
  • atomic-calendar-end-day: the inclusive last day;
  • atomic-calendar-notes.

Each can also carry an lt-google-calendar-property- prefix. Imported ranges are opt-in: only rows whose date column matches atomic-calendar-day get all-day and multi-day handling. So the app's all-day and multi-day events render as single-day events in the host view, which is also where the app's Month button hands off to.

Decision: fix the app, not the host. calendarFields is the shared contract other importers follow.

Fix:

  • rename the app's day → atomic-calendar-day and all-day → atomic-calendar-all-day;
  • add atomic-calendar-end-day (the inclusive last day, derived from Google's exclusive end);
  • write the event description to atomic-calendar-notes if the app imports one;
  • release as app 0.1.1, since published modules are immutable;
  • extend the e2e to open the host Calendar view and assert that a multi-day all-day event spans its days.

Existing installs are experimental test installs only, so there's no migration beyond a re-import.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions