I haven't looked too deeply at the new layout library yet, but maybe this will serve as some inspiration...
A while back I was experimenting with a layout library of my own. I never quite got it to the point where I was happy releasing it to the world, but it did have some interesting features. Most notably:
A flexbox-inspired layout system, with column and row support
Support for elements with dependencies between their width and their height (eg. wrapping text)
Easy to extend with new types of elements
Automatic lazy rerendering - it would detect which elements were new or different each frame (by way of hashing them) and only clear / redraw those elements
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I haven't looked too deeply at the new layout library yet, but maybe this will serve as some inspiration...
A while back I was experimenting with a layout library of my own. I never quite got it to the point where I was happy releasing it to the world, but it did have some interesting features. Most notably:
Usage looked like this:
(Each
{flex: 1}
there is a flexible spacer)If anyone would like to see it in action, they can try it here: https://www.espruino.com/ide/?gist=bde5d085b2723a87e93f55411c03983a