[No QA]: fix variable names, test name & improvement#74776
Conversation
|
@dubielzyk-expensify @DylanDylann One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
Failed TypeCheck on main, @NJ-2020, please remember to sync the latest main when It is fixed |
|
No product considerations, removing my review |
neil-marcellini
left a comment
There was a problem hiding this comment.
Thanks for the follow up! Here are a couple more suggestions to make this perfect.
| visitedLists.add(currentFieldName); | ||
| visitedFields.add(currentFieldName); | ||
|
|
||
| // Extract all formula values from the current field |
There was a problem hiding this comment.
Pls update the comment too formula values => formula parts.
| for (const formula of currentFormulaValues) { | ||
| const part = parsePart(formula); | ||
| for (const part of currentFormulaParts) { | ||
| const partDefinition = parsePart(part); |
There was a problem hiding this comment.
Can we switch around the variable naming here? For example, I would like this variable to be named part because its the actual part object. And then the variable above could be named currentFormulaPartDefinitions.
There was a problem hiding this comment.
The definition is the raw string value {report:id}, the "part" is the parsed object.
neil-marcellini
left a comment
There was a problem hiding this comment.
Thanks for the update. Unfortunately it's not quite what I was thinking. Sorry if my last requests were unclear. I will explain in more detail this time.
| function hasCircularReferences(fieldValue: string, fieldName: string, fieldList?: FieldList): boolean { | ||
| const formulaValues = extract(fieldValue); | ||
| if (formulaValues.length === 0 || isEmptyObject(fieldList)) { | ||
| const formulaParts = extract(fieldValue); |
There was a problem hiding this comment.
Call this formulaPartDefinitions
| // Extract all formula parts from the current field | ||
| const currentFormulaParts = extract(currentFieldValue); |
There was a problem hiding this comment.
Say "Extract all formula part definitions" in the comment, and then name the variable currentFormulaPartDefinitions.
| for (const currentFormulaPartDefinitions of currentFormulaParts) { | ||
| const part = parsePart(currentFormulaPartDefinitions); |
There was a problem hiding this comment.
for (const formulaPartDefinition of currentFormulaPartDefinitionss) {
const part = parsePart(formulaPartDefinition);
Sorry about that, updated. Thanks |
neil-marcellini
left a comment
There was a problem hiding this comment.
Good to go, thank you!
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.2.59-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.2.59-5 🚀
|
Explanation of Change
Follow up PR for this point
Fixed Issues
$ #70775
PROPOSAL: #70775 (comment)
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop