-
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] chore: remove displayName and errors from Report type #52395
[No QA] chore: remove displayName and errors from Report type #52395
Conversation
@shubham1206agra 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] |
@@ -6472,13 +6473,11 @@ function getAllReportActionsErrorsAndReportActionThatRequiresAttention(report: O | |||
* Get an object of error messages keyed by microtime by combining all error objects related to the report. | |||
*/ | |||
function getAllReportErrors(report: OnyxEntry<Report>, reportActions: OnyxEntry<ReportActions>): Errors { | |||
const reportErrors = report?.errors ?? {}; |
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.
@puneetlath Sorry, but I do not get reason for either remove or add errors
field. Since it was probably added for consistency for other offline type data.
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.
Is it used anywhere. From what I can see, we use report.errorFields not report.errors.
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.
I am not sure if the errors field is used anywhere. This is generally set in BE. So, its not a calculative property. And I can safely keep it so we can run multiSet on it in future without any regression.
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.
@puneetlath Can you answer this?
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.
Right, as I mentioned here, I don't see any where on the back-end where we are sending to report.errors. I only see us sending to report.errorFields.
@shubham1206agra is this good? |
@puneetlath Give me a minute. Let me test this for crashes. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.0.64-0 🚀
|
Explanation of Change
This PR moves
displayName
fromReport
toOptionData
and entirely removeserrors
property fromReport
, as both of there properties are not used with reports.Fixed Issues
$ #51867
PROPOSAL: #51867 (comment)
Tests
Typescript and test jobs should be green
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