[TS migration] Migrate 'IOUEditRequestReceipt' page to TypeScript#36314
[TS migration] Migrate 'IOUEditRequestReceipt' page to TypeScript#36314MonilBhavsar merged 71 commits intoExpensify:mainfrom
Conversation
|
Hi @codinggeek2023 can you fix ts check, lint and do a PR author checklist? |
|
hello @kubabutkiewicz , thanks for responding, i will do it ASAP, i am getting some error while converting a HOC into typescript, can you please help me out over here :), i'll comment over the HOC |
|
Hello @kubabutkiewicz , please review the PR when you find time :), i have pushed the latest changes |
|
@codinggeek2023 hi I will review it today, can you also fill the PR Author Checklist? |
src/pages/iou/request/step/IOURequestStepScan/IOURequestStepProps.tsx
Outdated
Show resolved
Hide resolved
src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.tsx
Outdated
Show resolved
Hide resolved
src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.tsx
Outdated
Show resolved
Hide resolved
|
@codinggeek2023 there is still typescript check failing and also a lint |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #32000 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
| function setMoneyRequestParticipantsFromReport(transactionID: string, report: OnyxEntry<OnyxTypes.Report>) { | ||
| // If the report is iou or expense report, we should get the chat report to set participant for request money | ||
| const chatReport = ReportUtils.isMoneyRequestReport(report) ? ReportUtils.getReport(report.chatReportID) : report; | ||
| const chatReport = ReportUtils.isMoneyRequestReport(report) ? ReportUtils.getReport(report?.chatReportID) : report; |
There was a problem hiding this comment.
Is optional chaining really required for chatReportID?
There was a problem hiding this comment.
This function must be used in a bunch of places so not to break any functionality here :)
There was a problem hiding this comment.
Okay, I would assume chatReportID is always set. But it's fine
| // So, let us also save the file type in receipt for later use during blob fetch | ||
| IOU.setMoneyRequestReceipt(transactionID, file.uri, file.name, action !== CONST.IOU.ACTION.EDIT, file.type); | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| IOU.setMoneyRequestReceipt(transactionID, file?.uri ?? '', file.name || '', action !== CONST.IOU.ACTION.EDIT, file.type); |
There was a problem hiding this comment.
Why not use null coalesce here?
There was a problem hiding this comment.
Ok thanks! I wonder if || was added for any specific case where we could not use ??
|
@codinggeek2023 Typecheck is failing, please have a look |
|
Fixed the typecheck, i guess one more component was migrated to TS so the error again, otherwise the tests were passing :) thanks @blazejkustra |
|
@MonilBhavsar can you please put a |
|
Good idea! There are conflicts now. Can you please resolve it. I can generate a build then |
|
Fixed the conflicts, letss build @MonilBhavsar 💪 |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
|
Build is ready, what are next steps here @codinggeek2023 @MonilBhavsar ? Need any help? |
|
Let's merge this one, I was not able to test on Native IOS it says |
|
✋ 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/MonilBhavsar in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Fixed Issues
$ #32000
PROPOSAL: #32000 (comment)
Tests
Same as QA step
Offline tests
Same as QA step
QA Steps
The photo should be clicked successfully and we should be able to go to the confirmation page
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.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
iOS: mWeb Safari
Android: mWeb Chrome
iOS: Native
Android: Native
MacOS: Desktop
MacOS: Chrome / Safari