Skip to content

Largo filter annotation date - #1549

Open
dbrembilla wants to merge 12 commits into
masterfrom
largo-filter-annotation-date
Open

Largo filter annotation date#1549
dbrembilla wants to merge 12 commits into
masterfrom
largo-filter-annotation-date

Conversation

@dbrembilla

Copy link
Copy Markdown
Contributor

Resolves #1166
Creates a created_at and updated_at filter for Largo. It was not straightforward as an implementation. The solution I found was to use an array

[
  created_at => [
    ref => 'annotation'
    operator => 'gt'
    date=>'2025-01-02'
]
]

with ref as annotation or annotation_label, 'gt', 'lt', 'eq', 'neq' to explain whether the annotation is after, before, on a day or not on a day. For updated_at is the same.

@dbrembilla
dbrembilla requested a review from mzur August 18, 2026 13:57

@mzur mzur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=5 or shape_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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter annotations in Largo

2 participants