RBB-Website icon indicating copy to clipboard operation
RBB-Website copied to clipboard

[Feature] Search by "Text" and "Near Me"

Open elchris opened this issue 4 years ago • 1 comments

User Story

Goals:

Location Sniffing Goals:

  • Most users just want to find things near them
    • Having to type their location in a box is somewhat overkill and redundant
    • It also requires us to query a Google API to find lat/long pairs

Searching for Things Goals:

  • Users also want to search for "things", by typing things in a text search box like they would in google:
    • shoes
    • hair
    • cigars
    • food
    • sports bar
    • drinks
    • etc.

Enabling Factors:

  • We could leverage the browser's Geo/GPS API
    • On mobile devices, it can use the device's GPS receiver
    • On desktop/laptops, it uses a combination of things including:
      • Matching WiFi access point's SSID against databases of locations of SSIDs
      • IP Geo-Matching
      • etc.
    • Caveat: When using this feature, the user gets prompted for permission with an optional checkbox to "remember decision for a day"
      • This experience can be somewhat abrasive
      • And this could well invalidate this whole approach
  • Since July 2020, the API has supported a "search" HTTP GET Parameter
    • This parameter can be added to any existing query
    • It will return results relevant to whatever the user entered.
    • It matches results against several fields

Proposed Solution:

  • A more streamlined Search Experience:
    • [ bbq ] [Near Me] [go]
      • the first box is the free-form search from the user
      • "Near Me" is a pull-down selected by default
        • Its other option is "Near ..."
          • When selected, it presents the user with a box to enter a location they want
  • Radius should be kept to whatever we use right now by default

Code Sample:

if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( function (position) { let lat = position.coords.latitude; let lng = position.coords.longitude; } ); }

Acceptance Criteria

  • [ ] Search Experience on Homepage
  • [ ] Search Experience on Businesses Search Page

elchris avatar Nov 20 '20 07:11 elchris

I can take a run at this one.

brianjhanson avatar Dec 19 '20 17:12 brianjhanson