-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[NoQA] Clean up report state and status #33810
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-01-14.at.12.43.27.AM.movAndroid: mWeb ChromeScreen.Recording.2024-01-14.at.12.42.41.AM.moviOS: NativeScreen.Recording.2024-01-14.at.12.41.44.AM.moviOS: mWeb SafariScreen.Recording.2024-01-14.at.12.40.40.AM.movMacOS: Chrome / Safariscreen-recording-2024-01-14-at-123643-am_kH3hjc0q.mp4MacOS: DesktopScreen.Recording.2024-01-14.at.12.39.14.AM.mov |
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.
Looks good! I searched the rest of the codebase and didn't find any missed swaps, and the logic here makes sense.
| 'stateNum' | ||
| 'statusNum' |
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.
NAB - I'm assuming this move was just to make it more consolidated? Since it was originally down there at L309
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.
Yep just for consistency
@allroundexperts Added you as a reviewer so we can get those tests! |
On it today! |
Getting a lot of the following @mountiny: |
@allroundexperts Fixed the conflicts and I think also the type warning. Could you please resume testing? there might be lots of conflicts coming in here |
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.
Tests well!
🎯 @allroundexperts, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #34478. |
src/pages/home/ReportScreen.js
Outdated
@@ -187,7 +187,8 @@ function ReportScreen({ | |||
|
|||
// There are no reportActions at all to display and we are still in the process of loading the next set of actions. | |||
const isLoadingInitialReportActions = _.isEmpty(reportActions) && reportMetadata.isLoadingInitialReportActions; | |||
const isOptimisticDelete = lodashGet(report, 'statusNum') === CONST.REPORT.STATUS.CLOSED; | |||
|
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.
NAB: I don't think adding a blank line here is necessary but not a huge deal
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.
Updated
✋ 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 production by https://github.com/marcaaron in version: 1.4.26-2 🚀
|
Details
This is a clean up PR to clean up the use of report state and status numbers.
I am also reporting the Report.State const which gives report a string expression of the state, which is however not used and its not even returned from the server. The state is correctly determined as a combination of the stateNum and statusNum so having this variable around is just confusing.
I have unified the second (value
1
) state and status on SUBMITTED as its sometimes referred to as processing but having one name will hopefully clarify stuff.Lastly for Approved state we have been incorrectly using Submitted name. That has been fixed here too
Fixed Issues
N/A
Tests
Nothing specific, this should have no effect if nothing was overlooked since its mainly just renaming variables and removing one const that is unused.
The full staging regression will catch if there is any issue with these code changes
Offline tests
N/A
QA Steps
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
Adding only web screenshot, there should not be issues but C+ will also verify.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop