Repository navigation
Conversation
…#3951) edit.fillSeries with type autofill fell through to the step-one addition path and overwrote the seed. It now takes the filled cells at the start of each lane as the seed and extends them as a drag of the fill handle does (2, 4 gives 6, 8, 10, 12).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
Fixes #3951
Root cause
fill::series(crates/engine/src/fill.rs,pub fn series) only branched ongrowthanddate.type: "autofill"fell into the defaultv + steparm, so it behaved as a linear series with step 1 and overwrote the second seed (2, 4 became 2, 3, 4, 5, 6, 7).Fix
In
series,type: "autofill"now takes the filled cells at the start of each lane as the seed and calls the existingfill(..., FillMode::Series)over the lane, so it extends exactly as a fill-handle drag does (2, 4 gives 6, 8, 10, 12). A lane that is empty or entirely filled is left alone. Other types are unchanged.Tests
New
tests::fill_series_autofill_continues_the_seed_pattern(issue repro plus a text seed and undo).Without the fix:
With the fix:
test tests::fill_series_autofill_continues_the_seed_pattern ... ok.Checks run
cargo fmt -p gridcraft-engine -- --check: cleancargo clippy -p gridcraft-engine --all-targets -j 4 -- -D warnings: cleancargo test -p gridcraft-engine -j 4: 959 + 120 + 7 passed, 0 failedNot run
cargo xtask ci(layers, wasm, assets), other crates, and a comparison against real Excel. A single-cell seed copies the value (as a drag does); I did not check this against Excel.