[PR #625] [MERGED] layout: use batched Edge values for margin/padding #1451

Closed
opened 2026-03-14 09:37:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/625
Author: @simonklee
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @simonklee

Base: mainHead: yoga-setters


📝 Commits (2)

  • f4bcdf4 layout: use batched Edge values for margin/padding
  • cc55967 Merge branch 'main' into yoga-setters

📊 Changes

2 files changed (+24 additions, -34 deletions)

View changed files

📝 packages/core/src/Renderable.ts (+12 -34)
📝 packages/core/src/tests/yoga-setters.test.ts (+12 -0)

📄 Description

I noticed when reviewing https://github.com/anomalyco/opentui/pull/619 that Yoga supports Edge.All, Edge.Horizontal, and Edge.Vertical to set multiple edges in a single call. Use these instead of calling setMargin or setPadding four times for uniform values or twice for axis values.


🔄 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/anomalyco/opentui/pull/625 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@simonklee](https://github.com/simonklee) **Base:** `main` ← **Head:** `yoga-setters` --- ### 📝 Commits (2) - [`f4bcdf4`](https://github.com/anomalyco/opentui/commit/f4bcdf483d5a9d8593e0289fc444ce06ba4cfed4) layout: use batched Edge values for margin/padding - [`cc55967`](https://github.com/anomalyco/opentui/commit/cc5596715e8c63e383b6dd71766145766b09d6f6) Merge branch 'main' into yoga-setters ### 📊 Changes **2 files changed** (+24 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/Renderable.ts` (+12 -34) 📝 `packages/core/src/tests/yoga-setters.test.ts` (+12 -0) </details> ### 📄 Description I noticed when reviewing https://github.com/anomalyco/opentui/pull/619 that Yoga supports Edge.All, Edge.Horizontal, and Edge.Vertical to set multiple edges in a single call. Use these instead of calling setMargin or setPadding four times for uniform values or twice for axis values. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:37:23 +03: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
starred/opentui#1451
No description provided.