-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add some basic runtime type validation in Onyx #532
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Assigned reviewers of Expensify/App#39852 |
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.
@dominictb please complete the author checklist and perform some basic manual testing of this PR with a local build of E/App using these changes.
Will do it as soon as possible. Thanks. Feels free to review the rest of the PR |
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.
Otherwise LGTM 👍
Reviewed it once, going through once again. |
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.
LGTM, pending one confirmation.
@roryabraham Do we do a checklist here? or when we bump the App PR with updated Onyx version?
@mananjadhav some videos are uploaded in the PR description (local build). Feel free to check. |
Thanks @dominictb I did check those. |
We should do a checklist here with a build of react-native-onyx linked against E/App dev. See instructions in the README on how to do this. |
uh oh, @mananjadhav anything I need to do to complete the PR? Thanks! |
No. I'll finish this checklist today. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-onyx-update.movAndroid: mWeb Chromemweb-chrome-onyx-update.moviOS: Nativeios-onyx-update.moviOS: mWeb Safarimweb-safari-onyx-update.movMacOS: Desktopdesktop-onyx-update.mov |
@roryabraham All yours. |
looks like reassure is just not set up correctly in Onyx? |
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 code looks good, but @dominictb I think I need you to merge main into this branch so we can see if Reassure is passing or failing.
@roryabraham I merged main. Can u check? |
@roryabraham Can you action the PR so that the workflows are executed? |
@roryabraham @mananjadhav let's merge this so I can bump the version in Expensify/App |
Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
mergeCollection operation Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
Signed-off-by: dominictb <tb-dominic@outlook.com>
@roryabraham @mananjadhav any update before we can merge? |
sorry for the delay. As this is your first PR in this repo I have to manually approve workflows to run, so that's why it was delayed. |
🚀Published to npm in v2.0.35 |
Details
Add some basic runtime type validation in Onyx for merge, set and mergeCollection operation
Related Issues
Expensify/App#39852
Automated Tests
Test 1: For set operation:
react-native-onyx/tests/unit/onyxTest.js
Line 75 in 9ee7241
Test 2: For merge operation:
react-native-onyx/tests/unit/onyxTest.js
Line 117 in 9ee7241
Test 3: For
mergeCollection
:react-native-onyx/tests/unit/onyxTest.js
Line 434 in 9ee7241
Manual Tests
N/A
Author Checklist
### Related Issues
section aboveTests
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Android: Native
android-9MB.mp4
Android: mWeb Chrome
androidweb-9MB.mp4
iOS: Native
ios-9MB.mp4
iOS: mWeb Safari
iosweb-9MB.mp4
MacOS: Chrome / Safari
web-10MB.mp4
MacOS: Desktop
desktop-9MB.mp4