-
Notifications
You must be signed in to change notification settings - Fork 3k
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][TS migration] Migrate 'models' lib to TypeScript #27667
[No QA][TS migration] Migrate 'models' lib to TypeScript #27667
Conversation
@thesahindia 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] |
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 see that json
and accountJSON
has good detailed types. I am not sure that all those 1-line methods should have return types.
@fvlvte this issue is not ready for cross-review (removing it from spreadsheet for now). Please attach some videos / screenshots from your side. Thank you! 🙇🏼♂️ |
Sorry - updated @BartoszGrajdek |
Reviewing... |
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, SWM still need to do the checklist.
LGTM! |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromechrome.movMobile Web - Safarisafari.movDesktopdesktop.moviOSios.movAndroidandroid.mp4 |
# Conflicts: # src/types/onyx/BankAccount.ts
# Conflicts: # src/libs/models/BankAccount.js # src/types/onyx/BankAccount.ts
5a410c0
to
b99bb38
Compare
@BartoszGrajdek can I ask for re-review? i've resolved conflicts on main branch and staled review |
@fvlvte Could you update this PR so I can ask Expensify to review and merge it? |
Sure, can do it now @fabioh8010 |
# Conflicts: # src/libs/models/BankAccount.ts
@thesahindia Could you review it again so we can get this merged quicker? 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.
Just approving to pull up engineer for final review
Not sure why it didn't trigger the assignment when I approved the PR. |
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. Some NAB comments.
import CONST from '@src/CONST'; | ||
import BankAccountJSON, {AdditionalData} from '@src/types/onyx/BankAccount'; |
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 would rather not call this BankAccountJSON
because that makes me think it's a string that needs to be parsed. Would you please instead match the name here with the type declaration BankAccount
?
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.
Oh I do see that it's already called json in this class even though it's an object. I still like the name change.
bankAccountID: number; | ||
state: State; | ||
validateCodeExpectedDate: string; | ||
needsToUpgrade: boolean; |
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: Can we make this optionally have additionalData
?
}, | ||
this.getAdditionalData(), | ||
); | ||
toACHData(): Partial<ACHData> { |
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 really understand why we need Partial
here? Aren't we filling in all required fields?
@fvlvte I'm going to go ahead and merge this since it's been open for a while. Please create a follow up PR if you want to address the NAB comments. |
✋ 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/mountiny in version: 1.4.6-2 🚀
|
Details
Migrated src/libs/modules to TypeScript.
Fixed Issues
$ #24871
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
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
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-ff.mov
Mobile Web - Chrome
web-chrome.mov
Mobile Web - Safari
web-safari.mov
Desktop
electron.mov
iOS
ios17.mov
Android
android.mov