[PR #204] [MERGED] Add support for fixed size container splits. #254

Closed
opened 2026-03-03 16:23:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/204
Author: @nijynot
Created: 5/5/2019
Status: Merged
Merged: 5/12/2019
Merged by: @mum4k

Base: develHead: master


📝 Commits (6)

  • 7c5232b Add support for fixed heights in SplitHorizontal()
  • 4aa60fe Refactor fixed container feature to SplitFixed() which takes one arg
  • 70a5255 Refactor SplitFixed() to use SplitCells
  • b6986c9 Add test and refactor validateOptions()
  • c80b59d Fix pointer and SplitFixed test
  • 957330c Tweak comments and use Default const in validation

📊 Changes

3 files changed (+153 additions, -7 deletions)

View changed files

📝 container/container.go (+7 -0)
📝 container/container_test.go (+91 -0)
📝 container/options.go (+55 -7)

📄 Description

This PR adds support for setting fixed heights to containers that split horizontally.


Examples: Calling

container.SplitHorizontal(
	container.Top(...),
	container.Bottom(...),
	container.FixHeight(3, 15)
)

will set the top container to be 3 in line height and 15 on the bottom container.

To make the containers fill the rest of the space, you set the args to -1, example:

container.SplitHorizontal(
	container.Top(...),
	container.Bottom(...),
	container.FixHeight(3, -1)
)

which will make top container 3 and make the bottom container take up rest of the space that is available.


🔄 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/mum4k/termdash/pull/204 **Author:** [@nijynot](https://github.com/nijynot) **Created:** 5/5/2019 **Status:** ✅ Merged **Merged:** 5/12/2019 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `devel` ← **Head:** `master` --- ### 📝 Commits (6) - [`7c5232b`](https://github.com/mum4k/termdash/commit/7c5232b662c3a4b542803d5baa25510447b87678) Add support for fixed heights in SplitHorizontal() - [`4aa60fe`](https://github.com/mum4k/termdash/commit/4aa60fe8e705023e5b4475e7d3916a297f1b259a) Refactor fixed container feature to `SplitFixed()` which takes one arg - [`70a5255`](https://github.com/mum4k/termdash/commit/70a5255d5e9250d63ef4f59018313cfcba68efc9) Refactor `SplitFixed()` to use SplitCells - [`b6986c9`](https://github.com/mum4k/termdash/commit/b6986c9b4ca67eeda98a88368993a918dd9058af) Add test and refactor `validateOptions()` - [`c80b59d`](https://github.com/mum4k/termdash/commit/c80b59da13bb501d4b46abc7b64081812ca186ae) Fix pointer and SplitFixed test - [`957330c`](https://github.com/mum4k/termdash/commit/957330c3873c9ee88d44725c59a7fc51081a4025) Tweak comments and use Default const in validation ### 📊 Changes **3 files changed** (+153 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `container/container.go` (+7 -0) 📝 `container/container_test.go` (+91 -0) 📝 `container/options.go` (+55 -7) </details> ### 📄 Description This PR adds support for setting fixed heights to containers that split horizontally. --- **Examples:** Calling ``` container.SplitHorizontal( container.Top(...), container.Bottom(...), container.FixHeight(3, 15) ) ``` will set the top container to be `3` in line height and `15` on the bottom container. To make the containers fill the rest of the space, you set the args to `-1`, example: ``` container.SplitHorizontal( container.Top(...), container.Bottom(...), container.FixHeight(3, -1) ) ``` which will make top container `3` and make the bottom container take up rest of the space that is available. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:32 +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/termdash#254
No description provided.