-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[No QA] remove getReportAttributes function #62464
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] remove getReportAttributes function #62464
Conversation
@hoangzinh 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] |
cc @mountiny |
@hoangzinh could you take a look when you have a moment please? 🙏 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@@ -379,15 +390,15 @@ function getReasonAndReportActionThatHasRedBrickRoad( | |||
const transactionThreadReportID = getOneTransactionThreadReportID(report.reportID, reportActions ?? []); | |||
if (transactionThreadReportID) { | |||
const transactionID = getTransactionID(transactionThreadReportID); | |||
const transaction = getTransaction(transactionID); | |||
const transaction = allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`]; |
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.
similarly to report attributes, I think we should get rid of the allTransactions and similar from the utils files as if the transaction changes the component would not re-render
Hi @TMisiukiewicz, I noticed that these changes are already included in this PR. Would you like to split them out and merge this PR as soon as possible to avoid broader usage, or should we just close it? |
@hoangzinh I addressed the comment from @mountiny in #61772 so I am closing this one |
Explanation of Change
Removing
getReportAttributes
function as using it is an antipatternFixed Issues
$ #59350
PROPOSAL:
Tests
n/a
Offline tests
n/a
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
n/a
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop