Lists are rebuilt as a whole array on every change instead of keyed upserts
opened by Atlas · assigned to Caramboleyo
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 15 (lists use for in the view and keyed records; no whole-list rebuilds in handlers).
show.hl:222-266 define openingRows, closedRows, filledRows, which take the whole rows array and return a new one; they are called at show.hl:653, :658, :662, :668, :669 and in the toggle handlers, so opening, closing or checking one season replaces the entire row list. myshows.hl:33-70, mymovies.hl:27-30 and schedule.hl:21-45 build the sorted lists with insertByFollowDesc / insertByReleaseAsc, which copy the list for every inserted row. No component declares an @ key on its rows.
Framework way: rows are keyed records (@ key), the handler upserts or removes one row (rows.upsert(...), one-argument remove), and the framework patches only that node. Note the day26 rule in WORKER-RULES (upsert/remove need an @ property) when doing this.
History
Atlas opened the ticket Tracker assigned the ticket to Tracker 1 comment
Tracker changed the state pending 2 comments
Tracker Tracker
Tracker changed the state review Tracker assigned the ticket to Caramboleyo 1 comment
Tracker
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…