Introduce native CSS-style Grid for the editor layout - #950
Open
Michael Greene (mgreenegit) wants to merge 1 commit into
Open
Michael Greene (mgreenegit) wants to merge 1 commit into
Michael Greene (mgreenegit) wants to merge 1 commit into
Conversation
Michael Greene (mgreenegit)
marked this pull request as ready for review
September 11, 2026 21:55
Leonard Hecker (lhecker)
requested changes
Sep 16, 2026
Leonard Hecker (lhecker)
left a comment
Member
There was a problem hiding this comment.
I don't believe this is the right direction. My intention was to implement CSS grid & flexbox support in the near term (or at least a subset of those). Like this: https://jsfiddle.net/vkubqc4d/
Michael Greene (mgreenegit)
force-pushed
the
fix/editor-height-small-viewports
branch
from
September 17, 2026 14:00
53b2842 to
9321dee
Compare
Michael Greene (mgreenegit)
marked this pull request as draft
September 17, 2026 15:04
Michael Greene (mgreenegit)
force-pushed
the
fix/editor-height-small-viewports
branch
from
September 21, 2026 17:08
6f675bd to
3c158ef
Compare
Michael Greene (mgreenegit)
force-pushed
the
fix/editor-height-small-viewports
branch
3 times, most recently
from
September 21, 2026 19:14
fe7c700 to
b052ba2
Compare
Michael Greene (mgreenegit)
marked this pull request as ready for review
September 21, 2026 22:08
This was referenced Sep 22, 2026
Michael Greene (mgreenegit)
added a commit
to mgreenegit/edit
that referenced
this pull request
Sep 22, 2026
Include the Grid prerequisite from microsoft#950 and route existing table declarations through the durable shared engine. Preserve interactive boxed rows, intrinsic sizing, gaps, and navigation with generic Grid properties. Application caller migration remains in microsoft#962. 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
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>
Michael Greene (mgreenegit)
force-pushed
the
fix/editor-height-small-viewports
branch
2 times, most recently
from
September 22, 2026 15:18
6ce4461 to
0540de4
Compare
Add typed tracks and bounded placement, adopting Grid for the editor viewport. Keep item placement in a private helper extended by the subsequent table-unification slice, preserving constrained alignment and interaction regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Michael Greene (mgreenegit)
force-pushed
the
fix/editor-height-small-viewports
branch
from
September 22, 2026 15:36
0540de4 to
a23b7ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce a dependency-free, CSS-style Grid primitive and use it for the viewport/editor layout, replacing the editor's manual height subtraction. This is a first replacement slice, not an enhancement to the legacy table engine.
This pull request was drafted by a large language model (LLM).
Scope
display: grid, independent row/column templates, and flat row-major child placement.Autotracks, fixed terminal-cell sizes, and integer fractional tracks.Fraction(n)meansminmax(0, nfr), so editor content can shrink inside its viewport.The equal-pane declaration is:
Templates are typed Rust, not parsed stylesheets. Intrinsic measurement remains Edit's existing model, not browser min/max-content sizing. This does not claim full CSS Grid compliance.
Migration boundary
Legacy tables, their APIs, and menu/dialog declarations remain unchanged. Their layout path temporarily coexists with Grid; this PR does not claim to remove it. Shared collapsed-rectangle handling keeps zero-sized grid descendants valid.
The follow-up #961 unifies the engine using boxed column subgrids with preserved row focus, highlighting, and hitboxes. #962 then migrates the remaining callers and removes the table API without changing that shared engine. These interaction and migration contracts are intentionally outside this first main-view slice.
Review/merge order: #950 -> #961 -> #962. Both follow-ups link exact incremental comparisons because their full Files changed tabs include the unmerged prerequisites.
Each PR contains one commit. The follow-ups link content-identical review snapshots to isolate their incremental scope.
Review and validation
Five files: 254 changed production/documentation/registration lines, plus 343 test lines (597 total, down from 604). A private item-placement helper adds three lines versus the previous revision but reduces replacement in #961; the TUI-only pass removes 16 incremental changed lines across the series. Collapse/override fixtures share setup; alignment cases reuse a TUI.
Latest local validation: six Grid tests and two application layout tests pass, along with formatting, pre-commit workspace Clippy, and scoped structural checks. Test files are unchanged by the TUI-only pass.
Final-head Windows/Ubuntu CI and CodeQL pass at
a23b7ac.Regressions cover both-axis placement, intrinsic and fractional sizing, rounding, nested/padded and collapsed grids, floats, constrained alignment, repeated viewport resizing, editor typing/scrolling/search focus, and legacy menu highlighting and trailing-edge mouse activation under a grid ancestor. The shared interaction scenario checks typing after resize, closing Search, and closing a menu, for both empty and long documents.
An independent read-only review found no concrete correctness blocker. Its requested grid/legacy-menu interaction regression and subset documentation are included.