-
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
Add code to NewDot to handle both new and old Pusher event types #18192
Conversation
@eVoloshchak @grgia One of you needs to 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] |
PREFERRED_LOCALE: 'preferredLocale', | ||
EXPENSIFY_CARD_UPDATE: 'expensifyCardUpdate', | ||
SCREEN_SHARE_REQUEST: 'screenshareRequest', |
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.
What's the migration plan? We start sending both old and new events from the backend, then remove the old one when this is released?
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.
No, it's more simple than that. Web-E just needed to be updated to send these three events as Onyx updates, which NewDot already supports. Once that Web-E change is in production, then the HOLD can be removed on this.
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 am confused... if web-e stopped sending the old events, then all existing apps will be broken till this is deployed, no??
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.
No. Older versions of NewDot (for like the past several months) can all handle the onyx update event. Web-E is just switching over to using that.
src/libs/actions/User.js
Outdated
// Receive any relevant Onyx updates from the server | ||
PusherUtils.subscribeToPrivateUserChannelEvent(Pusher.TYPE.ONYX_API_UPDATE, currentUserAccountID, (pushJSON) => { | ||
SequentialQueue.getCurrentRequest().then(() => { | ||
Onyx.update(pushJSON); | ||
triggerNotifications(pushJSON); | ||
}); | ||
}); | ||
|
||
// Live-update an user's preferred locale | ||
Pusher.subscribe(pusherChannelName, Pusher.TYPE.PREFERRED_LOCALE, (pushJSON) => { |
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 assume this will be migrated in the web-e code?
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, it was already migrated. In fact, Web-E had stopped using this event in favor of an Onyx update event a while ago (during the big API refactoring) and this was never properly cleaned up.
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.
ahhh lol
@eVoloshchak @grgia This PR is unheld and ready for review |
@eVoloshchak will you be able to get a PR checklist going for this? It should be very quick testing. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-09.at.22.11.46.movMobile Web - ChromeScreen_Recording_20230509-221034_Chrome.mp4Mobile Web - SafariScreen.Recording.2023-05-09.at.22.08.28.movDesktopScreen.Recording.2023-05-09.at.22.11.22.moviOSScreen.Recording.2023-05-09.at.22.07.58.movAndroidScreen_Recording_20230509-220938_New.Expensify.mp4 |
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.
Looks good, works normal
🎯 @eVoloshchak, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #18668. |
OK, I fixed a conflict so this is ready to be merged if you want to do the honors @iwiznia |
✋ 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/tgolen in version: 1.3.14-0 🚀
|
@tgolen Can you confirm server side internally? We will run regular regressions. |
I confirmed this and have marked this PR off the checklist. |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.14-14 🚀
|
Details
This code sets up the app to be able to handle unified pusher events
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/279349
Tests
The only thing needing to be tested is that there are no regressions with the existing pusher updates. This can be done by:
Offline tests
None
QA Steps
Same as tests
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)/** 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
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android