-
Notifications
You must be signed in to change notification settings - Fork 70
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
Onyx Connection Manager #567
Onyx Connection Manager #567
Conversation
@fabioh8010 can you apply the changes from here to the App PR Expensify/App#44987 (or create a separate draft for testing) so we can create a build and ask QA for testing before merging this? |
Asked for a C+ volunteer |
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.
Havent done a full review yet, but excited for this change
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 really love this PR. Awesome work @fabioh8010 ! 👏
I just have a few questions, but the code seems very logical and well designed.
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.
Great improvement @fabioh8010! 🚀
Now that this is approved, let's talk about rolling this out. Any thoughts on how to do it safely? Normally, I would say that QA should do a full regression test on an ad-hoc build of E/App. However, they currently have 4-5 ad-hoc builds they are doing regression tests on, so it could be a while before they get to this. I'm sort of thinking that the nature of this PR means that either everything works as normal, or everything will be massively broken 😂 So, maybe we can get away with:
|
Hi @tgolen , I already have the E/App PR here pointing to a release I made with these changes in my repo. The C+ assigned tested and didn't found any bugs so far. I think the best approach would be having the full regression test with ad-hoc build, even if we have to wait a little bit. In this way we would ensure more safety before these changes are merged. WDYT? |
Ah, nice. You were well ahead of me! I discussed with @mountiny @roryabraham @luacmartins and @AndrewGable and we all agreed that this doesn't need ad-hoc testing. That's mostly based on the idea that fundamentally, this PR will either work fine, or break everything. It is also a simple change to revert (for E/App at least). Because of that, we're fine with it just going to staging like normal. Is that OK? |
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.
Agreed with @tgolen We could try this out in main and staging given @ikevin127 did not find any problems so far
Yeah I think it makes sense, let's |
🚀Published to npm in v2.0.65 |
Details
This PR implements a general connection manager to handle all Onyx connections. Key features:
Onyx.connect()
anduseOnyx()
subscribers. SincewithOnyx()
subscribers connects to Onyx keys in a different way than the first ones, they can't be reused and will work the same way as before.Onyx.connect()
,useOnyx()
andwithOnyx()
subscribes will use the connection manager to handle their connections, keeping the logic centralized and allowing easier maintenance and future improvements.Slack thread: https://expensify.slack.com/archives/C05LX9D6E07/p1723058474781739
E/App PR: Expensify/App#44987
Related Issues
Expensify/App#47143
Automated Tests
useOnyx
.Manual Tests
Common actions in the App, e.g.:
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
Screen.Recording.2024-08-07.at.18.00.00-compressed.mov
Android: mWeb Chrome
Screen.Recording.2024-08-07.at.18.03.55-compressed.mov
iOS: Native
Screen.Recording.2024-08-07.at.18.26.23-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-08-07.at.18.39.19-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-08-07.at.18.41.08-compressed.mov
Screen.Recording.2024-08-07.at.18.43.55-compressed.mov
MacOS: Desktop
Screen.Recording.2024-08-07.at.18.52.43-compressed.mov