feat: Enable react-native-nitro-fetch#93440
Draft
mkhutornyi wants to merge 5 commits into
Draft
Conversation
Contributor
|
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Contributor
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc: @situchan for review
Explanation of Change
react-native-nitro-fetch#88110 +react-native-nitro-fetchto 1.4.0 to fix local fetch issue (fixed in feat: add local file support margelo/react-native-nitro-fetch#116)Replace native
fetchwithreact-native-nitro-fetch, then prefetches the startupOpenApp/ReconnectApprequest so it can begin before React Native JS is ready.NitroFetch is a native-backed Fetch API implementation built on Nitro Modules. By globally replacing fetch, Headers, Request, and Response on native, existing fetch(...) callsites and dependencies keep the same API while routing through NitroFetch. Web keeps the browser fetch implementation.
For startup,
prefetchOnAppStart(...)stores theOpenApp/ReconnectApprequest with a stableprefetchKey. On the next cold start, native code replays that request before the React Native runtime is loaded. When JS later sends the same request with the same prefetchKey, NitroFetch can serve the prefetched response from its native cache if it is ready, or fall back to the normal network request if it is not.Fixed Issues
$ #90023
PROPOSAL: https://expensify.slack.com/archives/C05LX9D6E07/p1778233186728969
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13974
Tests
Case 1:
Case 2:
More regression tests:
[$250] Onboarding modal loads infinitely after refreshing onboarding and completing it #92643
Tags - Unable to import multilevel tags #92652
chat-Attaching specific pdf file shows error. #92680
Verify that no errors appear in the JS console
Offline tests
None needed.
QA Steps
Run a full QA suite on all flows, since the changes in this PR affect all network requests across the whole app.
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: HybridApp
android.mov
Android: mWeb Chrome
iOS: HybridApp
ios.mov
iOS: mWeb Safari
msafari.mov
MacOS: Chrome / Safari
web.mov