diff --git a/src/app.js b/src/app.js index a9b8e9e..6fef072 100644 --- a/src/app.js +++ b/src/app.js @@ -3884,11 +3884,9 @@ const noteGramsField = document.getElementById("note-grams-field"); const noteKindField = document.getElementById("note-kind-field"); const noteKindPicker = document.getElementById("note-kind-picker"); - const noteKindNew = document.getElementById("note-kind-new"); - const noteKindName = document.getElementById("note-kind-name"); // Which kind the dialog currently has selected. Held here rather than read - // off the DOM so the picker can be redrawn (after adding a kind) without - // losing the choice. + // off the DOM, so redrawing the picker to move the active chip does not lose + // the choice. let notePickedKind = NO_KIND; function drawNoteKindPicker() { @@ -3898,20 +3896,6 @@ }); } - // Inventing a kind mid-log: it is created, selected, and the box clears, so - // you carry on logging the meal you came here for. - document.getElementById("note-kind-add").addEventListener("click", () => { - const name = noteKindName.value.trim(); - if (!name) return; - notePickedKind = addFoodKind(name).id; - noteKindName.value = ""; - drawNoteKindPicker(); - }); - noteKindName.addEventListener("keydown", (e) => { - if (e.key !== "Enter") return; - e.preventDefault(); // the dialog's default button would otherwise save - document.getElementById("note-kind-add").click(); - }); const noteGrams = document.getElementById("note-grams"); let pendingType = null; let notePhotos = []; // pending photos for this dialog: [{ blob, url }] @@ -3992,8 +3976,6 @@ // A new meal starts on whichever kind is the default, which may well be no // kind — that is the starting state and stays a legitimate choice. notePickedKind = defaultFoodKindId(); - noteKindNew.hidden = isGuest(); // inventing a kind is the owner's - noteKindName.value = ""; if (isEat) drawNoteKindPicker(); else noteKindField.hidden = true; clearNotePhotos(); diff --git a/src/changelog.json b/src/changelog.json index 21201dc..970cfba 100644 --- a/src/changelog.json +++ b/src/changelog.json @@ -1,7 +1,8 @@ [ + { "date": "2026-09-24", "text": "Kinds of food are now created in one place only — Settings → Food kinds. The Ate dialog no longer has a box for inventing one on the spot; it still lets you pick from the kinds you have, exactly as before. Making them mid-meal put a bit of list-keeping in the middle of logging, where the thing you actually came to do is record that the dog ate, and a kind typed in a hurry is easy to get slightly wrong — nothing stops two near-identical kinds existing, and clearing one up afterwards means relabelling every meal logged under it first" }, { "date": "2026-09-22", "text": "Habits has a Meals log beside the Food (grams) chart: every meal you have logged, newest first, across every day rather than just the one you are looking at. It is there because a meal's amount and its kind are both optional — which is what makes them easy to lose track of. A meal with no kind sits in the grey band on the chart, a meal with no amount is quietly left out of it, and until now there was nowhere to go and see which ones those were. The filter chips carry their own counts, so “No kind 412” tells you the size of the gap before you tap anything, and picking a filter lists exactly those meals; tap any row to fill in what it is missing, in the same edit dialog as everywhere else. If you started using food kinds after months of logging, the “No kind” filter also offers to label the whole list at once: choose a kind and it sets it on every meal shown. Tick “Only before” a date first if you switched foods partway, so the older meals take one kind and the newer ones keep what they have — worth getting right, because there is no undo. The panel folds away by tapping its heading like any other, and appears only once you have logged a meal; the “No kind” filter and the bulk label appear only once you have created a kind, so nothing changes for anyone not using them. A guest can see the list but cannot relabel your meals" }, { "date": "2026-09-22", "text": "Tap a bar in the Food (grams) chart and a line under it spells that day out — “Sat, Sep 20 — 340 g”, or “Dry 260 g · Fresh 100 g · 360 g in total” once you are using kinds. A phone has nothing to hover over, so the amount for a given day was previously only readable by eye off the axis. It follows whichever day is highlighted, so the ← → arrows and the date picker move it too, and it says so plainly when a day has no food logged or is marked as not counted" }, - { "date": "2026-09-22", "text": "Meals can be labelled with a kind of food. Make up your own in Settings → Food kinds — dry, fresh, raw, whatever you feed — and pick one when you log a meal; tap the ★ beside one to have it chosen for you automatically. You can also invent a kind from inside the log dialog if you realise you need it mid-meal. All of it is optional: “No kind” is always offered, every meal you have already logged keeps working untouched, and with no kinds defined the app looks and behaves exactly as it did. Once you are using them, today's overview breaks the day's food down inside the Meals card — “Dry 260 g” and “Fresh 100 g” under the total they add up to — and the Food (grams) chart splits each day's bar by kind with a legend, and draws a separate trend line for each, so you can see fresh creeping up while dry comes down. The sentence underneath names only the kinds that are actually moving and folds the rest into one clause, so it stays short however many kinds you have. Renaming a kind updates the meals logged as it; deleting one keeps them readable under the name it had. A guest can label a meal with a kind you have created but cannot add, rename or delete them" }, + { "date": "2026-09-22", "text": "Meals can be labelled with a kind of food. Make up your own in Settings → Food kinds — dry, fresh, raw, whatever you feed — and pick one when you log a meal; tap the ★ beside one to have it chosen for you automatically. All of it is optional: “No kind” is always offered, every meal you have already logged keeps working untouched, and with no kinds defined the app looks and behaves exactly as it did. Once you are using them, today's overview breaks the day's food down inside the Meals card — “Dry 260 g” and “Fresh 100 g” under the total they add up to — and the Food (grams) chart splits each day's bar by kind with a legend, and draws a separate trend line for each, so you can see fresh creeping up while dry comes down. The sentence underneath names only the kinds that are actually moving and folds the rest into one clause, so it stays short however many kinds you have. Renaming a kind updates the meals logged as it; deleting one keeps them readable under the name it had. A guest can label a meal with a kind you have created but cannot add, rename or delete them" }, { "date": "2026-09-21", "text": "Fixed the figures under the Food (grams) chart contradicting each other. It read like “down about 329 g a week — roughly 460 g a day then, 320 g a day now”, where subtracting the two amounts gives 140 g, not 329 g. The rate was worked out per week while the line itself only covers the complete days in the window — at most five of them on a 7-day window, since today isn't finished — so it was stretched past the days it was measured from. It now gives the change between the two ends, which is a figure you can check by subtracting them: “down about 140 g — from roughly 460 g a day to 320 g”" }, { "date": "2026-09-21", "text": "You can measure the time between two events. Press and hold one row, press and hold another, and a bar along the bottom shows the gap — “3h 42m · Ate 12:10 → Poo 15:52” — which answers things like how long after a meal he needs to go out. It stays there until you clear it with the ✕, so you can change day in between and pick the second event from another day; when the pair straddles midnight the bar shows the dates too. It works on any row that is a single moment: the history log, the notes log and weigh-ins. Holding a row you already picked unpicks it, and a third pick is ignored until you clear. Tapping a row still opens it for editing as before. One cost: because holding a row now means something, you can no longer select the text of a note to copy it" }, { "date": "2026-09-21", "text": "A day marked “not counted” no longer appears in the Sleep trend or the Walk trend. It was already left out of the average and out of the “yesterday” comparison, but the day you were actually looking at was still drawn as the boldest line on the chart — so the one day you had said not to trust was the one the panel led with. Now it is left off and its legend chip goes with it, leaving the average and yesterday, which is what you would want to see on a day like that" }, diff --git a/src/index.html b/src/index.html index 4d99c86..9c41164 100644 --- a/src/index.html +++ b/src/index.html @@ -709,10 +709,6 @@