TransitTalk/Transit-Talk

Restrict Location Services to Dashboard

Closed this issue · 1 comments

As of now, there are multiple views in which TransitNetwork still loads up location.js, even when nothing on the page needs it. This would be harmless in most circumstances, yet this file populates and reloads a page with coordinates as soon as the original view is loaded. This starts becoming an issue for pages that explicitly need parameters defined for its own page only (or items that require form data submitted and processed through params). Most noticeably, however, users can have trouble navigating back/forward pages due to the fairly rapid reload of pages.

For example, when CTA data is populated at the Transit Network Heroku app, visit https://transit-network.herokuapp.com/lines/1322. The page will immediately pass in parameters for latitude and longitude. Going back with a single click will effectively accomplish nothing here. While navigating back twice isn't the end of the world for some users, it certainly isn't something we should expect them to do here.

This has been a bug almost since the inception of location services in general. As a result, I'll be adding myself to this issue since I wrote location.js, but am open to any discussion on handling random loads outside of inhibiting the loading of said script as well. (To clarify, I'm not suggesting against this method...it's just the one that I will likely use if nobody says anything.)

Based on the mentioned commit being on master, I think this issue is resolved and am thus closing it.