-
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
[TS migration] Migrate 'PolicyUtils.js' lib to TypeScript #28587
[TS migration] Migrate 'PolicyUtils.js' lib to TypeScript #28587
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? :) |
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.
@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 |
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 😄
@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 |
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 think the file PolicyUtils.js
should be renamed to PolicyUtils.ts
in this PR instead only adding PolicyUtils.ts
file.
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.
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 |
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 👍
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
web.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
ios.mov
Android
android.mov