-
Notifications
You must be signed in to change notification settings - Fork 73
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] Setup typescript in react-native-onyx #452
Conversation
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! 😄
I am getting some weird behavior like messages not coming through, or not being able to add a new workspace room. Did you have any of those? |
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, except for one test failing right now! ✅
Just so you know: I have another PR ongoing which reverts two PRs which are also part of the migration here. Not sure which PR to merge first, but in any case we'll have to revert some of these changes later, and maybe re-apply them in the future... |
@rlinoz On what platform? Can you record a video or provide more detailed steps? edit: I updated both PRs please pull the newest changes |
Working on failing test, it's very weird 🤷♂️ |
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! 🚀
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.
Some minor comments, but in general LTGM! I've tested in all platforms and it's working fine for me.
@blazejkustra What about setting up typecheck and prettier in the lint workflow like we did for Expensify/App here?
Tried again today and everything worked fine, probably something weird in my environment yesterday, sorry about that. |
@rlinoz I resolved conflicts and adjusted the code after Fabio's review. Can we proceed with a merge? 👀 |
@chrispader I think we can proceed with TS setup first, wdyt? |
Details
Going forward Onyx code will be written in Typescript, we have to take into consideration transpiling step now.
.ts
code will live inlib
catalog and transpiled code will end up indist
catalog. The lib catalog won’t be published to npm; instead, we’ll only publish the dist catalog.Here is a slack discussion, where it is explained in details why these changes are necessary.
Related Issues
GH_LINK
Automated Tests
N/A (same as before)
Manual Tests
npm run build
npm pack
command to generate package code (this generates.tgz
file, unzip it)App/node_modules/react-native-onyx
(use this PR/branch)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop