Merged
Conversation
This was referenced Apr 17, 2024
rezkiy37
reviewed
Apr 18, 2024
Contributor
Author
|
@roryabraham @blazejkustra I've also upgraded both Onyx and E/App TS to 5.4.5 to be able to use NoInfer type, necessary to fix |
blazejkustra
suggested changes
Apr 22, 2024
blazejkustra
approved these changes
Apr 26, 2024
roryabraham
reviewed
Apr 26, 2024
Contributor
roryabraham
left a comment
There was a problem hiding this comment.
This code seems good to me
Contributor
Author
|
Putting this on HOLD because I'm going to be OOO next week, and will return on May 6th. |
Contributor
Author
|
@roryabraham @techievivek I'm taking this PR off the hold. |
roryabraham
approved these changes
May 7, 2024
Contributor
|
🚀Published to npm in v2.0.37 |
42 tasks
50 tasks
6 tasks
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.
Details
This PR does the following changes:
useOnyxto returnundefinedinstead ofnull, thus allowing us to use default values more easily.OnyxEntryandOnyxCollectiontypes to allowundefinedvalues (necessary because of the change above).Onyx.setandOnyx.mergetypes to disallow passingundefineddirectly (like it was before).Onyx.connectcallback's value type to excludeundefined(undefinedwill never be passed).withOnyx.useOnyxreturn read-only value to avoid future situations like this one (it's not committed yet but the problem was because an Onyx value was being mutated during runtime, which causesgetSnapshot()to always fail the deep-equality check and re-render infinitely).initialValuetype to avoid inferuseOnyx's return valueinitialValue.Related Issues
$ Expensify/App#34339
Automated Tests
Manual Tests
Some common tasks on E/App:
useOnyx).useOnyx).useOnyx).Author Checklist
### Related Issuessection aboveTestssectiontoggleReportand notonIconClick)myBool && <MyComponent />.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Avataris modified, I verified thatAvataris working as expected in all cases)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
I'm having issue to build Android app.
Android: mWeb Chrome
Screen.Recording.2024-04-26.at.15.37.33-compressed.mov
iOS: Native
It's failing runtime due to changes on this repo's
main.iOS: mWeb Safari
Screen.Recording.2024-04-26.at.15.47.24-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-04-26.at.15.52.43-compressed.mov
Screen.Recording.2024-04-26.at.15.54.12-compressed.mov
MacOS: Desktop
Screen.Recording.2024-04-26.at.15.56.19-compressed.mov