-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[TS migration] Migrate react-native-onyx mock #35674
[TS migration] Migrate react-native-onyx mock #35674
Conversation
__mocks__/react-native-onyx.ts
Outdated
|
||
export default reactNativeOnyxMock; | ||
export {withOnyx}; | ||
/* eslint-enable rulesdir/prefer-onyx-connect-in-libs */ |
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.
Should we enable the rule at the end of a file?
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.
I don't think we need to enable it again @ruben-rebelo 🤔
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.
You are right! This is a left-over, removing it! Thank you!
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
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/Videos |
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! 🎉🚀
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25248 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
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.
Approving again to trigger melvin assignment to a internal engineer.
@@ -0,0 +1,38 @@ | |||
/* eslint-disable rulesdir/prefer-onyx-connect-in-libs */ |
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.
Can we get rid of this, or add a comment explaining why we need it here?
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.
We can't get rid of this but I've added a comment explaining the reason we are disabling the rule.
Please have a look.
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.
Thanks! I left a few minor aesthetic comments, but the code looks good
__mocks__/react-native-onyx.ts
Outdated
@@ -0,0 +1,44 @@ | |||
/** | |||
* We are disabling the lint rule that doesn't allow the usage of connect onyx outside libs |
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.
* We are disabling the lint rule that doesn't allow the usage of connect onyx outside libs | |
* We are disabling the lint rule that doesn't allow the usage of Onyx.connect outside libs |
__mocks__/react-native-onyx.ts
Outdated
/** | ||
* We are disabling the lint rule that doesn't allow the usage of connect onyx outside libs | ||
* because the intent of this file is to mock the usage of react-native-onyx so we will have to mock the connect function | ||
* as this is a file outside of the lib folder we need to disable it |
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 is already stated in the comment
* as this is a file outside of the lib folder we need to disable it |
* because the intent of this file is to mock the usage of react-native-onyx so we will have to mock the connect function | ||
* as this is a file outside of the lib folder we need to disable it | ||
*/ | ||
|
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.
@cead22 Updated, thank you! |
✋ 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/cead22 in version: 1.4.44-0 🚀
|
@ruben-rebelo I think it is internal. |
@ishpaul777 could you confirm if this is internal testing? |
Yes, no QA for ts migration |
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
Details
[TS migration] Migrate react-native-onyx mock to typescript
Fixed Issues
$ #25248
PROPOSAL: N/A
Tests
Verify that no errors appear in the JS console
Run Unit tests works as before
Offline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.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
N/a
Android: mWeb Chrome
N/a
iOS: Native
N/a
iOS: mWeb Safari
N/a
MacOS: Chrome / Safari
N/a
MacOS: Desktop
N/a