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

Review edge-cases upon removing an image (re: filters) #708

Open
tcompa opened this issue Jan 28, 2025 · 1 comment
Open

Review edge-cases upon removing an image (re: filters) #708

tcompa opened this issue Jan 28, 2025 · 1 comment
Labels

Comments

@tcompa
Copy link
Collaborator

tcompa commented Jan 28, 2025

Branching from #689 for a specific topic.

There is a possible edge case that I don't know how to handle.

Suppose to have an image with an attribute having key = k1 and value = v1. Then, the user opens the dataset filters modal and add an attribute filter selecting k1 and v1 from the dropdown selectors that have been built based on the image page. After that, the user removes the image and opens the dataset filters modal again. The modal is not able to list k1 and v1 in the dropdown menus, because these values don't exist anymore.

Should I just ignore them and not display them to the UI?

Another possibility could be to let the backend removing the invalid dataset filters when an image is deleted.

Originally posted by @zonia3000 in #689

Removal of image list entries should be rare. If we do hit that edge case, it's a good question on how we want to proceed.

If we just keep the filter in place, it shouldn't interfere with any functionality. Because these attribute filters are "OR" inclusion filters, having e.g. 10 entries, only 9 of which really exist for key k wouldn't be an issue.

If all entries with key k are removed, that's a different story, but that should be super rare.

Thus, when an entry gets removed, I don't have a strong opinion on whether we keep showing the filter values. We'll always have to show all filter keys though.

Originally posted by @jluethi in #689

@jluethi
Copy link
Collaborator

jluethi commented Jan 29, 2025

Let's hold off on changing anything here and see if this ever comes up as an issue in real usage

@jluethi jluethi added backlog and removed to be discussed Not ready to implement labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants