Turning the lighting lab into a site-wide editor
The lab is where the settings of the light engine, the code that draws the site's light, live. Between 29 September and 1 October it went from a page that saved to my own browser to an editor whose Save applies to every visitor.
Settings saved in one browser reached nobody else
On 29 September the lab's settings were not persisting, and what I set there needs to be how everyone sees the site. The cause was that the lab saved to the browser's own local storage, which nobody else reads. The fix stored tuning as a row in the site's settings, so every page applies it for every visitor, and saved it 0.7 seconds after a slider stopped.
A related bug had already shown the risk. The lab saved every knob whenever any one moved, so a browser that had touched anything kept an old room brightness of zero. When the edge lights and other effects still were not working, the saved tuning was changed to keep only knobs that differ from the code's defaults, and older saved settings were set aside.
Changes reach visitors only on Save
On 30 September the autosave was reversed and the lab was laid out like an app builder, as I had asked: controls on the left, searchable and grouped, with a dot and a reset on anything moved, and the real site in a frame on the right at desktop, tablet or phone width.
Changes show at once, but nothing reaches visitors until Save for everyone, or Ctrl or Cmd plus S. Until then the draft survives a reload, and Discard returns to what is live.
Between 28 September and 1 October the commit history also names sixteen different previews, each opened by adding a word to the page's address: a black light, a flare, a magnifier, a laser, the red room and others. A preview is an effect the site can show but I haven't approved. On 1 October I turned them into switches, with descriptions that fold away until opened.
Weaker devices get a lighter engine
The light engine is expensive. On 30 September three tiers were added: minimal for phones and reduced motion, lite for devices reporting 4 GB of memory or less, four cores or fewer, or no GPU, and full for everything else.
A full page steps down after 90 lit frames in a row slower than 45 ms and never steps back up. On a 2x screen, the floor light drew 2,007 pixels wide at full and 1,338 at lite. The automatic tiers were behind a preview until approved.
The lab is locked to the admin and the menu is being redesigned
On 1 October I had the lab, and everything else experimental or administrative, locked to my signed-in admin session. The lab and every preview switch now check for that session, and a forged note in the browser is wiped. The same day the side menu absorbed the site's other admin screens, and I redesigned it.
The write-up measured the existing menu: 106 controls and 13 switches in one column 7,283 pixels tall, about eight screens. The proposal is a rail of areas, one search box and an Inspect mode. It is a mockup so far and has not been built.
Sources and notes (2)
- Side menu redesign — the notes this was written from: Ony's request and the measurements
- Side menu mockup — the mockup the piece shows
