Rework code/formula translation & name-updating#2354
Conversation
|
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
03f1a89 to
89df9fa
Compare
89df9fa to
9942fd1
Compare
Preview - Build & Deploy Images✅ Build images 🕒 Last deployed: Mar 24, 2025 at 05:20 PM UTC 🔗 URL: https://ajf-refactor-update-code-cell-references.quadratic-preview.com |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## qa #2354 +/- ##
==========================================
+ Coverage 88.47% 90.40% +1.92%
==========================================
Files 382 382
Lines 85129 85354 +225
==========================================
+ Hits 75316 77161 +1845
+ Misses 9813 8193 -1620 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…e-cell-references
|
|
||
| /// Constructs an A1 context with only a single sheet. | ||
| pub fn with_single_sheet(sheet_name: &str, sheet_id: SheetId) -> Self { | ||
| let mut ret = Self::default(); |
There was a problem hiding this comment.
What does ret stand for here?
There was a problem hiding this comment.
"return value"
I avoid "res" or "result" because Result has special meaning in rust
I'm happy to change this variable if you have another name in mind
ddimaria
left a comment
There was a problem hiding this comment.
@AyushAgrawal-A2 just one comment to address before merging
This PR overhauls sheet/table/column renaming and coordinate translation in formulas and code cells.
Intended behavior
These actions should preserve all cell references:
These actions should update only relative references in code & formulas to all sheets:
These actions should update all references in code & formulas to the sheet where they occur:
References should be updated even in cells that are not in the current sheet. References (including invalid ones) should remain unmodified.
Let me know via comment here or on Slack if I've made any mistakes in the intended behavior.
Code review
For code review, check that there are no extraneous calls to
Grid::a1_context().