-
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 '[Remaining Group 2]' lib to TypeScript #32164
[TS migration] Migrate '[Remaining Group 2]' lib to TypeScript #32164
Conversation
# Conflicts: # src/libs/actions/Card.js
const loggedInEmail = OptionsListUtils.addSMSDomainIfPhoneNumber(sessionEmail); | ||
const reportCreationData: ReportCreationData = {}; | ||
|
||
const expenseChatData = ReportUtils.buildOptimisticChatReport([sessionAccountID], '', CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT, policyID, sessionAccountID, true, policyName); |
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.
maybe you can add type to this const?
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.
@kubabutkiewicz it's typed automatically, do you think it makes sense to type it additionally?
|
||
const expenseChatData = ReportUtils.buildOptimisticChatReport([sessionAccountID], '', CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT, policyID, sessionAccountID, true, policyName); | ||
const expenseChatReportID = expenseChatData.reportID; | ||
const expenseReportCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(sessionEmail); |
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.
and 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.
@kubabutkiewicz it's typed automatically, see my comment
# Conflicts: # src/libs/ReportUtils.ts
# Conflicts: # src/types/onyx/ReportAction.ts
@BartoszGrajdek Thank you, updated 🙂 |
# Conflicts: # src/libs/ReportUtils.ts
# Conflicts: # src/libs/ReportUtils.ts
@BartoszGrajdek kind bump 🙂 |
# Conflicts: # src/types/global.d.ts
@grgia kind bump 🙂 |
package-lock.json
Outdated
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.
Should we push these in this 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.
Yes, because @types/canvas-size
was added in this PR 😄
# Conflicts: # src/libs/actions/TeachersUnite.js
What's the "Updates from main branch" commit? I don't want to be picky, but messed-up merges have been a source of regressions in the past. Shouldn't this be just a single merge commit? |
@cubuspl42 The original JS file, which had updates in the main branch, was removed in favor of TS one during migration. So another commit applies updates from the JS file to the TS file so as not to miss updated functionality |
# Conflicts: # src/libs/PolicyUtils.ts # src/types/onyx/Policy.ts
@grgia kind bump 🙂 |
Oh, I get it. Great that you caught those changes. |
Merging with license tests failing which is expected with package-lock changes: https://github.com/Expensify/App/pull/32164/files/4de7a5ed23c231251f1bee824c46bac35892efa1#r1442385933 |
✋ 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/grgia in version: 1.4.24-0 🚀
|
@VickyStash We need some help in validating this PR:
|
@kavimuru Small note: in screenshots/recordings section, you can find material for every feature per platform (if it's possible to test it on the platform) split by feature name. It looks like
Event which you can try to pass to the console:
Please, let me know if something is still not clear, I'll try to help! |
@VickyStash Thanks for the explanation. We will try with your instructions. But still I want to make sure if we can use dummy data for "teachers unite" section. |
@kavimuru I think you can use dummy data on non production environments, since after this PR was merged it shouldn't affect real users. |
@VickyStash Thanks for confirming. |
This appears to be causing type errors on main
EDIT: This may actually be because of a change I am reverting nvm |
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.24-3 🚀
|
Details
This PR migrates next lib files to TS:
Fixed Issues
$ #31922
PROPOSAL: N/A
Tests
TransactionEdit
TeachersUnite
OnyxUpdateManager
Confirm that the app continues to work as expected on normal flows:
Besides that, you can use
Onyx.set('onyxUpdatesFromServer', {INVALID_FORMAT_FROM_LIST_BELOW});
in the console to set that property to an invalid format and confirm it will log[OnyxUpdateManager] Invalid format found for updates, cleaning and unpausing the queue
you can test the following wrong formats:
DemoActions
Card
CanvasSize
On Mobile Web it gives next error (same on the
main
branch):MemoryOnlyKeys
enableMemoryOnlyKeys()
from the JS console[MemoryOnlyKeys] enabled
disableMemoryOnlyKeys()
from the JS console[MemoryOnlyKeys] disabled
Offline tests
N/A
QA Steps
Same as in Tests section
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(themeColors.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
Android: Native
- TransactionEdit.js
android_transaction1.mp4
android_transaction2.mp4
- TeachersUnite.js
android_teacher2.mp4
android_teacher1.mp4
- OnyxUpdateManager.js
android_onyxUpdateManager.mp4
- Card.js
android_card.mp4
- CanvasSize.js
android_canvas.mp4
Android: mWeb Chrome
- TransactionEdit.js
android_web_transaction.mp4
- TeachersUnite.js
android_web_teacher2.mp4
android_web_teacher1.mp4
- OnyxUpdateManager.js
android_web_onyx.mp4
- DemoActions.js
- Card.js
android_web_card.mp4
iOS: Native
- TransactionEdit.js
ios_transaction.mp4
- TeachersUnite.js
ios_teacher2.mp4
ios_teacher1.mp4
- OnyxUpdateManager.js
ios_OnyxManager.mp4
- Card.js
ios_card.mp4
- CanvasSize.js
ios_canvas.mp4
iOS: mWeb Safari
- TransactionEdit.js
ios_web_transaction.mp4
- TeachersUnite.js
ios_web_teacher2.mp4
ios_web_teacher1.mp4
- OnyxUpdateManager.js
ios_onyxManager.mp4
- DemoActions.js
- Card.js
ios_web_card.mp4
MacOS: Chrome / Safari
- TransactionEdit.js
web_transaction_edit.mp4
- TeachersUnite.js
web_teacher2.mp4
web_teacher1.mp4
- OnyxUpdateManager.js
web_onyxManager.mp4
- DemoActions.js
- Card.js
web_card.mp4
- CanvasSize.js
web_Canvas.mp4
- MemoryOnlyKeys folder
MacOS: Desktop
- TransactionEdit.js
desktop_transactionEdit.mp4
- TeachersUnite.js
desktop_teacher2.mp4
desktop_teacher1.mp4
- OnyxUpdateManager.js
desktop_onyxManager1.mp4
- Card.js
desktop_card.mp4
- CanvasSize.js
desktop_canvas.mp4
- MemoryOnlyKeys folder