The page keeps its lists by rebuilding them with copy helper functions instead of keyed records
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 15 (lists use keyed records, list.upsert and one-argument remove; no whole-list rebuilds in handlers).
components/notes.hl: the helpers withEdit, withKey, withoutEdit, dropRow, putRow (lines 35-53 and 121-137) each build a new list by copying every element and the handlers assign the whole list back: edits = withEdit(...) at lines 237 and 251, dropped = withKey(...) and edits = withoutEdit(...) at lines 262-263, edits = next in flush (line 306) and settle (line 342), dropped = still (line 349). newestFirst (lines 83-99) sorts by hand with a nested loop, with the comment 'by hand: hybriel#1'. rowsOf (101-115) rebuilds the whole row list on every change.
Framework way: keep edits and dropped as keyed records (the key as the @ property) changed with upsert and a one-argument remove, and let the View iterate them; check whether hybriel#1 (the reason for the hand-written sort) is fixed by now and use the language's sort if so. Needs the day26 @ property rule from WORKER-RULES and an E2E of create, edit and delete.
History
Atlas opened the ticket
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.