-
-
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 easy re-use of annotations #3600
Conversation
8c838a6
to
755e5dc
Compare
c2276d6
to
ce9fe83
Compare
dc86204
to
cc27b0b
Compare
This pull request introduces 1 alert when merging f8aad09 into f75a36c - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging 361bc86 into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging 0118b8f into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging a115ce9 into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging a3a8ead into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging 9a6f3b3 into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 5 alerts when merging dde7f20 into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 4 alerts when merging bc919df into 7f602f7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 3150311 into be1bf3e - view on LGTM.com new alerts:
|
@bmesuere I think I handled all your comments. I'll add some more tests later, but would prefer to have your review first. (So I don't need to change the tests multiple times because of functionality changes) |
It seems weird to me that one can save an annotation when re-using a saved annotation. (During annotation creation.) |
@chvp i was unsure about this. Potential usecase (why I allowed it) is if you want to start from a saved annotation, edit it and save it again as a variant |
Makes sense. Definitely fine to leave in for the closed beta. |
Co-authored-by: Charlotte Van Petegem <[email protected]>
Co-authored-by: Charlotte Van Petegem <[email protected]>
Co-authored-by: Charlotte Van Petegem <[email protected]>
This pull request adds the re-use of annotations. Annotations are saved separately for re-use, with an extra added title.
Visuals:
When creating a new annotation, you now have more options
You can search for an existing comment
This automatically loads the saved comment text, but you can still edit it as needed
You can save each annotation for reuse, this automatically suggest the first five words as a keyword title
There is info on the annotation showing it is created using a saved annotation
A side bar shows al saved annotations for this exercise with some basic info
You can edit a saved annotation for later reuse from this sidebar
You can also save an existing annotation, there is a button for this on non saved annotations
Which opens a similar popup
There is also a page on which you can manage all your existing saved comments
Technical
As the management of saved annotations all happens on the evaluation page, I chose to limit the api to a json rest api. (No html or js delivered except the index page)
All visualization in the frontend happens using webcomponents.
As displaying the saved annotations and manipulating them happens in different components loaded separately on the page, I created an external reactive state which triggers component rerenders when the underlying model changes.
I tried to write this state system in such a way that it would be relevant for any restfull resource.
I also created a generic modal webcomponent mixin to fix working with modals as webcomponents.
For the listing I created a generic pagination component that mimics the behavior of will_paginate. I added pagination meta data to the request headers.
I also had to edit the webpack config for this, because even with the commons js pack,
PubSub
was loaded multiple times, resulting in publishers publishing to an object without subscribers. The single runtime optimization solves this.This newly created pack is negligible in size (1.55 kb before minimization)
I have also removed https://github.com/dpogue/rails_server_timings
It is no longer actively maintained and causes the following bug: dpogue/rails_server_timings#6
It was already disabled in all config files except the test config (And I do not see its added value in an automatic test)
The plan is to first allow this in a (very) closed beta, so I will wait with writing documentation until the results of that closed beta are clear.
Closes #2825.