[TS migration] Migrate 'PolicyUtils.js' lib to TypeScript#28587
[TS migration] Migrate 'PolicyUtils.js' lib to TypeScript#28587AndrewGable merged 14 commits intoExpensify:mainfrom
Conversation
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #24867 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Please write QA steps |
|
Callstack asked to change it to draft, so I'm doing that for now |
|
Updated! WDYT @fabioh8010? :) |
fabioh8010
left a comment
There was a problem hiding this comment.
@BartoszGrajdek Did some review, but I'll come back to this later. I think our PolicyTag / PolicyTags structure is incorrect, there is something odd..
|
FYI I will be on vacations starting tomorrow for the next two weeks and will return on Oct 23, so @kubabutkiewicz will replace me on this PR review! |
|
@kubabutkiewicz let me know WDYT :) |
|
@BartoszGrajdek Left two comments, other than that LGTM 😄 |
|
Done! @kubabutkiewicz |
|
@BartoszGrajdek Could you add the test case you use in this PR? Thanks! |
|
@mollfpr for libs & utils we were just supposed to test the main functionalities like sending messages, adding some tasks and sending money requests |
mollfpr
left a comment
There was a problem hiding this comment.
I think the file PolicyUtils.js should be renamed to PolicyUtils.ts in this PR instead only adding PolicyUtils.ts file.
AndrewGable
left a comment
There was a problem hiding this comment.
Please write QA steps
|
@BartoszGrajdek Mostly, the changes look good! I'll record the test after the conflict is resolved, thank you! |
|
@mollfpr done! |
Reviewer Checklist
Screenshots/VideosWeb28587.Web.mp4Mobile Web - Chrome28587.mWeb-Chrome.mp4Mobile Web - Safari28587.mWeb-Safari.mp4Desktop28587.Desktop.mp4iOS28587.iOS.mp4Android28587.Android.mp4 |
mollfpr
left a comment
There was a problem hiding this comment.
LGTM 👍
All yours @AndrewGable
|
✋ 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/AndrewGable in version: 1.3.93-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.93-1 🚀
|
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.94-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.94-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.94-2 🚀
|
| * Check if the policy has any error fields. | ||
| */ | ||
| function hasPolicyErrorFields(policy: OnyxEntry<Policy>): boolean { | ||
| return Object.keys(policy?.errorFields ?? {}).some((fieldErrors) => Object.keys(fieldErrors ?? {}).length > 0); |
There was a problem hiding this comment.
This has caused regression in #32513 , we should have used Object.values, more context here #32513 (comment)
Details
Migrate 'PolicyUtils.js' lib file to TypeScript
Fixed Issues
$ #24867
Tests
Since this is a lib file test main application functionalities so check:
Offline tests
QA Steps
Since this is a lib file test main application functionalities so check:
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
ios.mov
Android
android.mov