plezanje-net / web

Angular website frontend
https://www.plezanje.net/
GNU General Public License v3.0
6 stars 1 forks source link

Fix diff vote disabled visibility bug & more #337

Closed salamca closed 2 years ago

salamca commented 2 years ago

1 Fixes disabling difficulty vote when changing visibility

To test this: Log a route or many routes and try out different ascent type and publish type selections, changing them in different order. Observe that difficulty vote gets disabled as it should now.

There is one thing to consider though: what are publish types that let user cast a vote? Now they are set up to be: 'public' and 'log'. What is 'log' pt anyway?

This might all be unimportant if we decide to let the user vote in all publish types...

closes #330

2 Fixes resetting ascentTypes on date change. Now keeps them as first set.

To test this: Start logging some routes. Set ascent types. Change the date. Observe that the selected ascentTypes only change if the date change made them impossible. Try also projects, and multiple instances of same route.

closes #331

3 Fixes a bug where one could log a project and not cast a difficulty vote by 'tricking' the validation with changing the publish type to private. To test this: Log a project, select one of the tick ascent types, change publish type to some private type and make sure that the diff vote gets disabled. Observe that the form is invalid and cannot be posted. Before this test BE validation of this same thing with: https://github.com/plezanje-net/api/pull/108

closes #340

4 Scrolls mat-select or we could say 'focuses' on the route's current grade when diff vote dropdown is opened. To test: Log a route, open the diff vote input, observe that the list is 'moved' to the route's current grade

closes #341