-
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
[$500] Display route line when the device comes back online #26596
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01b325474ece1a7595 |
Triggered auto assignment to @mallenexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @dylanexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
Hey, @hayata-suenaga my proposal for issue #26537 solves this issue as well. |
But as that is linked to other issue, not sure what I can do. Shall I post the solution specific to this issue? |
ProposalPlease re-state the problem that we are trying to solve in this issueDisplay route line when the device comes back online What is the root cause of that problem?The bug appears because the application does not re-fetch the MapBox route when transitioning from offline to online. This means that if the user goes offline and then comes back online, the MapBox route is not updated, causing it not to appear correctly. What changes do you think we should make in order to solve the problem?Add a mechanism to App/src/components/DistanceRequest.js Line 76 in d0b2772
useEffect to listens for changes in the network status and triggers a re-fetch of the MapBox route when the application goes from offline to online.
What alternative solutions did you explore? (Optional)None Resultcropped_mapbox_fixed.mp4 |
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Display route line when the device comes back online What is the root cause of that problem?App/src/components/DistanceRequest.js Line 92 in d0b2772
here we are checking the coordinates key or not so its will be always truebecause coordinates we are setting as null every every waypoint save App/src/libs/actions/Transaction.js Line 63 in d0b2772
but its have null value so that when come back online App/src/components/DistanceRequest.js Line 158 in d0b2772
What changes do you think we should make in order to solve the problem?we should update the logic const doesRouteExist = lodashHas(transaction, 'routes.route0.geometry.coordinates') && transaction.routes.route0.geometry.coordinates && transaction. routes.route0.geometry.type; token init as well we should update useEffect(() => {
if(isOffline) {
return;
}
MapboxToken.init();
return MapboxToken.stop;
}, [isOffline]);
|
@hayata-suenaga dup with this issue, and I had a proposal to fix this issue here #26589 (comment) |
I'm evaluating proposals from both PRs right now |
@pradeepmdk I'll assign you to this issue. Please see the comment there |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
We're going to create the history of recent searches so that we can test this flow offline
Expected Result:
A route should be displayed if two or more valid waypoints are present when the device comes back online
Actual Result:
A route is not present on the map.
Workaround:
N/A
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number:
Reproducible in staging?: Yes
Reproducible in production?: No (the feature is not deployed to production yet)
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @shubham1206agra
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1693712953909809?thread_ts=1693667520.672399&cid=C01GTK53T8Q
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: