edgeryders / discourse-annotator

A text annotation and analysis application for Discourse. Made with Annotator.js and Ruby on Rails.
https://edgeryders.eu/t/6811
Other
4 stars 0 forks source link

Sort by number of annotations #203

Closed miahass closed 3 years ago

miahass commented 3 years ago

In the sort by drop down in the "codes" backend, provide an option to sort by number of annotations.

image

tanius commented 3 years ago

This should be straightforward and fast to implement, so we won't need added budget for it.

I think sorting by number of annotations should be a tree sort, sorting all the branches separately. Codes would still be shown as a hierarchy. The number to use for parent codes should be the total, incl. uses of the child codes. So in the case of "accessibility (48 + 2)" above, the sort criterion to use would be 50. This makes sure that often-used child codes appear high up in the list by pushing their parent element high up.

damingo commented 3 years ago

There is now an additional sort option "Sort by: Number of annotations". Codes with the most number of annotations are displayed first. Each branch is sorted separately. As discussed with @tanius we decided that the sort order of parent codes does not factor in child codes (as proposed in @tanius comment above). If this is important it can still be implemented, but will require several hours of work as code will need to be rewritten.