-
Notifications
You must be signed in to change notification settings - Fork 7
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
Lost And Found .... Locate me #234
base: main
Are you sure you want to change the base?
Conversation
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!!! 🚀
@kilemensi / @nerdlet / @karimkawambwa I like the feature. I am not sure how this affects key metrics such as conversation rate and bounce rate. Currently, when you can't find your city, looking at a cross tabulation of the analytics ,people default to NBO which is the most searched city. Yet we have users from - ranked in descending order- : United States, United Kingdom, South Sudan, Tanzania , South Africa , Afghanistan ,Canada ,China & Uganda. These users in my thinking, after seeing the value of the product from NBO's air page, move on to either "connect" or signup to "get their city onboard". These pipelines are the lifeline of the project as this is where key stakeholders contact us from. My concern here is that we will be presenting no data for cities that we currently don't operate it and this will cause, in my thinking, high drop off rates and more worryingly, lower signups as people just didn't get value / see demonstrated value. I could also be wrong and I a more than happy to jump on a call to see what user flows you envision and how they fit in with my desired metrics / KPIs. |
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.
It doesn't work for me:
Network location provider at 'https://www.googleapis.com/' : No response received. error @ VM780:17
In case of errors or if location found is not part of cities where sensors.AFRICA operates, we should show a dialog similar to SHARE
(or modal similar to when click hamburger menu):
- Saying we couldn't locate or sensors.AFRICA isn't available in their region,
- List/dropdown of cities sensors.AFRICA is available, and
JOIN
button/link that takes users tojoin-network
page in case their city isn't part of the list above. I think this addresses your concerns @chegejames
navigator.geolocation.getCurrentPosition( | ||
async ({ coords: { latitude, longitude } }) => { | ||
const { error, address } = await fetch( | ||
`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${latitude}&lon=${longitude}` | ||
).then(res => res.json()); | ||
|
||
// If not really there | ||
if (error || !address) { | ||
setLabel('COULD NOT LOCATE'); | ||
} else { | ||
// Find country | ||
const foundEntry = Object.entries(CITIES_LOCATION).find( | ||
([, country]) => address.country === country.name | ||
); | ||
if (foundEntry) { | ||
const [slug] = foundEntry; | ||
selectOption({ value: slug }); | ||
} else { | ||
setLabel( | ||
<p style={{ lineHeight: '1em' }}> | ||
{address.city}, {address.country} | ||
<br /> | ||
<b style={{ fontSize: '0.625rem' }}> | ||
Is not covered by sensorsAFRICA | ||
</b> | ||
</p> | ||
); | ||
} | ||
} | ||
}, | ||
failure => setLabel(failure.message.toUpperCase()), | ||
{ | ||
timeout: 10000 | ||
} | ||
); |
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.
Move all these to a function
@chegejames Solid and valid points! Might it be a shot to the foot by adding "locate me" too soon without a lot of cities? I remember wondering if, since such few cities, an approach similar to https://academy.africa/ could also work. But, yes, a critical/nuanced approach to user behaviour is important in UX design. Otherwise, as a "Locate Me" feature @karimkawambwa, this is an excellent implementation! Would totally use it on https://greenalert.oxpeckers.org/ ! Academy Ref: |
Description
Locate me feature
Type of change
Screenshots
![03-PortalPage-b_big](https://user-images.githubusercontent.com/4308339/76096163-2f3aa500-5fa0-11ea-8962-6bc1e4bc9e73.jpg)
Checklist: