summaryrefslogtreecommitdiff
path: root/scripts/verify-deploy
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-09-20 01:32:44 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-09-20 01:32:44 +0000
commitb970be11ee895c34e019231022e9e5244e4aec2f (patch)
treeb6b21179c4eecb017843b5fc737c06ee2cbfbdc9 /scripts/verify-deploy
parent36a82d934366cc2ddbd92ee3885b1c547eeb8244 (diff)
Stop per-store add forms jumping to the bottom of the page
The inline "Add to <store>..." forms submitted with a bare hx-swap="innerHTML" against #shopping-items-list. Those forms live *inside* that target, so the swap destroys the form that submitted it and the page ends up scrolled to the bottom rather than staying on the store being added to. The quick-add form at the top never had this because it sits outside the target and already carried an explicit scroll: modifier. Each store section now has a stable id and its inline form scrolls back to it, so adding to a store keeps that store in view. Adds a `slug` template function for the id: store names are user data ("Trader Joe's", "Hardware Store") going straight into element ids, so anything outside [a-z0-9-] is collapsed to a dash and an empty result becomes "unnamed" rather than an invalid, shared anchor. Tests render the real template with the real func map, and assert every inline add form has a scroll target — the bug is trivially reintroduced by copying a section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'scripts/verify-deploy')
0 files changed, 0 insertions, 0 deletions