[GH-ISSUE #67] Add yoga layout support #39

Closed
opened 2026-05-05 11:30:44 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @kusti8 on GitHub (Mar 22, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/67

I'd like to add yoga layout, because Grid is pretty buggy and it would make it more similar to React Native. There are a few things that need to be done to make this work.

Originally created by @kusti8 on GitHub (Mar 22, 2018). Original GitHub issue: https://github.com/kusti8/proton-native/issues/67 I'd like to add yoga layout, because Grid is pretty buggy and it would make it more similar to React Native. There are a few things that need to be done to make this work. * [ ] Add fixed position support to libui (https://github.com/andlabs/libui/issues/306) * [x] Add yoga-layout on the JS side * [x] Create a wrapper called View over the libui Fixed widget
gitea-mirror 2026-05-05 11:30:44 -06:00
Author
Owner

@kusti8 commented on GitHub (Mar 25, 2018):

I'm almost done with a version that works on Linux, I just need a few more days to work out the bugs. Once the proton-native side is ready, then there shouldn't be any more changes needed since everything else should be implemented in libui.

For libui, the notable changes that I've made (on my fork) is add a fixed component using GtkFixed and add a way to get and set the size of any component.

I need to find a way to implement that in Windows and Mac, but I assume they have easy support for fixed positioning and setting/getting the size.

As for libui-node, I've added all of those bindings. Yoga isn't being built together with libui-node, but added with proton-native. I've had to change the compile options for libui-node because it and yoga were conflicting.

The component is implemented as View and supports all of the options that View has on React Native. I need to see if I can implement setting the background color so that it's easier to see nested views.

<!-- gh-comment-id:376009671 --> @kusti8 commented on GitHub (Mar 25, 2018): I'm almost done with a version that works on Linux, I just need a few more days to work out the bugs. Once the proton-native side is ready, then there shouldn't be any more changes needed since everything else should be implemented in libui. For libui, the notable changes that I've made (on my fork) is add a fixed component using GtkFixed and add a way to get and set the size of any component. I need to find a way to implement that in Windows and Mac, but I assume they have easy support for fixed positioning and setting/getting the size. As for libui-node, I've added all of those bindings. Yoga isn't being built together with libui-node, but added with proton-native. I've had to change the compile options for libui-node because it and yoga were conflicting. The component is implemented as View and supports all of the options that View has on React Native. I need to see if I can implement setting the background color so that it's easier to see nested views.
Author
Owner

@parro-it commented on GitHub (Mar 26, 2018):

. I've had to change the compile options for libui-node because it and yoga were conflicting.

Can you details where they conflict? And which options you need to. Change?

<!-- gh-comment-id:376334557 --> @parro-it commented on GitHub (Mar 26, 2018): > . I've had to change the compile options for libui-node because it and yoga were conflicting. Can you details where they conflict? And which options you need to. Change?
Author
Owner

@kusti8 commented on GitHub (Mar 26, 2018):

I couldn't find exactly what conflicted, but I found this in nbind's issues and it worked. 57a957c4f2

<!-- gh-comment-id:376341120 --> @kusti8 commented on GitHub (Mar 26, 2018): I couldn't find exactly what conflicted, but I found this in nbind's issues and it worked. https://github.com/kusti8/libui-node/commit/57a957c4f23d89da53cfb141d96964eefc14bbf5
Author
Owner

@kusti8 commented on GitHub (Apr 1, 2018):

I've added a PR to track my changes. All I need to do is add fixed positioning for Windows and Mac for libui and merge that.

<!-- gh-comment-id:377785528 --> @kusti8 commented on GitHub (Apr 1, 2018): I've added a PR to track my changes. All I need to do is add fixed positioning for Windows and Mac for libui and merge that.
Author
Owner

@roman01la commented on GitHub (Sep 27, 2018):

@kusti8 Is it still in development? I also have a question about running Yoga on JS side, it's interesting to see how it can impact perf 🤔

<!-- gh-comment-id:425108798 --> @roman01la commented on GitHub (Sep 27, 2018): @kusti8 Is it still in development? I also have a question about running Yoga on JS side, it's interesting to see how it can impact perf 🤔
Author
Owner

@mischnic commented on GitHub (Sep 28, 2018):

@roman01la This PR needs to be merged first: https://github.com/andlabs/libui/pull/332.

<!-- gh-comment-id:425402911 --> @mischnic commented on GitHub (Sep 28, 2018): @roman01la This PR needs to be merged first: https://github.com/andlabs/libui/pull/332.
Author
Owner

@kusti8 commented on GitHub (Jan 19, 2020):

Proton Native V2 is now released! If the issue still occurs in the new update, please open a new issue.

<!-- gh-comment-id:576029552 --> @kusti8 commented on GitHub (Jan 19, 2020): Proton Native V2 is now released! If the issue still occurs in the new update, please open a new issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#39
No description provided.