Cvat: Sort labels in alphabet order

Created on 17 Aug 2018  ·  11Comments  ·  Source: openvinotoolkit/cvat

Currently they are sorted by primary key. If all labels were provided at task creation it results in a semi-random order of labels. It makes significantly harder to find required label when working with a big number of them. One work-around is to add labels one-by-one, but it's not a pleasant process...

Easy to fix enhancement good first issue help wanted

Most helpful comment

Hi @newpavlov ,

Thank you for your feedback. I agree that it isn't convenient to search labels if they are not ordered. I believe it is possible not only to have them in alphabet order but also type on keyboard label's name if the input element in the focus.

Please let me know if you can send us a PR with the feature. We will really appreciate that.

All 11 comments

Hi @newpavlov ,

Thank you for your feedback. I agree that it isn't convenient to search labels if they are not ordered. I believe it is possible not only to have them in alphabet order but also type on keyboard label's name if the input element in the focus.

Please let me know if you can send us a PR with the feature. We will really appreciate that.

Unfortunately it can't be done on the back-end and should be done on front-end side. (server returns unordered dictionary which is processed by JS) At first glance I was unable to find the relevant JS code.

Hi @newpavlov @nmanovic ,

I would suggest to rewrite list responses logic django-filters.

Here is the great filtering/searching functionality that we can combine with AJAX for real-time interaction.

Example request:
GET /labels?order_by=label_name

UPD:
In fact, we can rewrite not only this part of app. I think it's better to make all lists such flexible.

Hi @cptmurphy ,

Thanks for your advice. We will look at the functionality.

@nmanovic,

Please, let me know when you make a decision. I would like to participate in your project.

@cptmurphy ,

If you would like to prepare the PR we will be glad to access it. Just assign the issue on yourself. How much time do you think the issue can take?

@nmanovic ,

I need about a week to get acquainted with your codebase, then I can tell how much time it'll take.

@cptmurphy ,

It will work for us. Let me reschedule the feature on beta. Thanks for your help and support.

Hi @nmanovic,

Sorry for delaying, I was busy for a while.

What about update: It doesn't seem that I could integrate django-filters in current app's architecture. Let me explain:

```

Should this be closed now due to https://github.com/opencv/cvat/pull/242 ?

@snosov1 ,

I think yes. Even it is possible to sort labels on client side as well (in case the task was created with unordered list of labels) I don't think that it makes sense for now.

Was this page helpful?
0 / 5 - 0 ratings