Repository navigation
refactor(map): split layout.rs into a layout module (#3069) - #3072
jgregoriorincon merged 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewPure file split of Bugs: None found.
Security: None. Performance: None. Runtime code is unchanged. Quality (non-blocking, for the release quality pass):
AGENTS.md: None. The PR states "No visible UI change", and nothing here stores or copies layer data, so no memory multiple is needed. It also says the command surface, schema and wasm builds are unaffected; I could not run those checks. Prior reviews: There were no existing review threads, so no earlier concerns were left alone. Change sizeCompared with the base branch (merge base 3fc52bc to PR head 87e239f). The whole PR, not the latest push.
|
📖 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 |
|
On the three quality notes; no change in this PR:
|
Summary
crates/map/src/layout.rs(5,516 lines) is now a module:layout.rs(750 lines) keeps the page (Layout,Element, guides, series) and the helpers several families share, andlayout/holds one file per family (elements,frame,grid,text,legend,lines,north,scale_bar,colorbar,chart,stats) and the existing tests, as they were, intests.rs. Changes to different layout elements no longer have to edit the same file.This is a move with no change in behaviour: desktop, browser, CLI, Python, ribbon, assistant, undo and the project format are unchanged. No file outside the module changes.
pub(super), which keeps them visible to the same code as before, and whatcargo fmtrewraps after that and after the tests lose one level of indentation.layout.rsre-exports each file with a glob, so everyrustgis_map::layout::…andcrate::layout::…path stays the same.ElementKindis one enum and moves as one: splitting it by variant would be a refactor.Review with
git diff --color-moved=dimmed-zebra.The move was generated by the script below, which stops on an item it does not know and checks, before formatting, that every moved segment is byte-identical to the original.
partir_map_layout.py
Testing
pubandpub(crate)declarations before and after, and the same 52 tests in the module.cargo fmt --all -- --check,cargo clippy -p rustgis-map --all-targets -- -D warnings,cargo nextest run --workspaceleaving out two DuckDB tests that fail on this machine (9,879 passed, 29 skipped), doctests,cargo xtask layers,cargo xtask schema --check.cargo check -p rustgis-web --target wasm32-unknown-unknown.UI evidence
No visible UI change.
Related issue
Closes #3069
Summary by CodeRabbit