-
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
Fix/issue 29899 #30232
Fix/issue 29899 #30232
Conversation
…ansaction's waypoints were updated offline.
…ansaction's waypoints were updated offline.
…aypoints is updated offline
…nly distance request and the waypoints were modified and not yet updated to the server.
Co-authored-by: Arkadiusz Chrabąszczewski <Arkadiuszchr@gmail.com>
Co-authored-by: Arkadiusz Chrabąszczewski <Arkadiuszchr@gmail.com>
@Tony-MK TypeScript check fails, please fix the issues and update branch with main |
Hey @ArekChr, Sorry for the delays. If you don't mind, there are two things I'm a bit curious about.
|
I think we should stick to one topic in this PR and talk about other adjustments in a different issue to keep things clear and organized. |
I think this also seems a separate issue. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb.chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb.safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@ArekChr, Can you check again if the regression is still occurring? It seems to have been fixed when I updated the branch with main. |
Hey @ArekChr and @arosiclair, I have an important proposal to share with you about debugging the
When a request's waypoints gets updated, another transaction with the same transaction ID is stored in Therefore, I kindly ask if it is possible of me to solve this bug. It's also affecting the code's accuracy on determining whether to show 'TBD' in the I believe this is an appropriate method of insuring the we display the exact number of maps and TBD appropriately. In turn, improving the offline user experience. I would greatly appreciate your thoughts on my proposal. Thank you 😄 |
Can you find out why that's happening? This does not sound like correct behavior and it sounds like if we fix this, then your TBD problem should also be fixed. |
Hey @arosiclair and @ArekChr, I have been investigating the root cause of the second problem I mentioned in #30232 (comment) and elaborated in #30232 (comment). When a distance request is edited, a backup copy of the original transaction. If the user doesn't save the changes to the transaction, the transaction data is restored from the backup copy. Read the code snippet below on the App/src/pages/EditRequestDistancePage.js Lines 69 to 87 in 7bd51eb
The moment the server responds successfully, the backup transaction is deleted and is handled in the code snippet below. Lines 785 to 792 in 7bd51eb
Therefore, the root cause of the problem is that the Lines 1710 to 1713 in 7bd51eb
App/src/libs/TransactionUtils.ts Lines 387 to 393 in 7bd51eb
In conclusion, if we filter out the backup copies of the original transactions, it would solve the problem mentioned in the first paragraph. |
Very good breakdown @Tony-MK thanks!
I agree with this. We can add an I also do get the feeling that including the backup transaction in the normal transactions collection is probably going to cause more problems than it solves (like this one) so maybe we should consider moving backups to their own key. cc @tgolen since I think you designed this part |
I really like the idea of moving it to a separate collection. I wish I would have thought of that in the first place. Can you make that change? It might be nice to create an onyx migration to clean out backup transactions from the main collection. |
Thank you, @arosiclair and @tgolen for your feedback. I believe we are moving forward with creating an onyx migration.
@tgolen, could you clarify to whom you were referring to make the change? Frankly, I wouldn't mind making the change. |
Yeah, @Tony-MK I think you can go ahead and make that change. I actually took the lead with that on this PR I've been writing to refactor the request creation flow. Can you make this same collection and use that for the backup transactions? |
Sure, @tgolen, I can certainly do that. But before we proceed, I have a final question. Since this PR was originally intended for a different purpose than our discussion, should I create a new PR to ensure everything remains organized? |
I'd be fine with doing that in a different PR, sure. |
@Tony-MK Please update PR with latest main |
Should we display "TBD" in online mode optimistically, or is it better to keep it as is and update the amount only after the API returns successful data? @tgolen @arosiclair thoughts? Nagranie.z.ekranu.2023-11-7.o.13.51.43.mov |
Yeah I think this is correct since there are pending changes on the waypoints even while online. UpdateDistanceRequest is one of our slower endpoints because of the distance calculations so this will be more noticeable here than in most other flows. |
✋ 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/arosiclair in version: 1.3.96-6 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.3.98-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
Details
#29899
Fixed Issues
$ #29899
PROPOSAL: #29899 (comment)
Tests
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
Android: Native
Android.-.Native.webm
Android: mWeb Chrome
Android.-.Chrome.webm
iOS: Native
iOS.-.Native.webm
iOS: mWeb Safari
iOS.-.Safari.webm
MacOS: Chrome / Safari
macOS.-.Chrome.mp4
macOS.-.Safari.webm
MacOS: Desktop
macOS.-.Desktop.webm