decker-edu / decker

A markdown based tool for slide deck creation.
GNU General Public License v3.0
53 stars 13 forks source link

Remove Token Input and Feedback Maintenance #83

Closed salbeira closed 8 months ago

salbeira commented 8 months ago

Removed the token input field at the top of the feedback menu. This required handling the received usertoken from the backend api in a different way.

Becasue the original code used the input-field's value at most points where the usertoken was used I had to touch a lot of functions where this was used. I used the chance of having to touch most of the functions in this module to rewrite all the .then() calls we had into proper async code. Some documentation inside the module's comments was also out of date.

Also added some visual (and title and aria-label) toggling to the login button for question administration.

With some tweaking we can also add some hooks to the plugin for user-notifications in the future ("comment successfully posted", "no connection to the backend service possible", "login failed: username / password combo wrong" etc.), but that is not part of this PR.

Due to the input field being gone now, the menu container looks a bit different. Some CSS tweaks might be necessary.

Please test if the tweaks do not break anything. In my tests I was able to post, up-and-downvote, login, edit and answer questions as usual.

Closes #70 .

mbotsch commented 8 months ago

Works for me.

@monofon: Please give it a try and merge if it works for you, too.

monofon commented 8 months ago

Works for me too.