-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] Change reportID type from number to string #11362
Conversation
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 are failing. Overall changes look good to me, but I added a question that might be mostly because I don't fully understand props on ReactNative.
src/pages/reportPropTypes.js
Outdated
reportName: PropTypes.string, | ||
|
||
/** ID of the report */ | ||
reportID: PropTypes.string.isRequired, |
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.
Question: since reportID is required here, won't it break the usages where reportID was not required (or even existed) in the props where it was not necessary? files?
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.
Yeah, so I ended up removing the .isRequired
here, however, I not sure what you mean by "files". A report cannot exist in Onyx without a reportID since the collection is keyed by reportID (but not all reports going to the props comes straight from Onyx either).
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 mean other JS files like src/pages/home/report/ReportActionsList.js, that was not requiring reportID.
But I think removing isRequired
solves it! Thanks!
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.
LGTM
@danieldoglas looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
not emergency |
✋ 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 @danieldoglas in version: 1.2.11-0 🚀
|
I think this PR may have missed these places:
There are some |
Ah, I did totally miss I did intentionally skip the others, yes, since it looked like those APIs had not been migrated over to NewDot APIs yet in PHP. I didn't want to make any changes on the old API endpoints. |
Ok! I'll do it |
🚀 Deployed to production by @AndrewGable in version: 1.2.11-4 🚀
|
…ngs-0 [No QA] Change reportID type from number to string
Fixed Issues
Part of https://github.com/Expensify/Expensify/issues/227425
Tests
There are a few propType warnings that happen regarding the IOU chat reportIDs, but that API is not fully migrated over to an OfflineFirst world, so those will be fixed later when it's migrated.
QA Steps