One open question is how to manage logs while drawing, since they can be
extremely verbose. Neither tags nor depths seem like the right metaphor
here, and that gives me pause that I perhaps don't see the full space of
needs yet.
In the fullness of time, I'll want to remember previous file, type to
filter, etc. But for now just don't forget where you were. This is
helpful because I'm often working on either the run side or the source
side, and just starting out on the right side shaves off a lot of
keypresses.
I'm starting to edit the sources from within the app in ernest. First
question: why does the file navigation menu skip some files? These
prints answer the question.
I've been running out of ctrl+ shortcuts, and I just remembered my
original idea to keep ctrl+ for drawings/mouse operations and alt+ for
everything else.
This is compatible with Javascript, and it also seems like a better
default; when people forget to think about return values in click
handlers, they should be consumed.
Symptom: a test (test_click_to_create_drawing) started randomly failing
after I inserted a `return` 2 commits ago.
Cause: my tests call edit.draw, but button handlers only get cleared in
app.draw. So my tests weren't clearing button handlers, and every call
to edit.draw was accumulating states. Still unclear why those were going
to different state objects after the `return`, but anyway. I'm not going
to understand every last thing that happens when things go wrong, just
guarantee they can't go wrong. And the way to do that is to decentralize
button handlers to each state that receives them.
The State object in buttons.lua doesn't have to be Editor_state. It just
has to be some table that provides a Schelling Point for shared state.