zugspitze / Hiking-Buddies

This repository is used to create bugs and new features for www.hiking-buddies.com
1 stars 0 forks source link

Create event from route in reverse direction #92

Open c-harding opened 2 weeks ago

c-harding commented 2 weeks ago

When creating an event from an existing route, there should be the option to follow the route in the reverse direction. This will horizontally flip the elevation profile, swap the ascent and descent values, and cause the route download button to download the route in reverse order. The rating may also need to be recalculated.

This will allow participants to prepare for the event in the correct direction. Currently, an organiser has two options:

  1. Create an event with the wrong direction. An example of that is here: https://www.hiking-buddies.com/routes/events/10587/. The participants need to read the description, and infer that the route will be done in reverse. The participants may prepare to encounter a hut at the end when in fact it is only at the very beginning, or expect significantly less ascent than there will really be, if the route was created with a lower end point than start point. If someone tries to load the GPX file onto a phone/smart-watch for navigation, they may be unable to reverse it, and navigation may not work at all.
  2. Create a new route. This leads to unnecessary duplication in the route database, and because of #6, makes both routes unusable on the routes map.

Neither of these are optimal, which is why I propose this third option.

What happens when I click on “download route”?

A GPX file representing the route in reverse should be downloaded. This could be:

  1. generated on the server on the fly,
  2. or generated once when the event is created,
  3. or generated by creating a new version of the route (depends on #93)
  4. or generated once when the first reversed event is created for the route.

What happens when I click on “route details”?

The most problematic option would be the status quo: to just show the route as normal. I propose two alternative solutions:

  1. Route versioning

    If #93 has been implemented, this is trivial. This specific route version will have its own page, or at least will be able to be displayed in full in the event page.

  2. The route page is opened in reverse mode

    E.g. with the URL https://www.hiking-buddies.com/routes/routes_list/329?reverse

    This reverses the graph, stats and download button, just like on the event page. A warning is shown in the summary tab, above the Descriptions / Directions / Huts accordion, that the description applies to the original direction.

    Note that this option is incompatible with solution 2 of the “download route” button.

  3. A warning popup is displayed, and when it is accepted, the original URL is opened.

    This is technically much easier to implement, but it means that there is an inconsistent experience when downloading the GPX from the event page and from the route page.