OpenBeta / open-tacos

Rock climbing route catalog (openbeta.io)
https://openbeta.io
GNU Affero General Public License v3.0
110 stars 111 forks source link

feat: Climb/Route coordinates #1092

Open alexoj46 opened 5 months ago

alexoj46 commented 5 months ago

name: feat: Climb/Route coordinates


What type of PR is this?(check all applicable)

Description

Implemented FrontEnd solution to Issue #1078 to add climb/route coordinates to climb pages.

Related Issues

Issue #1078

What this PR achieves

Added FrontEnd component to climb/route page to display route coordinates. The component will also link to Google Maps, and will add a tick to the map on the website.

Screenshots, recordings

Screenshot 2024-02-08 at 7 45 40 PM

Notes

If coordinates are not present in metadata for that climb, the lat, lng display will still appear, with NA, NA as the value (as shown in the photo).

Also added my contributor information.

vercel[bot] commented 5 months ago

@alexoj46 is attempting to deploy a commit to the openbeta-dev Team on Vercel.

A member of the Team first needs to authorize it.

btmccord commented 4 months ago

Rather than showing NA, we should inherit the parents coordinates.

musoke commented 4 months ago

See https://github.com/OpenBeta/open-tacos/issues/1057 for discussion of why inheriting parent coordinates may not be the best approach.

On Sat, Feb 10, 2024, 23:22 Blake McCord @.***> wrote:

Rather than showing NA, we should inherit the parents coordinates.

— Reply to this email directly, view it on GitHub https://github.com/OpenBeta/open-tacos/pull/1092#issuecomment-1937419710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7ET7FRSYMGIONLS4EKGCLYTBBRPAVCNFSM6AAAAABDAVOWQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGQYTSNZRGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

btmccord commented 4 months ago

See #1057 for discussion of why inheriting parent coordinates may not be the best approach.

That makes sense for areas, however if we have a coordinate for an area we should show it on the route page as a very high percentage of the time they will be that same (for our purposes as climbers).

Route coordinates are only really usefully for a handful of areas that are very low density.

What about indicating that the coordinates displayed are that of the area?

musoke commented 4 months ago

Yes, that would probably do the trick - maybe even just show them grayed out?

On Sat, Feb 10, 2024, 23:34 Blake McCord @.***> wrote:

See #1057 https://github.com/OpenBeta/open-tacos/issues/1057 for discussion of why inheriting parent coordinates may not be the best approach.

That makes sense for areas, however if we have a coordinate for an area we should show it on the route page as a very high percentage of the time they will be that same (for our purposes as climbers).

Route coordinates are only really usefully for a handful of areas that are very low density.

What about indicating that the coordinates displayed are that of the area?

— Reply to this email directly, view it on GitHub https://github.com/OpenBeta/open-tacos/pull/1092#issuecomment-1937421814, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD7ET7EZCX4QG32JYODYTITYTBC5PAVCNFSM6AAAAABDAVOWQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXGQZDCOBRGQ . You are receiving this because you commented.Message ID: @.***>

vnugent commented 4 months ago

I've just looked at the backend code. When creating a new route, the backend populates the climb's coordinate pair with that of the parent. We can hash out more detail in #1057. For this PR we can just deal with the visual. If the climb object doesn't have coordinates, it's not easy to fetch the parent's nor it is worth it to deal with in the frontend (I think the backend is a better place for it). Can we just not show it if that's the case?

What about adding some wording to indicate the coordinates are inherited form the parent? Something like 34.18150, -85.81285 (Inherited)?


Screenshot 2024-02-11 at 10 40 40 AM
vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
open-tacos ✅ Ready (Inspect) Visit Preview Feb 11, 2024 6:58pm
btmccord commented 4 months ago

When creating a new route, the backend populates the climb's coordinate pair with that of the parent.

If this is the case I would think it's not possible to tell if it's inherited or not...?

I guess that right now they are all inherited since we have now editing functionality for climb coordinates currently?

vnugent commented 4 months ago

I guess that right now they are all inherited since we have now editing functionality for climb coordinates currently?

Right now they all inherited, but we can't edit climb coordinates at the moment.