MushroomObserver / mushroom-observer

A website for sharing observations of mushrooms.
https://mushroomobserver.org
MIT License
77 stars 25 forks source link

Switch Observation column `long` to `lng` everywhere #2096

Closed nimmolo closed 3 months ago

nimmolo commented 3 months ago

If everyone likes the new query param has_geolocation in #2095, I'd like to take this opportunity to merge this change immediately afterwards, before deploying.

The point of this PR is to help avoid confusion when dealing with the observation.long attribute. Google Maps is the main use for the attribute, and GMaps only accepts a lng property. It's a perpetual gotcha to remember making this switch. Keeping the param name the same everywhere (except in translation string labels) should eliminate the mental overhead.

Fortunately the API handles this property as longitude and only converts to Observation model attributes when creating/updating an observation, so this is a non-breaking change for the API.

coveralls commented 3 months ago

Coverage Status

coverage: 94.405%. remained the same when pulling 240300f000d279649c61958165d7ede58a8d654e on observation-column-long-to-lng into a8dfcc855e1ef69495049be083746284071b7b01 on search-has-lat-long.