4 ms·
Feel like the constraints-based layout is not the right design of constraints. I don't know if there is any research on type based (constraints) layout. How to
by Existenceblinks 4y ago
Feel like the constraints-based layout is not the right design of constraints. I don't know if there is any research on type based (constraints) layout. How to type flex layout in composable way, could use some vector (matrix), and knapsack kind of algorithm. A child component spec should have some layout constraints to conform.
- PaulDavisThe1st 4y agoI have been very excited about constraint-based layout for about 20 years, after seeing a demo of an music app at a conference in Bordeaux. It used the original Cassowary implementation. Last year, I finally got a chance to try things out, using Kiwi via C++. The results, frankly, were underwhelming, at least for my purposes. It seemed that for most of what I wanted to be able to do, a "table" layout was more appropriate and provided more than enough flexibility. Creating layouts that do not in some sense use columns and rows is not unheard of, but it's rare.
- Existenceblinks 4y agoYeah, I were obsessed a long time ago. It doesn't have to be automatic. Start from what we have in css, there's media query. Looking good on desktop/laptop/mobile seems like special case. So generally we might look for semantic that scales e.g. ratio, open height, open width, .. idk I don't figure it out yet, it's like a greenfield area where previous solution doesn't look like revolutionary.
- wruza 4y agoTraditional desktop ui idiom implies enough space for all controls to fit. Frameworks could include similar width-breakpoint sets of constraints, or e.g. a type of H:a|-|b constraint which could transform into V:a|-|b plus H:parent|-|b when parent is too narrow, essentially wrapping an element. But they usually don’t. It doesn’t mean that constraint-based layout lacks flexibility. Only specific engines do, but so do specific table engines. It’s easy to forget that css also sucked for 20 years straight, and still does, if you dig an inch deeper than usual. E.g. grid is cool, but did anyone try to page-break it in media print? Can we baseline—align divs & inputs that are not direct children of a flexbox? Not to mention internalized bugs like when your grid gets a parasite scroll when its scrollable child has large padding specified in particular units. All that said, I think the best toolkit is the one which contains all of the tools and not only a subset.
- taeric 4y agoI'll echo this. It sounds compelling to make a constraint based layout, but often you are just as well off with a very simple grid. And not a whole lot of components in a page.