Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kvp search #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Kvp search #18

wants to merge 6 commits into from

Conversation

Rdornier
Copy link

@Rdornier Rdornier commented Sep 2, 2024

Hi @Tom-TBT

I've begin to work on the key-value search. For now, it only search for keys (not values) in different namespaces.

Next steps

I'm thinking about having different fields for keys and for values, but each fields being filled with only one choice (I found out that ChoiceField is doing this trick). But I also wanted to do it interactive by adding fields dynamically. For example, we can have a "+" button that creates a new fields for key/value in order to not hard code a definite number of those fields.

Problem : it seems that the way TagSearchForm is written does not allow having fields as a list that we can populated dynamically. I don't have any idea for now on how to solve this.

@Tom-TBT
Copy link
Member

Tom-TBT commented Sep 9, 2024

Hey Remy,
thank you for starting the work. I've tried it and I would have a general remark at this point. It seems that you duplicated the logic of the "tag search" for the KV pair. However, unlike the tags, KV pairs annotations are not "reused"; most of the time there is one object per annotation. So I will always get a single result whatever KV pair I select in your search. I guess that's also why I get multiple time the same option in the search bar. There should be only one option when there are several times the same KV pair:

image

I haven't yet taken the time to think about the UI, but the way it is now, I'm guessing you want to allow someone to filter on KVP and tag at the same time. Is that right?

@Rdornier
Copy link
Author

Hey,

thanks for your reviewing

It seems that you duplicated the logic of the "tag search" for the KV pair. However, unlike the tags, KV pairs annotations are not "reused"; most of the time there is one object per annotation.

I know. This was just the very first attempt, to understand a bit the logic behind and to show you what I have in mind. Instead of the ID, I should put the key but I haven't had the time yet.

I'm guessing you want to allow someone to filter on KVP and tag at the same time. Is that right?

Yes, but I think it is already the case. What I had in mind was to be able to pile-up multiple key/value filters, a bit like this, with a + button to add a new filter. But I'm not sure this is feasible rightnow, with the current framework.

image

I'll try to find a bit of time this week or next week to move on this.

@Rdornier
Copy link
Author

Hi Tom,

I have a minimal working example, with two different KVPs to search, in combinaison with tags.
I still have to find a way to :

  • restrict keys & namespaces to those which are link to the remaining images
  • add kvp fields dynamically

But it should already be possible to test it

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.

2 participants