Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
location bias feature implementation #33334
location bias feature implementation #33334
Changes from 5 commits
c4d5eae
4f3231f
46b608e
bb6ccfc
00ace7f
af1259f
dbfda57
2995908
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 don't think we should pass
ipbias
here. Let this be controlled by the caller. Can you please explain 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 get your point. Instead of passing
ipbias
, it may be better to let the default behavior occur by not passing thelocationbias
property if we do not have one. We can do something like this below.Let me know what you think on this.
...(locationBias && {locationbias: locationBias}),
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 is this? I don't see this defined in
transactionPropTypes
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.
Yes. I also notice that
routes
are not there intransactionPropTypes
. But, these are route coordinates that get populated intransaction
viagetRouteForDraft
when thestart
andfinish
valid waypoints are filled.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.
@parasharrajat
If there are no waypoints and also user's current location cannot be determined, do you think we should consider the default coordinates in the app i.e. [-122.4021, 37.7911] as set here?
or returning
null
as it is done currently is good enough?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 think it will be better to skip locationBias in that case.
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 don't think we should worry about this. This is just too specific. Also, it depends on the internal state which can change. What is the benefit of adding these?
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.
Since the route between waypoints could have detours, I think considering direction coordinates gives us a more realistic boundary. While I too think this to be too specific, we do consider direction coordinates in arriving at the map bounds as seen here. I think the user will naturally expect to find finer address locations within the visual map bounds. So, I think we may want to keep this. But, if you think this is way too specific, we can remove this too. Let me know what you think.
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 will leave this for the internal Engineer to decide.
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.
@thienlnam
We can either ignore direction coordinates or consider them to arrive at the rectangular boundary for location bias. Please help us decide 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 don't think we need to worry about this right now - let's start with the most straightforward implementation first and then see if there's an issue
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.
@rojiphil Please let me know when changed.
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.
@parasharrajat
I have committed the changes.