[No QA] Fix Batch 1 of React Compiler warnings#79597
Conversation
Resolved conflicts in: - TransactionListItem.tsx: Kept new mergeProhibitedViolations and fallback logic, removed useMemo - AddUnreportedExpense.tsx: Used new AddUnreportedExpenseFooter component, removed useMemo - NewReportWorkspaceSelectionPage.tsx: Kept new changeTransactionsReport API, removed useCallback/useMemo - ProfilePage.tsx: Used currentUserAccountID from hook, removed useMemo
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Resolved conflict in LoginUtils.ts by keeping both normalizeLogin (from our branch) and sanitizePhoneOrEmail (from main).
This comment was marked as off-topic.
This comment was marked as off-topic.
Resolve conflict in TransactionListItem.tsx: - Keep new policyID fallback logic for self DM tracking expenses - Keep new policyCategories fetch and syncMissingAttendeesViolation - Remove useMemo wrappers to trust React Compiler
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Expense - Report field in IOU expense shows IOU, Report field in self DM is blankIf you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel! Version Number: v9.3.2-0 PR:79597 Action Performed:
Expected Result:BUG 1: Report field will show "User owes x". Actual Result:BUG 1: Report field shows IOU instead of "User owes x". Workaround:Unknown Platforms:
Screenshots/VideosBug7049847_1768474118357.12.mp4 |
|
This issue is still reproducible in the current build. |
Resolve conflicts: - SearchSidebar.tsx: Keep without useMemo import - TransactionListItem.tsx: Use currentSearchResults from SearchContext instead of snapshot, add exportedReportActions, all without useMemo - WorkspaceReportsPage.tsx: Keep without useMemo/useCallback, add type fallback for reportField.type
|
these issues are reproducible on main. |
Kept lower max-warnings count (367) from React Compiler work.
|
npm has a |
Resolved conflict in SplitExpensePage.tsx - kept non-memoized version (trusting React Compiler).
inimaga
left a comment
There was a problem hiding this comment.
Overall the changes look good to me and no massive blockers. Just had a couple of clarifying questions regarding some bits.
src/components/SelectionListWithSections/Search/TransactionListItem.tsx
Outdated
Show resolved
Hide resolved
|
You've also picked up some conflicts and lint errors. |
Resolved conflicts: - EmptySearchView.tsx: Added isFilteredWorkspaceAccessible logic (from main) without useMemo, integrated into existing assignment-based pattern - SplitExpensePage.tsx: Added preferredLocale parameter to date formatting (from main) while keeping non-memoized version
|
Conflicts resolved. I've fixed all lint errors except some in lint-changed that were pre-existing in some of the files touched here. I don't intend to fix all these to minimize the risk of this already-large PR. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Merging through failing checks as discussed here: https://expensify.slack.com/archives/C05LX9D6E07/p1768857854486449?thread_ts=1768850793.632499&cid=C05LX9D6E07 |
|
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ 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/roryabraham in version: 9.3.5-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.5-7 🚀
|
Explanation of Change
In this PR, I migrated a batch of hooks and components to become compatible with React Compiler. All of these were previously not compiling, but now they are. I also removed all manual memoization. This has two purposes:
For this batch, I focused on components with only manual memoization errors and not other Rules of React violations that cause React Compiler to fail, but are trickier/risker to fix. I excluded files that:
finallyclauses)rulesdir/no-inline-useOnyx-selectororreact/jsx-no-constructed-context-values.Fixed Issues
(partial) #68765
Tests
Full regression tests will be completed on an AdHoc build before merge.
Offline tests
n/a
QA Steps
None. Regression tests only.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari