plezanje-net / web

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

374 add route warning missing #402

Closed NejcS closed 1 year ago

NejcS commented 2 years ago

This PR fixes the problem that the user does not have an option to add a warning to a route. The reason is that the warnings are listed at the top of the route page where they do not have a button. This PR is a proposal of how we can fix this (we talked about this solution briefly on a video call).

It merges all the "Dodaj komentar", "Dodaj opis smeri" and "Dodaj opis razmer" buttons into one "Dodaj komentar". After clicking this, the user can select the type of comment that they want to submit in the comment form. The "Opozorilo" option enables the user to submit route warnings.

This solution is a proposal so we might have to debate about it.

Before:

image

After:

image

Before:

image

After:

image

Example of comment form with comment type dropdown:

image
NejcS commented 2 years ago

After debating how to improve this mess, we decided to remove the option to add new conditions comments and descriptions. This way, the dropdown for selecting the type of comment the user wants to submit is not needed anymore and removed. To add warnings, I added a "menu" button to the header of the route page. It is now the same as it is on the crag page where you can also add warnings from the same menu.

Screenshot 2022-08-05 at 16 19 39
salamca commented 2 years ago

Editing or deleting a comment throws an error>

image
salamca commented 2 years ago

Content of a comment should be required. (posting an empty comment produces an error) Best to fix this along the way...

NejcS commented 2 years ago

@salamca the content field of the comment form is now required. I also fixed the query error that was thrown on edit and deleted.