Yoga: A cross-platform layout engine
41–50 of 168 posts
Re: Yoga: A cross-platform layout engine
#42Why not just embrace Cassowary ( https://en.wikipedia.org/wiki/Cassowary_(software) ) aka the algorithm behind Cocoa's Auto Layout? Auto Layout isn't perfect but I think that it's fundamentally the API/UI that you are working with, the concepts are definitely at the right level of abstraction. Some sort of DSL could really solve this. Flexbox could be implemented as a framework on top of this.
(Original author of css-layout here) I've spend a few months playing with Cassowary before working on css-layout and had long chats with its creator Greg Badros and the people behind https://gridstylesheets.org/ . Cassowary underlying abstraction is a linear inequation solver. So you give it a bunch of constraints of the form ax + by + cz + d ## There are two innovations in Cassowary: 1) There's a concept of strength…
Re: Yoga: A cross-platform layout engine
#43Earlier quoted context omitted.
Parent was referring to the current version of IE which still has partial support. I wish it were better supported today. It would sure make my life easier.
If you use autoprefixer you can reliably use flexbox, with a few minor exceptions which, IMO, aren't huge dealbreakers.
Re: Yoga: A cross-platform layout engine
#44I like Facebook creating platforms but it is unclear, at least to me, what the problem is they are trying to solve here.
Re: Yoga: A cross-platform layout engine
#45Yoga's layout API is very similar, if not a direct copy, of the web's Flexbox. Which funny enough means that we might get a chance to use Flexbox on the desktop before we can use it on the web. (I'm looking at you IE and your continuing partial support: http://caniuse.com/flexbox )
A lot of real-world usage of flexbox is broken that has nothing to do with IE/Edge. Follow the "Known issues" tab on your caniuse link. Also see Flexbugs [1] for more. I get bitten by #11 and/or #14 on almost every project, which work fine in IE/Edge. [1] https://github.com/philipwalton/flexbugs
Re: Yoga: A cross-platform layout engine
#46I like the concept and the C# code is just hands down the best example out of all of them (yet another reason I miss coding in C#). I'm curious though, will this be eventually ported to JavaScript? Yeah yeah I know "flexbox is already on the web!" but if you could write a layout in this fashion versus using style sheets then you could take it and directly apply it to any of your applications (even if you have to conv…
Just curious, when/why would you want to code UI layout in C# vs using a template ?
Re: Yoga: A cross-platform layout engine
#47I like the concept and the C# code is just hands down the best example out of all of them (yet another reason I miss coding in C#). I'm curious though, will this be eventually ported to JavaScript? Yeah yeah I know "flexbox is already on the web!" but if you could write a layout in this fashion versus using style sheets then you could take it and directly apply it to any of your applications (even if you have to conv…
It's already cross-platform; cross-language would probably be a little much to ask :)
Re: Yoga: A cross-platform layout engine
#48Looks nice but the naming is wrong. We shouldn't expropriate well known names for tech solutions
Re: Yoga: A cross-platform layout engine
#49Earlier quoted context omitted.
I already use it in production. I don't really care about old IE users. I agree that not all devs can afford this, but many can.
Parent was referring to the current version of IE which still has partial support. I wish it were better supported today. It would sure make my life easier.
Re: Yoga: A cross-platform layout engine
#50I like Facebook creating platforms but it is unclear, at least to me, what the problem is they are trying to solve here.
- One layout concept across different platforms. This allows developers to more easily collaborate and jump between platforms and re-use knowledge.
- Decouple layout from rendering. A lot of UI frameworks couple layout tightly with rendering which often ties the layout to be run on the main thread. By decoupling layout we are able to run it asynchronously. https://code.facebook.com/posts/531104390396423/components-f... Talks about how we make use of this.