-
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
[TS migration] Migrate 'IOUEditRequestReceipt' page to TypeScript #36314
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! |
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is optional chaining really required for chatReportID?
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 function must be used in a bunch of places so not to break any functionality 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.
Okay, I would assume chatReportID is always set. But it's fine
if (!validateReceipt(file)) { | ||
return; | ||
} | ||
|
||
// Store the receipt on the transaction object in Onyx | ||
// On Android devices, fetching blob for a file with name containing spaces fails to retrieve the type of file. | ||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use null coalesce 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.
Can do 👍
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.
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 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(theme.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
iOS: mWeb Safari
Android: mWeb Chrome
iOS: Native
Android: Native
MacOS: Desktop
MacOS: Chrome / Safari