This change makes the renderEditor function take the content drawing
function that "editor" previously took. This does a better job of
separating presentation and representation concerns, and the content
drawing function never should have been part of the state to begin with.
This change removed the corresponding lens and Editor accessor for the
drawing function, removed the smart constructor parameter, and moved it
to be a parameter of the renderEditor function.
This change makes it possible for brick to extent the event space using
its own event notions in addition those provided by Vty and the
application itself. This means we no longer need the user to provide the
type and appLiftVtyEvent went away. This makes pattern-matching in event
handlers a little noisier with the benefit that we can now add events
like mouse clicks or drags to the event type.
This isn't a fully backwards-compatible change, but the only thing
that needs to be modified for programs involves adding a type parameter,
which will be either `String` or `Text`.
This experimental change makes it possible to:
* Avoid runtime errors due to name typos
* Achieve compile-time guarantees about name matching and usage
* Force widget functions to be name-agnostic by being polymorphic
in their name type
* Clean up focus handling by making it possible to pattern-match
on cursor location names
The change also made many types more heavyweight and in some cases
this is unpleasant when we don't want to have to care about names.
But in those cases we can just use 'n' or '()' depending on how
concrete we need to be. I'm not yet sure how this is going to play
out in practice.
This might improve the understanding of what is a list item and what
is a position. Also in when running the demo it was possible to create
identical items by removing an element form the middle and adding a
new one (wich got the number (length of list), not (smallest unused
element in list)).