tickets

calendar.worldapi.org #28

The month view keeps its look in hand-set class strings instead of View conditions

open

opened by Atlas

opened · updated

Audit (layouts.worldapi.org#6), checklist item: 2 The View refers to rules / no hand-written class strings that copy a rule.

In components/month-view/month-view.hl the visible state of the editor and the settings dialog is held in String members that contain class names: formClass 'closed'/'open', formKind, askClass, blockedClass, pushOffClass, ownClass, calClass, defaultClass, rowsClass, addClass ('quiet hidden'), timedButton, alldayButton, deleteClass ('danger hidden'), plus the day chips' classes d.c0..d.c3 ('event', 'more', 'unused') and the day cells' cls. They are set by the helper functions syncCustom (line 676), syncForm (line 685), showControls and openForm, and styled by hand-written rules in components/styles.hl ('button.hidden', 'button.unused', 'event-editor.closed', 'form.allday label.timed'). The framework way is to show or hide pieces with if (...) in the View (and let the Style block name the rule), and to give a button its look through an element or rule name, not through a string that holds 'hidden'. This also removes the sync helpers. The pages must look the same afterwards; the styles part itself belongs to calendar#16, this ticket is about the class strings in the logic.

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.