-
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
Apply Onyx updates in an ordered fashion #25455
Conversation
Ok I think we're gonna need a few changes here since this didn't work out of the box |
…do the request if this is open app
…Updates on the same request
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 to me!
@techievivek 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] |
@MonilBhavsar 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] |
// If we're executing any of these requests, we don't need to trigger our OnyxUpdates flow to update the current data even if our current value is out of | ||
// date because all these requests are updating the app to the most current state. |
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.
even if our current value is out of date
Just curious how can this happen if the requests are fetching the current state. Doesn't happen at all?
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 talked personally and I explained this!
previousUpdateID?: number; | ||
lastUpdateID?: number; |
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.
number | string
, as in OnyxUpdatesFromServer
?
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 shouldn't be a problem, though I agree we should fix it. I'll open another PR after this so we don't lose the C+ reviews, is that OK for 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.
Sounds good. Feel free to request a review
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 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/MonilBhavsar in version: 1.3.67-0 🚀
|
@tgolen Can you pls confirm if we only need to QA 3**. Working on the beta** steps? |
@mvtglobally I think you can do 3 onwards. I've just activated the beta on staging for all applause accounts, so it should work for you! Also, it's possible we'll see other regressions because of this change. I'm not sure about that, but I'll check the list later! |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.67-3 🚀
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.3.68-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.68-17 🚀
|
HOLD on the conferences, since we have a feature freeze. But we can review and have it ready to merge after Friday!
Details
Fixed Issues
$ #24606
PROPOSAL:
Tests
There are 5 test flows to be made here.
1. General
2. Enabling the beta
[OnyxUpdateManager] Client has not gotten reliable updates before so reconnecting the app to start the process
ReconnectApp
To repeat this area of the test, you can execute
Onyx.set("OnyxUpdatesLastUpdateIDAppliedToClient","");
and start again after you're part of the beta.3. Working on the beta
force offline mode
force offline mode
option4. Testing that GetMissingOnyxUpdate calls are being made
OnyxUpdatesLastUpdateIDAppliedToClient
on your current DB (by accessingApplication > IndexedDB > OnyxDB > keyvaluepairs
)Onyx.set("OnyxUpdatesLastUpdateIDAppliedToClient", {currentValue - 1});
Gap detected in update IDs from server so fetching incremental updates
GetMissingOnyxMessages
request5. Testing that we're not saving old data received late
OnyxUpdatesLastUpdateIDAppliedToClient
on your current DB (by accessingApplication > IndexedDB > OnyxDB > keyvaluepairs
)Onyx.set("OnyxUpdatesLastUpdateIDAppliedToClient", {currentValue + 10000});
[OnyxUpdateManager] Update received was older than current state, returning without applying the updates
Offline tests
QA Steps
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
I tested by login in without the beta enabled, the enable the beta and send a message
I was able to confirm that the ReconnectApp request was made, and that we started to track the ID after it.
Screen.Recording.2023-08-30.at.21.31.33.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android