Refactor ContextProviders with AI#80196
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…y. Introduced separate hooks for accessing state and actions. Updated imports across components to use the new hooks.
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
@mkhutornyi feel free to review please, our goal is to test through the various flow if there are no obvious issues and then ask QA for full regression testing |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.mov |
mkhutornyi
left a comment
There was a problem hiding this comment.
Confirmed all components that removed manual memoization are ✨ and commented accordingly.
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
| @@ -549,6 +551,7 @@ function IOURequestStepScan({ | |||
| Log.warn('Error taking photo', error); | |||
| }); | |||
| }); | |||
| // eslint-disable-next-line react-hooks/exhaustive-deps -- askForPermissions is not needed | |||
There was a problem hiding this comment.
The comment should be the reason why not needed, not what is not needed.
As missing dependencies already existed, out of scope for this PR.
|
Thank you! requested the adhoc build https://expensify.slack.com/archives/C09V78U42D8/p1769271852640199 |
heyjennahay
left a comment
There was a problem hiding this comment.
Product review not required
|
@mountiny, regression has been completed. |
7d86353 to
97034b3
Compare
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@staszekscp @MonilBhavsar @mountiny Missing QA steps, Can you please help with the QA steps for this. |
|
As stated, we need full regression testing. No specific pages to focus on test |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.11-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
cc: @mountiny
Explanation of Change
This PR migrates less complex ContextProviders using AI following the pattern from this PR. It splits ContextProviders into State and Actions in order to make sure, that if some component uses only state-agnostic actions doesn't re-render when the state changes.
Fixed Issues
$ #80271
PROPOSAL: https://expensify.slack.com/archives/C05LX9D6E07/p1768995280447999
Tests
Because the PR touches multiple areas of the app and was primarily AI-generated we would need full regression testing for it
Offline tests
QA Steps
Because the PR touches multiple areas of the app and was primarily AI-generated we would need full regression testing for it
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