Skip to content

Add all-day events, jump-to-today, event editing and ICS escaping#12

Open
UncleJ4ck wants to merge 1 commit into
snes19xx:mainfrom
UncleJ4ck:events-recurrence-allday
Open

Add all-day events, jump-to-today, event editing and ICS escaping#12
UncleJ4ck wants to merge 1 commit into
snes19xx:mainfrom
UncleJ4ck:events-recurrence-allday

Conversation

@UncleJ4ck

@UncleJ4ck UncleJ4ck commented Jun 14, 2026

Copy link
Copy Markdown

Targets the current main (the multi-file rewrite). I checked what the rewrite already has and only added what was missing.

Already in main, so not touched: recurrence (including YEARLY, BYDAY, EXDATE), theme persistence via settings.json, and delete-single-occurrence.

New

  • All-day events. Added an allDay field to CalendarEvent. The parser detects a date-only DTSTART, the writer emits DTSTART;VALUE=DATE, the add/edit dialog has an All day toggle, and cards show All day instead of a time range.
  • Edit events. Non-recurring manual events get an Edit button that reopens the dialog prefilled. Recurring, imported and khal events are left as-is (editing those safely needs more design around the master/exception model).
  • Jump to today button in the header (works in both month and week view).

Fix

_saveManualEventsToDisk wrote SUMMARY/LOCATION/DESCRIPTION raw. A multi-line description (the dialog allows 3 lines) wrote a real line break that the reader dropped on reload, losing everything after the first line. , ; \ were also unsafe. Added RFC 5545 text escaping on write and unescaping on read (SUMMARY/LOCATION are now unescaped too, which helps imported calendars).

Tests

test/widget_test.dart was the placeholder template referencing a non-existent package and class, so it did not compile. Replaced it with unit tests for the ICS escape round-trip and date-only detection.

Verification

  • flutter analyze: no new errors or warnings.
  • flutter test: passes.
  • flutter build linux --debug: builds, launched and rendered on a Wayland session (today button visible).
  • The ICS logic is unit-tested. The dialog interactions (edit, all-day toggle) are build and render verified, not click-tested.

Notes

  • All-day events use inclusive DTEND dates for internal round-trip simplicity.
  • Pre-existing analyzer warnings in the rewrite (unused imports/fields, _sameEvent) are left untouched to keep this focused.

- All-day events: model flag, date-only DTSTART parsing, VALUE=DATE save, an all-day toggle in the add/edit dialog, and All day rendering on cards
- Jump-to-today button in the header for month and week views
- Edit non-recurring manual events through the existing dialog
- Escape SUMMARY/LOCATION/DESCRIPTION when saving manual events and unescape on parse, fixing data loss on reload for multi-line or comma/semicolon text
- Replace the placeholder widget test with unit tests for the ICS text helpers
@UncleJ4ck
UncleJ4ck force-pushed the events-recurrence-allday branch from 2499ba6 to 35f5c6e Compare June 15, 2026 00:18
@UncleJ4ck UncleJ4ck changed the title Add event editing, all-day events, recurrence and theme persistence Add all-day events, jump-to-today, event editing and ICS escaping Jun 15, 2026
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.

1 participant