lspitzner / bricki-reflex

Reflex FRP interface for the `bricki` shallow fork of the `brick` commandline UI library
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Improvements #1

Closed LightAndLight closed 1 year ago

LightAndLight commented 6 years ago

Viewports were giving me errors, so after some digging I found this: https://github.com/jtdaugherty/brick/blob/master/src/Brick/Main.hs#L168

I noticed that nothing was rendered on my screen until I triggered the an event. Now it will do a render during startup, so you have an image instantly.

(I moved startOrSuspend out into a definition because I was having trouble with the types. Feel free to inline it again if you want)

lspitzner commented 6 years ago

Thanks for providing these fixes. That observedNames and clickableNames did not get treated like they are upstream seems indeed like an oversight.

As for the startup behaviour, I generally agree with the change you made (unconditionally do one redraw, not just send an "empty" (Nothing) input event) but I think the code could be cleaned up somewhat. I'll use github's review feature, one sec.

(Separate function definition is fine btw; it is indeed hard to keep track of such types.)

LightAndLight commented 6 years ago

Cool, thanks for the feedback. I'll clean it up over the next few days.