Release: one log page, grouped dishes, live search (#1)
Structure - Kirjaa and Historia are one page. They were two views of the same thing — every history row already linked into the logger, and the logger had a day switcher. Two tabs instead of three. Also closed a gap: on an already-logged day there was no way to swap to a different dish, only to re-pick its sides. - Ruoat → Ruuat, label and route. - The catalog has a structure. It had no top-level headings at all — the mains simply began with "Liha". Both halves now carry a heading and a count, categories are visibly subordinate, and the add/edit forms collapse instead of filling the screen before any content. Finding things - Dishes grouped by category on both screens, Sekalaiset for multi-category ones. Derived from the stored set, not a fifth category, so one Tortillat still covers all four for the §8.1 suggester later. - Live search on both lists, 250 ms after typing stops. Both remain plain GET forms, so they still filter with JavaScript off. - History is paged 30 days at a time — it previously rendered every day back to the first entry, forever. Correctness - Future meals refused. The picker offered them and ?pvm= accepted them. - today() wasn't midnight, so it never equalled a date parsed from ?pvm= — after saving, the card read "la 5.9. kirjattu" instead of "Tänään kirjattu". - Deletes ask first, for dishes and logged meals. The meal is the more destructive: a dish is only soft-deleted. - DB open failures name the path and uid, instead of unable to open database file (14). Visual - Category icons replace colour dots — steak, drumstick, fish, leaf, quartered circle. - Row actions are a pencil and a bin; the header has a surface. Housekeeping - Datastar SDK dropped — one JSON decode was pulling in four modules including an HTTP compression stack. Five lines replace it. - Release policy documented: main protected, releases arrive as PRs. Co-authored-by: Esa Kataja <[email protected]> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -81,6 +81,14 @@ fix: ## Format Go and templ sources, tidy go.mod
|
||||
|
||||
image: ## Build and tag an image as vYYYYMMDD-N. Creates a git tag.
|
||||
@test -n "$(FOODSTER_REPO)" || { echo "set FOODSTER_REPO in .env"; exit 1; }
|
||||
@# A release tag must point into main, or the tag records a commit that
|
||||
@# was never released.
|
||||
@branch=$$(git symbolic-ref --short HEAD); \
|
||||
if [ "$$branch" != "main" ]; then \
|
||||
echo "releases are cut from main, not $$branch:"; \
|
||||
echo " git switch main && git merge --ff-only dev"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@day=$$(date +%Y%m%d); \
|
||||
tag="v$$day-$$(( $$(git tag -l "v$$day-*" | wc -l) + 1 ))"; \
|
||||
echo "==> $$tag"; \
|
||||
|
||||
Reference in New Issue
Block a user