Skip to content

Add grid layout kind for dashboard-style TUIs#73

Merged
RtlZeroMemory merged 2 commits into
mainfrom
create-grid-layout
Feb 18, 2026
Merged

Add grid layout kind for dashboard-style TUIs#73
RtlZeroMemory merged 2 commits into
mainfrom
create-grid-layout

Conversation

@RtlZeroMemory

@RtlZeroMemory RtlZeroMemory commented Feb 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a new grid VNode kind and ui.grid() factory with GridProps
  • implement CSS Grid-like track sizing (fixed, auto, fr), gaps (gap, rowGap, columnGap), and auto-flow placement
  • add deterministic behavior for explicit row capacity (overflow children are not rendered)
  • add deterministic test coverage with 46 new tests and update layout guide docs

Validation

  • npm run lint
  • npm run typecheck
  • npm run build
  • node scripts/run-tests.mjs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5150dc1b9c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Containers
case "row":
case "column":
case "grid":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Handle grid nodes in container renderer

renderTree now routes vnode.kind === "grid" into renderContainerWidget, but renderContainerWidget has no case "grid" branch and its default branch is a no-op, so grid nodes never push their children for rendering. In any UI that uses ui.grid(...), the grid subtree is dropped from drawlist output (children are not rendered at all), which makes the new layout kind unusable in production.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 773223c.

  • Added grid handling in renderContainerWidget so grid nodes push and render children.
  • Kept stack-direction optimization only for row/column.
  • Added regression test grid renders child text content in widgetRenderSmoke.test.ts.

Validation:

  • npm run lint
  • npm -w @rezi-ui/core run build
  • node --test --test-concurrency=1 packages/core/dist/widgets/tests/widgetRenderSmoke.test.js

@RtlZeroMemory
RtlZeroMemory merged commit 14d5c40 into main Feb 18, 2026
16 of 18 checks passed
@RtlZeroMemory
RtlZeroMemory deleted the create-grid-layout branch February 19, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant