add config "omero.web.annotation_order" - #684
Conversation
…space', 'date', or a list JSON list of namespaces.
for more information, see https://pre-commit.ci
…de/omero-web into annotation_display
|
Hi @JoshuaFortriede - Thanks for your PR. I've included it in our daily build for testing... Before I forget, we'll need a CLA form from you before we can accept a contribution to any of our GPL repos. Please see https://ome-contributing.readthedocs.io/en/latest/cla.html for info and instructions. Thanks. |
|
Signed and sent. |
|
This seems to be working fine (not sure why it's not working on merge-ci server...). My slight concern is that it's a bit unexpected for the sorting to happen at the point of the DB query, while relying on the JavaScript rendering of the JSON-to-html to preserve the ordering of annotations. However, I appreciate that's the way the sorting is already defined before this PR. I just worry that in the future, I (or someone else) might choose to add sorting functionality in JavaScript (e.g. with a "sort by" chooser/button for users to pick their sorting) and then the sorting from this PR could get ignored/missed. Maybe all it needs is some comment in the JS code above to say: "Annotations are ordered in the JSON response according to the cc @knabar |
Did you check that this PR is included ? |
|
@pwalczysko Yes, looked at last commit at snoopycrimecop@6de07ac which lists this PR as included. |
|
This is working on the As I understand it, @knabar is happy with this PR. cc @Tom-TBT may be interested in this feature. For me, I'd just like to see a comment in the JavaScript as mentioned above, just so future devs are aware that order of annotations in the JSON should be preserved. |
|
Hi, thanks Will for the ping, and thanks @JoshuaFortriede for the PR. It works as expected and I think it's useful. Only without setting the parameter |
|
@Tom-TBT, yes it defaults to alphabetical ordering of the namespace which is the current method. Is there a better way you would like this to be documented? |


This accepts values of 'namespace', 'date', or a list JSON list of namespaces.
This affects the order of the annotation groups (namespaces) in the right pane of the webclient. Currently the code hardcodes based on the namespace name. This allows to specify order based on the namespace name (default), date (of creation), or a JSON list. For the JSON list, it will order based on the list, and then default to the namespace name.
This allows flexibility from system administrators on how they want to display the data to ensure the most relevant annotations are at the top without having to resort to ascii-ordered naming conventions.
Examples:
omero config set omero.web.annotation_order namespace
omero config set omero.web.annotation_order date
omero config set omero.web.annotation_order '["my_annotation/space/group4","my_annotation/space/sample2","my_annotation/space/group2"]'