-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow responding to annotations in a thread #4404
Conversation
This reverts commit 2009cf8.
…dona into feature/question-threading
Maybe "Reageer ..." as a translation of "Reply ..."? That's also somewhat the translation used in Google Docs ("Reactie toevoegen"). |
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 code looks good, I will do a final functional pass this afternoon.
Regarding the states, importing just the methods like now seems a bit strange because in the file using them you don't have a lot of context when you call them. If these would be objects a call like state.getXXX
would be more clear. But as discussed, Potentially refactoring this (with or without redux) is something for a later PR.
Regarding my comments on the "meta" folder: after checking in detail, I agree that i18n, shadowless and watch can be called meta. The modal one is something different.
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.
👍
Co-authored-by: Charlotte Van Petegem <[email protected]>
This pull request adds threading to annotations. This allows users to respond to a specific annotation.
In order to add this functionality in the frontend, a major refactor of the frontend implementation of annotation is also contained in this pr.
I will first go over the functional changes from a user perspective. I will list the technical changes later.
Functional changes
First of all, the visuals of a user annotation have changed a bit:
old:
new:
The options to edit, delete or save an annotation for reuse are al moved to less intrusive dropdown button:
Clicking on the new answer input field opens up the existing larger form, that allows you to create a response on this annotation:
An open question inside a thread is clearly marked as such using an icon:
When you click the answer form, the question will be marked as in progress for one hour:
Adding an answer to a question will automatically resolve it:
An open question can also be resolved by clicking 'mark as answered', which will appear on each thread with an open question:
It is no longer possible to change the question status back to 'unanswered' using this interface. If desired I could add this option underneath dropdown.
Technical changes
Backend
The backend changes are rather minimal. An annotation now keeps track of it's
thread_root_id
.If no thread root is defined an annotation is assumed to be the thread root.
Annotations with a thread root id are considered responses to that root annotation.
Only one level of threading is allowed. Thus a response to an annotation cannot be the thread root of another annotation. Validations and tests for this case are included.
Frontend
All annotation related code has been refactored to webcomponents and the state event system.
The webcomponents contain all code related to visualizing a component.
The state contains all data displayed on the page. The state is responsible for making requests to the backend, and notifying webcomponents if the data they are using has changed.
Splitting up these responsibilities should lead to more readable and more maintainable code.
As the amount of webcomponents increased a lot, I also decided to move some of them into more dedicated folders.
Closes #2827.