9 Commits

Author SHA1 Message Date
Victor Wiebe
360e246262 Add view: month-grid — full current month, 7-column layout
- groupEvents: buildMonthGrid covers the entire current calendar month
  padded to full weeks; adjacent-month padding days are flagged (dimmed)
  but can still hold events; events outside the window are counted
- Localised short weekday names as column headers; month/year label
- Webview renders a CSS grid: day cells with date number, today border
  highlight, clickable event chips (colour, icon/glyph, strikethrough,
  ellipsis overflow)
- Config accepts view: month-grid (alias: grid)
- SPEC.md updated; 5 new tests (47 total)
2026-06-12 18:38:10 -04:00
Victor Wiebe
57eae2b7f8 Phase 3: calendar grid rendering with hover cards and Unscheduled section
- src/Gtd/groupEvents.ts: render-ready day/week/month grouping mirroring
  upstream semantics (empty groups across the span, month-coloured tiles,
  primary labels on month/year boundaries, current-period flag). Divergence:
  the span always includes today so the highlight is visible.
- Grouping runs in the main process; payload now carries calendar.groups +
  calendar.unscheduled. Webview is a pure DOM builder.
- Webview rebuilds upstream's .event-calendar / .group / .hover-card
  structure so existing CSS applies: tile per period, first event's
  icon/2-chars (+N for multiples), bg/fg colours, hover card listing
  events with type glyphs and strikethrough for completed todos.
- Drilldown: single-event tiles open the note directly; hover-card rows
  and Unscheduled chips are individually clickable.
- Stable pastel from note-id hash replaces upstream's per-render random
  colour for events without bg-colour.
- Unscheduled section: chip list below the grid (the GTD bucket).
- 9 new grouping tests (42 total)
2026-06-12 18:38:04 -04:00
Victor Wiebe
fc1b2fcabf Phase 2: real data layer — folder scope, gtd blocks, inclusion matrix
- src/Gtd/: pure, unit-tested modules
  - parseCalendarConfig: SPEC defaults + warnings for invalid options
  - folderScope: BFS scope resolution (this-folder / children / depth N)
  - gtdBlock: extract + YAML-parse the first ```gtd fence (empty block
    is a valid opt-in; malformed YAML opts in with a surfaced warning)
  - resolveDate: gtd date (iso + mm-dd-yyyy) overrides todo_due; nothing
    resolvable -> unscheduled (null date)
  - collectEvents: orchestrates scope -> fetch -> inclusion matrix ->
    date resolution -> sort; always excludes the calendar note
- index.ts: JoplinDataAdapter with pagination; getEvents now returns real
  events plus warnings and scan stats
- Webview debug view shows real data: counts, warnings, colours, icons,
  strikethrough for completed todos, tooltip from text:
- 24 new unit tests (33 total)
2026-06-12 18:37:47 -04:00
Victor Wiebe
16242a2f44 Phase 1: gtd-calendar fence, webview round trip, drilldown proof
- New markdown-it content script intercepts ```gtd-calendar fences and
  emits a placeholder div (config URI-encoded in a data attribute)
- New webview asset (gtd-calendar-webview.js) finds placeholders, requests
  data via webviewApi.postMessage, renders a debug view, and wires
  click-to-open drilldown (openNote command)
- index.ts registers the content script and handles getEvents/openNote;
  getEvents parses the YAML config for real but returns hardcoded events,
  including one pointing at the current note to prove drilldown
- Old event-calendar content script removed; Calendar/ classes retained
  for reuse in Phase 3
- Fork CSS section appended (placeholder, error, debug styles)
2026-06-12 17:55:40 -04:00
Franco Speziali
6891818d1b Added coloured blocks for different months 2026-05-27 15:08:13 +02:00
Franco Speziali
ff2c3794d6 Small CSS fix to allow readability with different themes 2022-10-26 16:26:32 +02:00
Franco Speziali
da62052e79 Refactored entire rendering module; added new feature for "highlighting" a group, when the current date falls within that group 2022-04-24 22:12:58 +02:00
Franco Speziali
d4fad7bc9a Organised styles 2022-03-22 16:10:03 +01:00
Franco Speziali
0469b104f6 Styles added 2022-03-17 21:00:17 +01:00