From ec2dfa5057c0eca19474266cd81f504d71e83412 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 4 May 2026 11:56:32 -0400 Subject: [PATCH 01/12] feat(sidebar): render month-folder children as calendar grid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a sidebar tree node holds nothing but daily-note leaves of one month (e.g. Daily/2026/04/2026-04-21.md … 2026-04-30.md), swap the linear list for a 7-column calendar grid of that month. Cells with notes link to the daily note; missing days render as muted dots. Detection seam stays in Haskell. routeTreeSplices emits a new node:iso-date splice (driven by Calendar.parseRouteDay) and sidebar-tree.tpl wraps each subtree in .emanote-tree-children. The JS module reads those data attributes — no second YYYY-MM-DD regex. Cell palette + size constants extracted from timeline-heatmap.js into a shared @emanote/calendar-grid module, so the two widgets share the primary-palette / cell-size source of truth. Closes #700. --- docs/guide/daily-notes.md | 1 + emanote/CHANGELOG.md | 1 + .../_emanote-static/js/calendar-grid.js | 57 +++++++ .../_emanote-static/js/sidebar-calendar.js | 141 ++++++++++++++++++ .../_emanote-static/js/timeline-heatmap.js | 106 ++++++------- .../templates/components/sidebar-tree.tpl | 15 +- emanote/src/Emanote/View/JsBundle.hs | 7 +- emanote/src/Emanote/View/Template.hs | 7 + 8 files changed, 267 insertions(+), 68 deletions(-) create mode 100644 emanote/default/_emanote-static/js/calendar-grid.js create mode 100644 emanote/default/_emanote-static/js/sidebar-calendar.js diff --git a/docs/guide/daily-notes.md b/docs/guide/daily-notes.md index dae089c9b..4155142bc 100644 --- a/docs/guide/daily-notes.md +++ b/docs/guide/daily-notes.md @@ -10,6 +10,7 @@ If you create notes named `YYYY-MM-DD.md`, Emanote will treat them as daily note 1. The backlinks panel will render daily notes separate from regular notes. Daily notes render as a year-stacked **timeline heatmap** (see [[backlinks#timeline-backlinks]]); regular notes render as a "Linked from" chip list. 2. Each daily note automatically gets a hierarchical tag (eg: `#calendar/2025/03`) allowing you to browse them by calendar navigation in the tag index. +3. Sidebar tree nodes whose immediate children are all daily notes of the same month (typically a `Daily/2026/04/` folder) render as a small **7-column calendar grid** in place of the linear list — each filled cell links to that day's note, missing days are muted dots. ## Timeline backlinks demo diff --git a/emanote/CHANGELOG.md b/emanote/CHANGELOG.md index cfdfff16d..f51a18972 100644 --- a/emanote/CHANGELOG.md +++ b/emanote/CHANGELOG.md @@ -16,6 +16,7 @@ - Popup footnotes as the only on-screen UI (desktop card / mobile bottom-sheet); printed output renders the footnote list ([#642](https://github.com/srid/emanote/pull/642)). - Site-authored interactive JS extracted from per-template `