From 3e3eee678e9e487ec5830499114a5bd489f9e0f1 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 15 Jul 2026 12:47:39 +0000 Subject: [PATCH] Show a meal's grams in the history list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same pattern as weigh-ins: "80 g · note" or just "80 g" when there's no note. --- src/app.js | 3 +++ src/changelog.json | 1 + 2 files changed, 4 insertions(+) diff --git a/src/app.js b/src/app.js index 41b30cc..79f6716 100644 --- a/src/app.js +++ b/src/app.js @@ -803,6 +803,9 @@ const noteEl = li.querySelector(".note"); if (ev.type === "weight" && Number.isFinite(ev.weight)) { noteEl.textContent = ev.note ? `${formatWeight(ev.weight)} · ${ev.note}` : formatWeight(ev.weight); + } else if (ev.type === "eat" && Number.isFinite(ev.grams) && ev.grams > 0) { + const g = `${Math.round(ev.grams)} g`; + noteEl.textContent = ev.note ? `${g} · ${ev.note}` : g; } else { noteEl.textContent = ev.note || ""; } diff --git a/src/changelog.json b/src/changelog.json index 61ea6b5..7eb581b 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,4 +1,5 @@ [ + { "date": "2026-07-15", "text": "Meals with an amount logged show their grams in the day's history" }, { "date": "2026-07-15", "text": "Every 1-hour gridline on the sleep charts now shows its hour mark" }, { "date": "2026-07-15", "text": "The Sleep chart in the last-N-days card now has 1-hour gridlines too" }, { "date": "2026-07-15", "text": "The Sleep trend chart is taller with 1-hour gridlines, so nearby lines are easier to tell apart" },