-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
notes on API improvements #32
Comments
Other notes:
(Good point: all these changes concern Nottui, not Lwd 😄) |
to handle theming, maybe a reactive map type would be useful ( I mean:
with a bunch of theming keys. |
On theming: wouldn't a list of global variables be enough? Do we need a dynamic map? |
what if you want two UIs with distinct themes? but yeah, that sounds far fetched. 👍 |
The problem then is not whether the map is dynamic, but how to scope it. Should on thread the Or should we add dynamic scoping primitives to Lwd? (Nope, that would complicate the theory significantly, although the symmetry with Lwt thread local storage is somewhat funny :P) |
There's got to be downward flowing information in nottui, isn't there? About terminal size, for example (or available space for a component to render). Configuration could also be passed along. |
Nottui
(easily aliasable/openable). I'll refer to it asUI
from now on.Lwd
asUI.Incremental
andLwd_seq
asUI.Seq
UI.Syntax
withlet$
and other bind/map fromLwd
, along with UI helpers like<|>
or<->
for h/v concatenation of UI elementsUI.t = UI.Pure.t Lwd.t
would make a lot of sense (whereUI.Pure.t
can be the base type for non-reactive elements). Most functions will work on lwd-wrapped things.UI
, for exampleUI.s
for a string widget,UI.space
,UI.sprintf
,hcat
(list),hjoin
(binary horizontal concat),<|>
(alias for hcat)UI.Scrollable
for the whole thing, along with aUI.scrollable : …
function for the common case)pretty
asUI.Pretty
(can be just a module alias for lightweightness)minor quibbles
flex
needs more testing (but would be useful to keep)scrollable
currently doesn't take as much space as it can, so only the used part is actually scrollablealso see #5 for a bigger wishlist 🐴 🎅 🎁
The text was updated successfully, but these errors were encountered: