Repository navigation
refactor(layout): split the layout commands into a module (#3066) - #3089
jgregoriorincon merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewScope: This is a move-only refactor of What I checked:
Bugs: None found. Confidence: high that the move preserves behaviour, based on the reading above. Compile and test results rest on the PR's own claims, which I could not reproduce. Security: None found. The refactor adds no input handling or I/O. Performance: None found. The move adds no runtime work, and the size growth is only the new module headers and imports. Quality (not blocking, for the release quality pass):
AGENTS.md: No breach found. The PR body reports the wasm check, says there is no visible UI change, and states that command ids and the command surface are unchanged. It does not walk through the "Reach every surface" list, but a behaviour-neutral move has nothing to reach, so the gap is minor. Confidence: medium. Prior reviews: The PR has no existing review threads, so I left no earlier concerns out. Inline comments: I posted none, since no finding was specific enough to anchor to a line. Change sizeCompared: the whole PR against main (merge base 9bdf3a9 to PR head 60b363a).
|
|
Both quality points stay as they are.
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
crates/engine/src/cmd/layout.rswas about 7,800 lines, and the parameter help oflayout.addElement,layout.updateandlayout.publicationwas one line per command, so any two changes that added a layout option conflicted. This moves it tocmd/layout.rspluscmd/layout/, one file per area (the shapecmd/designhas).A move, with no behaviour, command, parameter or text change. Generated by a script; review with
git diff --color-moved=dimmed-zebra. The only edits besides moving whole items:pub(in crate::cmd::layout): visible where it was before (the old file), and no further.pubandpub(crate)items are unchanged, and the parents re-export them, so no caller changes.super::in moved code becomescrate::cmd::. The test module added by fix(engine): refuse unread parameters on layout.addElement grid and extentIndicator (#2890) #3060 moves unchanged intoelements.rs, next to the code it tests.concat!, one piece per key; the script asserts each is the same string byte for byte.mod/uselines per file.cargo fmtrewraps the signatures and consts the longer visibility pushed past the line width.#3071 edits the old file; whichever merges second has to move its hunks into the new files.
Testing
cargo fmt, clippy with-D warnings,cargo nextest(9889 passed, 29 skipped), doctests, the layer check andcargo xtask schema --checkall passed. After that a commit removed 22 blank lines the script had added; fmt, clippy on the engine and the 108 layout, command surface and parameter tests passed on it.cargo check -p rustgis-web --target wasm32-unknown-unknownand clippy onrustgis-ui-eguiandrustgis-assistantpassed.command-surface.txtis unchanged, no file outsidecmd/layout*changed, and thepubandpub(crate)items are the same as before.UI evidence
No visible UI change.
Related issue
Closes #3066
Summary by CodeRabbit