Largo filter annotation date - #1549
Conversation
There was a problem hiding this comment.
The UI looks great but I still have two high-level comments before I look at the code:
-
I'm not sure if the "updated" variants of the filter are useful. IIRC an annotation is updated only if the shape is modified. Do we really anticipate cases where users want to filter by the date when an annotation shape was modified? An annotation label is never actually updated. There is an update API endpoint (for the confidence) but this is a relict of the past and we never implemented the confidence in the UI.
-
I think we can stick to the way the other filters are encoded. They use e.g.
shape_id=5orshape_id=-5(for "is" and "is not"). Here we could use:annotation_created_at=<2026-09-02(less than)annotation_created_at=2026-09-02(equals)annotation_created_at=>2026-09-02(greater than)annotation_created_at=-2026-09-02(not equals)
The "ref" can be encoded in the original key like "annotation_created_at" or "annotation_label_created_at". I don't know about if this makes the code more complicated but to me this is more consistent with the existing filter interface. And it may still be a good template to implement more advanced filters in the volume overview or the annotation tool (#241, #255).
Resolves #1166
Creates a
created_atandupdated_atfilter for Largo. It was not straightforward as an implementation. The solution I found was to use an arraywith ref as
annotationorannotation_label, 'gt', 'lt', 'eq', 'neq' to explain whether the annotation is after, before, on a day or not on a day. Forupdated_atis the same.