-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Implement the React-Native Pusher library for iOS and Android #56610
base: main
Are you sure you want to change the base?
Implement the React-Native Pusher library for iOS and Android #56610
Conversation
Failing |
@shubham1206agra 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] |
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.
Just NABs. Great work here 🚀
const MobilePusher: PusherModule = { | ||
init, | ||
subscribe, | ||
unsubscribe, | ||
getChannel, | ||
isSubscribed, | ||
isAlreadySubscribing, | ||
sendEvent, | ||
disconnect, | ||
reconnect, | ||
registerSocketEventCallback, | ||
TYPE, | ||
getPusherSocketID, | ||
}; |
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 saw you changed the import structure so you can do like this Pusher.getPusherSocketID()
in other files, please make sure this isn't creating cycle dependencies.
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.
Yep, I've updated it to follow project rules of file organization for platform-specific implementations.
I believe we have import/no-cycle
eslint rule turned on, so if cycle dependencies were the case the eslint check would fail.
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.
Yep, I've updated it to follow project rules of file organization for platform-specific implementations.
Oh yes you are right, we should do this way 👍
I believe we have import/no-cycle eslint rule turned on, so if cycle dependencies were the case the eslint check would fail.
Unfortunately import/no-cycle
is not that reliable to catch cycle dependencies, the best way is to check by yourself by running the Android or iOS app with Metro and checking the logs during startup.
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've just checked ios metro logs and there are no cycle warnings related to this PR 👌
Explanation of Change
Update the Pusher module to use
@pusher/pusher-websocket-react-native
lib on mobile platforms.Fixed Issues
$ #56480
PROPOSAL: N/A
Tests
Chat messages receiving
Expenses
Make sure "is typing" indicator is working
Room Leaving
Leave Room
.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
)src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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
android1.mp4
Android: mWeb Chrome
android_web1.mp4
iOS: Native
ios_pt01.mp4
ios_pt02.mp4
iOS: mWeb Safari
ios_web_pt1.mp4
ios_web_pt2.mp4
MacOS: Chrome / Safari + MacOS: Desktop
web+desktop_pt01.mp4
web+desktop_pt2.mp4