-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use standard forms instead of javascript submit for textanswer review #1705
Use standard forms instead of javascript submit for textanswer review #1705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, there are warnings about having a content type header set with 204 responses (run |
fbb0653
to
02f39f2
Compare
f6cc432
to
1cdb24c
Compare
8f34059
to
5da2126
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks mostly good. Will have to test the UI manually. Some of the JS was hard to understand -- maybe we want to do something about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when selecting "yes" as publishing option for a textanswer, reloading the page and moving back to that answer in quick review, the "yes" button is not selected. it works for "no" though :D
6c6aef2
to
728a6b5
Compare
Firefox says no :(
|
728a6b5
to
1b68037
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Python) code still looks good. Still feel unable to properly review the html/js stuff.
Since you are editing these files: The message "If you should edit an answer [...]" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ Meets requirements
✔️ UI functionality checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, tested manually for a bit, worked fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The text of the third view button in the top right at the text answer review page should be changed into "Undecided"
- In quick view, the edit button sometimes links to the wrong text answer and the actions are also not always performed on the correct text answer
I think this PR is getting really big, I would do the renaming in a follow-up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ Meets requirements
✔️ UI functionality checked
It is analogous to the builtin `HttpResponseNotModified` which cannot have a content type header either. This fixes the webtest lint ``` WSGIWarning: Content-Type header found in a 204 response, which should not return content. ```
Of course, I did this strictly before implementing the feature, just like I have always been told to do.
The forms submit to the same endpoint which now returns http 204 on success instead of 200. This instructs the browser not to reload the page, which is equivalent to what it did before, but with fewer custom behavior. In the "full" view, there are now four buttons instead of three. They correspond to the four states that a textanswer can be in. Before, the fourth state "undecided" / "unreviewed" was displayed by all buttons being inactive. Additionally, I renamed the action "hide" to "delete" and the request parameter "id" to "answer_id".
612bcf0
to
c54da99
Compare
Closes #1698