-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Console error cleanup: fix require cycle warnings (part 1) #52561
[No QA] Console error cleanup: fix require cycle warnings (part 1) #52561
Conversation
…-> Reauthentication.ts -> Authentication.ts
… -> ... -> PolicyUtils.ts
…-> Report.ts -> ReportConnection.ts
…-> TransactionUtils/index.ts chain
…-> Navigation.ts require cycle
@eVoloshchak Please 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] |
VERIFYING: 'VERIFYING', | ||
}; | ||
|
||
export default BankAccountState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe its better to move just to src/CONST.ts
file?
const policyTagsObj = Object.values(Object.values(policyTags).at(0)?.tags ?? {}); | ||
const availableTags = policyTagsObj | ||
.filter((tag) => differentValues.includes(tag.name) && tag.enabled && tag.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) | ||
CategoryActions().then((actions) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right because you are mutating keep
and change
to return them at the end of the function. If this code is wrapped in a promise we will have racing condition problems
} | ||
}); | ||
} else if (fieldName === 'tag') { | ||
TagActions().then((module) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
if (!ReportUtils.isValidReport(report) || !ReportUtils.isReportParticipant(currentUserAccountID ?? -1, report)) { | ||
return; | ||
} | ||
ReportConnection().then((module) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, validReports
is used outside of this wrapped function, this might be a problem
Explanation of Change
This PR is the first part of require cycles fixes. It resolves about 40 different require cycles.
Fixed Issues
$ #51099
PROPOSAL: N/A
Tests
N/A
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
N/A