209: Add comment fields for translators #804
Conversation
There are a few things I noticed:
It's also throwing two errors with an empty table:
|
One other item, I'm not sure I like "feedbacks", perhaps "notes" would be better? Or something else? |
Yes of course there few issues but was the first draft but I can fix them asap. |
It's fine to save it during approval, but there should be a button to save it outside of that process as well, at least in my opinion. I can imagine an approver going back and forth with the translator a few times before getting it just right and have to "reject" it each time seems a little harsh |
Good point! |
Something else to think about is creating a "thing" for the "feedbacks" (maybe rename "comments"?) like there is for the translations, projects, etc. (take a look in the gp-includes/things directory). |
I don't like the actual workflow, go to the textarea, scroll bottom, add your text and submit and automatically there is the feedback with appended username and date. The comment will be the same entry in the db with only updated the date and the user author of the last edit. In any case is working and probably will not to be integrated with #702 |
I'd invert the flow, put new entries at the top. Perhaps break it up in to two sections, a read only textbox to show the stored notes and a second to write the new addition? |
Or perhaps when you click "Add feedback" it gives you a dialog box to enter the new feedback in to? |
Uhm yes maybe show the old as not editable text outside the textarea and when saved that content is merged |
Perhaps only let admins edit the old text, just in case they need to remove inappropriate content. |
It's not clear to me how works the permission system in glotpress so actually I didn't implemented this part to work on the rest of stuff :-) |
Permissions are supported through the Basically you can use So to edit existing feedback you might do something like:
But to simply add feedback you could do something like:
Actions include: read, write, approve, admin, delete. But are not limited to those, any action that can be stored in the permissions table can be referenced by the permission functions. Likewise for object types. |
Would changing the format of the "entries" from "test by user @ time" to:
(including the blank line at the end) be more readable? Likewise I think splitting the button in two makes it easier to understand. One button under the old text when you are an admin to update that and the second button under the new text dedicated to adding new. With the current structure how do I know what the update button does? If I edit both fields is one going to overwrite the other? |
The code check what text is changed and automatically update but I changed the text of feedback as you suggested :-) |
For me a single button is more useful because I can maybe change the old notes to remove some of them and add a new one but when I click the button I got a refresh (ajax call that replace all the html of that section) so I can lost all the edits. With a single button the user has the suggestions that can change both of them with a single action and avoid this problem. |
I'm not tied to either way, I try and keep buttons doing only one thing as a general rule of thumb though. The more I look at the code though I'm convinced there needs to be a Take a look at the |
TODO: Replace feedback with note in all the code |
replaced the reference from feedback to note |
I fixed also the code issue in my code using the phpcs ruleset but phpcs report many other issue that are not from my code but in the files that I changed. |
* | ||
* @return object The output of the query. | ||
*/ | ||
function save_note( $note, $translation ) { |
toolstack
Sep 15, 2017
Contributor
have _note
is probably redundant.
have _note
is probably redundant.
* | ||
* @return string The note. | ||
*/ | ||
function get_note( $entry ) { |
toolstack
Sep 15, 2017
Contributor
Same as above.
Same as above.
It is very appreciated that you are working on this problem This solution would be more effective: Not to forget that there is the possibility of bulk edit. An example: The german language has two forms of address: default and formal. Often enough the strings are in wrong form of address ("Sie" in default e. g.). The workflow is: Filter for "Sie", tick all checkboxes at once and reject. Would be necessary to have also an textarea/reviewers feedback for bulk edit. |
@La-Geek thanks for the feedback, the reject with feedback (aka the check boxes) will be looked at after 3.0, for now getting the notes/comments in place is a big step forward. The current notes implementation isn't just for "reject with comments", but allows notes to be added at any time through the translation cycle. This will allow translators to add information that could be useful in the future as well as to the current translation process. |
Closing in favour of the clean git history version PR #975. |
Mte90 commentedAug 26, 2017
•
edited
This code save the feedback when the reviewer click to change the status.
The field is disabled if is not the user that written.
I have to improve the check for permissions but actually my implementation is very simple, a new table and is possible to leave only a feedback for translation so I am not sure if it is better to leave a comment with reply or block to changes after the submit.
Ref: #209