Suggestions to solve UX issues with Proximity Form Field location based views

Created on 10 November 2024, 5 days ago

Problem/Motivation

Hi all,

For a fairly large location based website, I'm facing some serious UX issues. It has proximity based views on the most important landing pages, taxonomy pages, and nodes. One big problem is that there is no way to remember the user's location. So every page loads twice as the location is fetched for each page load repeatedly.

The biggest complaint from users is for catalog pages, where the page reload usually happens just as people are trying to filter the results. It is also annoying to users that they've scrolled down a list of posts, and then the page load occurs and takes them back up the page.

Another issue is that no IP based sorting is available, that would be great to have as a fallback for when people don't have GPS on their device (Desktops, etc), or when they don't want to grant location access. That's especially the case for new users not yet familiar with the platform.

These are basically the features https://www.drupal.org/project/ip_geoloc provided back in the day. Unfortunately, development for D8, 9, 10, and up seems to have stalled (#[1938750]).

It would be really great if the Geofield module could implement the settings from that module:
- Remembering user location once geo-located
- Setting the URLs where location should be determined
- Fallback to smart IP ( #1901750: Integrate Smart IP with Geofield's Views proximity handlers )

Steps to reproduce

- Create 2 pages with proximity based views that sort based on the Proximity Form Field set to "Client location" with "Auto-submit form" checked and "Hide coordinates form" set. Add some exposed filters to the second view on the second page.

- Navigate to the first page, grant location access. The page will reload.
- Navigate to the second page, change some of the filters and the page reload will happen again, interrupting and resetting your filter options.
- View the site on a device that is not GPS enabled and see how the proximity based views are no longer relevant to the user because there is no IP fallback.

Proposed resolution

- Store the user's location in a session variable just like the ip_geoloc module used to do, and make it available to views for sorting.
- Add SmartIP or something similar as a fallback option in case user location can't be determined via GPS.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇹🇭Thailand AlfTheCat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AlfTheCat
  • 🇹🇭Thailand AlfTheCat

    Another UX issue I would like to add, is that with the current implementation, refreshing the page prompts a "confirm form re-submission" dialog to the end user. The problem with that is, is that in doing so the user actually re-submits the original location data. So if the user moves from point A to point B, and refreshes the page in their browser, instead of seeing updated proximity values based on their new location B, they see the old data from point A. This is completely counter-intuitive to the end user because they expect that a page refresh would show the data based on their new location.

Production build 0.71.5 2024