(no title)
heavenlyhash | 6 years ago
There's a few built-in layout options: https://godoc.org/fyne.io/fyne/layout ... but not many; I think it'd be a stretch to say it's going to provide equivalents to many of the things one can very quickly and easily do in the web with a handful of divs and spans and (don't hit me) tables.
Most of the examples in https://github.com/fyne-io/examples/ don't shed further light on what complex applications might need: everything there appears to be things implemented with very simple and strict grids. Nothing looks like it proves out a feature like tables that are resizable or can automatically choose reasonable sizes based on content, which would be a huge boon for making development as rapid as web platforms can be.
The key interface for making your own layout logic appears to be https://godoc.org/fyne.io/fyne#Layout . The good news: it's definitely something you can implement without forking the core of the library. It looks a little... sparse, though.
Let's say I wanted to implement a system where each object I'm laying out can have collapsible margins, and it's the layout engine's responsibly to figure out the collective resolution of that. Is this interface enough? How would I proceed?
...
Maybe I just need more time with it to see the potential, but it's definitely something I find important to watch out for. I've been burned enough lately by investing time in systems (I'm looking at you, nuklear) just to find their layout primitives are so far off the mark that they're in "start over" territory. And I think we can also look to more ancient history like the Java Swing era to see that "layoutManager" objects that don't have _enough_ interface information to work with are pretty doomed, because they result in whole divergent non-compatible layout suites that the whole application has to opt into, which is just a nightmare for growing a community with reusable code.
Layout is hard. And important.
No comments yet.