tickets

calendar.worldapi.org #29

Reminder rows and day chips are rebuilt as whole lists by index loops

open

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 15 Lists use for in the View and keyed records; no rebuilding a whole list member on each change.

In components/month-view/month-view.hl, setRem (line 754), addRem (line 773) and delRem (line 782) each copy every reminder row into a new array with a while loop and assign the whole new list to remRows or setRows (via withIndex), for every keystroke in a number or time field. The rows have no key. fill() (line 139) rebuilds all 42 day records on every paging step and spreads the events over four fixed members t0..t3, c0..c3, v0..v3 because of hybriel #86 (the View then repeats four buttons by hand, lines 262 to 265). The framework way: reminder rows are keyed records (@ key) in the list, setRem updates the one record, addRem uses list.upsert, delRem the one-argument remove; the day cell holds its events as a list and the View loops over it with a nested for. If #86 still blocks the nested list, name it in the ticket and keep only that part.

History

  1. 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.