HSLdevcom / HSLdevcom/digitransit-ui

search result changes when reopening the page in mobile

Open
#1,565 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
267
Forks
145
Avg merge
1d 15h
Merged PRs (30d)
75

Description

This is unfortunately not so formal description of a bug (or a problematic feature) as this is only based on my own experiences as a user of the service and I haven't looked in to the code.

The use case: before I make a departure, I make a search in Reittiopas with my phone (iPhone 7). The trip includes at least one bus change. When I've sat in the first bus for a while, I open my phone and the browser page for search results to recheck where should I step off the bus and how soon should the second bus arrive. At this point I cannot find my original search results but page shows completely new routes and bus line combinations. (I'm not sure, but I remember that at least sometimes the time in the search parameters has changed the departure time to the current time instead of the original time - which is another bug)
I change the search time back to the original (maybe 5 or 10 minutes earlier) and recheck the departure and arrival addresses. Still, the route I was previously suggested and I'm currently on, is gone. When going to an unfamiliar place or on an unfamiliar route, the situation is quite disturbing and in a moving bus in an unfamiliar neighborhood it's difficult to make a new request as you don't have the address ( and you don't want to give the browser an access to your location data).

I'm assuming that this is because Reittiopas is receiving and utilizing the satellite positioning of the vehicles and as the trip has lasted e.g. 20 minutes, all HSL vehicles are now a bit ahead or behind the schedule and the previous result (event though might still be valid) isn't the most optimal anymore. And as mobile browsers don't always save the loaded HTML-page but reload the page when reopening the browser, the page makes automatically a new search request based on the previous page request (search) parameters.

I'd assume that the use case I'm describing is quite common for mobile users, so it would be quite critical to prevent browser to automatically change already received route suggestions.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue on an iPhone or mobile browser: run a route search with a transfer, leave the page, and reopen it after some time. Then trace how the existing search parameters and results are restored on reload; done means reopening the page preserves the original route suggestions instead of silently issuing a new search.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.