tomoakley / freemeals.uk

MIT License
10 stars 10 forks source link

Add search radius functionality #76

Closed Sacharified closed 2 years ago

Sacharified commented 3 years ago

Fixes #33

This adds a search radius input, which accepts a number in Km and triggers a search with a new radius query parameter.

New input

The lambda now accepts a radius query parameter.

The default radius is infinity because that's the default in the sphere-knn package and results in the same behaviour as what's running in prod right now.

tomoakley commented 3 years ago

thanks @Sacharified!

Couple of things:

Let me know what you think of those suggestions.

Sacharified commented 3 years ago

moving the search radius input to be inline with that label

@tomoakley Do you mean moving it out of the postcode search and in to the list component?

Agreed about the default, I'll update that.

tomoakley commented 3 years ago

moving the search radius input to be inline with that label

@tomoakley Do you mean moving it out of the postcode search and in to the list component?

Agreed about the default, I'll update that.

I was thinking as I typed there. Not sure it's a good idea, but I think it'd be useful to not be able to input a search radius when seeing all the results (i.e no postcode, no geo)

Sacharified commented 3 years ago

moving the search radius input to be inline with that label

@tomoakley Do you mean moving it out of the postcode search and in to the list component? Agreed about the default, I'll update that.

I was thinking as I typed there. Not sure it's a good idea, but I think it'd be useful to not be able to input a search radius when seeing all the results (i.e no postcode, no geo)

Yeah that makes sense.

So I could either hide it, disable it or automatically switch to Geo mode when it's typed into. Do you have any preference?