Add grid layout kind for dashboard-style TUIs#73
Conversation
There was a problem hiding this comment.
💡 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": |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
Fixed in 773223c.
- Added
gridhandling inrenderContainerWidgetso grid nodes push and render children. - Kept stack-direction optimization only for row/column.
- Added regression test
grid renders child text contentinwidgetRenderSmoke.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
Summary
gridVNode kind andui.grid()factory withGridPropsauto,fr), gaps (gap,rowGap,columnGap), and auto-flow placementValidation