[PR #76] [CLOSED] Add yoga support. Fixes #67 #252

Closed
opened 2026-05-05 11:56:58 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kusti8/proton-native/pull/76
Author: @kusti8
Created: 4/1/2018
Status: Closed

Base: masterHead: yoga


📝 Commits (4)

  • f5feaf6 Add yoga initial support
  • 534b119 Add support for reactive yoga rendering
  • 9fbdadb Remove requirement for view size
  • 68a5612 Reorder size and move

📊 Changes

17 files changed (+1489 additions, -257 deletions)

View changed files

.test_yoga.js.swp (+0 -0)
📝 .vscode/launch.json (+27 -29)
📝 Demo.js (+20 -3)
📝 package-lock.json (+851 -212)
📝 package.json (+2 -1)
📝 src/components/DesktopComponent.js (+19 -0)
📝 src/components/Dialog.js (+1 -1)
src/components/View.js (+184 -0)
📝 src/components/Wind.js (+4 -4)
📝 src/components/index.js (+4 -2)
📝 src/index.js (+6 -2)
src/react-components/Window.js (+24 -0)
📝 src/react-components/index.js (+2 -1)
📝 src/reconciler/index.js (+4 -0)
📝 src/utils/createElement.js (+4 -2)
src/utils/styleToYoga.js (+334 -0)
test_yoga.js (+3 -0)

📄 Description

This is the PR that fixes #67.

It can't be merged right away because I still need libui support for GtkFixed and their equivalents on Windows and Mac, as well as sizing. Once that is done, which I'm going to work on now, then I can merge this. The API shouldn't change too much. If you're interested, I've added uiFixedAppend and uiFixedMove, as well as uiSize and uiSetSize. These are what need to be added to Windows and Mac and can be found on my libui and libui-node fork.

This currently supports full yoga layout, as far as I've tested. Meaning nested Views and all styling works. One thing that doesn't work is having a container such as a box as a child. You can't really mix yoga and stretchy layout.

To test:

  • Clone my libui fork and checkout the alpha3.5 fork (because libui-node currently only supports alpha3.5). This has my changes.
  • cd libui && mkdir build && cd build && cmake .. && make
  • Clone my libui-node fork
  • Copy the header files in libui into libui-node root directory and the build/out/*.so files into the libui-node root directory also
  • cd libui-node && npm i
  • sudo npm link
  • Clone proton-native and checkout the yoga branch
  • npm link libui-node
  • npm i
  • npm run demo

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kusti8/proton-native/pull/76 **Author:** [@kusti8](https://github.com/kusti8) **Created:** 4/1/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `yoga` --- ### 📝 Commits (4) - [`f5feaf6`](https://github.com/kusti8/proton-native/commit/f5feaf61852633a7d62cc914c897fc8cdcc3a026) Add yoga initial support - [`534b119`](https://github.com/kusti8/proton-native/commit/534b119193bdd0039aaa3598ed0b47b737b5475a) Add support for reactive yoga rendering - [`9fbdadb`](https://github.com/kusti8/proton-native/commit/9fbdadb150a76ed73e286f300583ff84e283ee53) Remove requirement for view size - [`68a5612`](https://github.com/kusti8/proton-native/commit/68a56129ab9e4a3b033d26f31bebebb0ef4cb82d) Reorder size and move ### 📊 Changes **17 files changed** (+1489 additions, -257 deletions) <details> <summary>View changed files</summary> ➕ `.test_yoga.js.swp` (+0 -0) 📝 `.vscode/launch.json` (+27 -29) 📝 `Demo.js` (+20 -3) 📝 `package-lock.json` (+851 -212) 📝 `package.json` (+2 -1) 📝 `src/components/DesktopComponent.js` (+19 -0) 📝 `src/components/Dialog.js` (+1 -1) ➕ `src/components/View.js` (+184 -0) 📝 `src/components/Wind.js` (+4 -4) 📝 `src/components/index.js` (+4 -2) 📝 `src/index.js` (+6 -2) ➕ `src/react-components/Window.js` (+24 -0) 📝 `src/react-components/index.js` (+2 -1) 📝 `src/reconciler/index.js` (+4 -0) 📝 `src/utils/createElement.js` (+4 -2) ➕ `src/utils/styleToYoga.js` (+334 -0) ➕ `test_yoga.js` (+3 -0) </details> ### 📄 Description This is the PR that fixes #67. It can't be merged right away because I still need libui support for GtkFixed and their equivalents on Windows and Mac, as well as sizing. Once that is done, which I'm going to work on now, then I can merge this. The API shouldn't change too much. If you're interested, I've added uiFixedAppend and uiFixedMove, as well as uiSize and uiSetSize. These are what need to be added to Windows and Mac and can be found on my libui and libui-node fork. This currently supports full yoga layout, as far as I've tested. Meaning nested Views and all styling works. One thing that doesn't work is having a container such as a box as a child. You can't really mix yoga and stretchy layout. To test: * Clone my [libui fork](https://github.com/kusti8/libui) and checkout the alpha3.5 fork (because libui-node currently only supports alpha3.5). This has my changes. * `cd libui && mkdir build && cd build && cmake .. && make` * Clone my [libui-node fork](https://github.com/kusti8/libui-node) * Copy the header files in libui into libui-node root directory and the build/out/*.so files into the libui-node root directory also * `cd libui-node && npm i` * `sudo npm link` * Clone proton-native and checkout the yoga branch * `npm link libui-node` * `npm i` * `npm run demo` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 11:56:58 -06:00
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#252
No description provided.