Skip to content

tui: unify layout through boxed Grid subgrids - #961

Open
Michael Greene (mgreenegit) wants to merge 1 commit into
microsoft:mainfrom
mgreenegit:fix/unify-grid-table-layout
Open

Michael Greene (mgreenegit) wants to merge 1 commit into
microsoft:mainfrom
mgreenegit:fix/unify-grid-table-layout

Conversation

@mgreenegit

@mgreenegit Michael Greene (mgreenegit) commented Sep 22, 2026

Copy link
Copy Markdown
Member

Review boundary

Second slice: the lasting shared layout engine, with application callers unchanged. Review/merge order: #950 -> #961 -> #962.

Review only this slice: 494 additions / 198 deletions across two files (692 changed lines, down from 742). The comparison uses a content-identical linear review snapshot; this PR itself retains one cumulative commit against main, including unmerged #950.

Changes

  • Replace the separate table engine with thin declarations over Grid.
  • Boxed column subgrids share tracks while preserving row IDs, full-width backgrounds/hitboxes, borders, padding, and focus.
  • Add intrinsic tracks, implicit sizing, gaps, item alignment, and layout-independent arrow traversal. Preserve existing Grid defaults and descendant input priority.
  • Keep the final engine and generic tests here; tui: migrate remaining layouts to Grid #962 migrates callers and removes wrappers without replacing either.
  • Extend Introduce native CSS-style Grid for the editor layout #950's private item-placement helper; compute only the horizontal insets shared columns consume. The TUI-only pass reduces this slice by 19 changed lines without changing tests.

This is a terminal Grid subset: subgrids occupy a complete parent row; nested column subgrids and arbitrary spans are unsupported. Ordinary nested grids work. Row borders/padding contribute to sizing and clip cells to row interiors.

This pull request was drafted by a large language model (LLM).

Validation

  • Latest local validation: nine Grid tests and two application layout tests pass, along with formatting, pre-commit workspace Clippy, and scoped structural checks.
  • Final-head Windows/Ubuntu CI and CodeQL pass at d333592.
  • One combined geometry fixture checks minimum/implicit columns, gaps, empty/ragged rows, floats, cell and row borders, clipping, unequal heights, and collapse/re-expansion. Separate tests retain mixed flat/shared rows, alignment, navigation, input priority, and menu hitboxes.

No dependencies, Flexbox, stylesheet parser, console, provider, or AI changes.

@mgreenegit
Michael Greene (mgreenegit) marked this pull request as ready for review September 22, 2026 02:04
@mgreenegit
Michael Greene (mgreenegit) marked this pull request as draft September 22, 2026 02:30
@mgreenegit Michael Greene (mgreenegit) changed the title tui: unify table and Grid layout tui: share bounded cell placement between Grid and tables Sep 22, 2026
@mgreenegit Michael Greene (mgreenegit) changed the title tui: share bounded cell placement between Grid and tables tui: unify table and Grid layout Sep 22, 2026
@mgreenegit Michael Greene (mgreenegit) changed the title tui: unify table and Grid layout tui: unify layout through boxed Grid subgrids Sep 22, 2026
@mgreenegit
Michael Greene (mgreenegit) marked this pull request as ready for review September 22, 2026 14:51
Michael Greene (mgreenegit) added a commit to mgreenegit/edit that referenced this pull request Sep 22, 2026
Include the Grid prerequisites from microsoft#950 and microsoft#961, migrate all remaining table callers to explicit Grid declarations, and remove the compatibility API. Preserve shared engine algorithms and generic regressions from the second slice while checking dialog and file-picker focus restoration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Michael Greene (mgreenegit) added a commit to mgreenegit/edit that referenced this pull request Sep 22, 2026
Add typed row and column tracks with shared sizing and bounded placement, and adopt Grid for the viewport and editor. Cover layout geometry, resizing, focus, and existing menu interaction without changing legacy table callers. First slice of microsoft#950, microsoft#961, and microsoft#962.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route existing table declarations through the lasting shared engine. Extend the first slice item-placement helper and compute only the horizontal insets needed by shared columns, retaining geometry and navigation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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