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

Saved Searches properties GUI - insufficient names and query validation #1044

Open
kocio-pl opened this issue Mar 3, 2024 · 4 comments
Open
Labels
enhancement low-hanging-fruit "Easy picks" suitable for new contributors to tackle

Comments

@kocio-pl
Copy link
Contributor

kocio-pl commented Mar 3, 2024

  1. It's possible to add multiple identical saved searches. GTG should check if such name is already saved.
  2. Saving searches shows them immediately on the list, but deleting does not work until application restart (trying to delete them more than once raise an error of course).
  3. It's possible to save searches with invisible names, for example only whitespace(s) or even "null" search (saving without typing anything). I think it should be not possible to save them or at least give them some visible name.
@nekohayo
Copy link
Member

nekohayo commented Mar 4, 2024

Regarding point no.3, I believe the current code validated for non-empty names, but not non-empty queries ; in think it should also check for that (and ideally do some more advanced checks for valid syntax or something, but I don't know exactly what criteria to apply there)

@nekohayo nekohayo added enhancement low-hanging-fruit "Easy picks" suitable for new contributors to tackle labels Mar 4, 2024
@nekohayo
Copy link
Member

nekohayo commented Mar 4, 2024

For your problem no2, I bet there is some relationship between this and #1005 (for tags)...

@nekohayo nekohayo changed the title Saved searches problems Saved Searches properties GUI - insufficient names and query validation Mar 4, 2024
@kocio-pl
Copy link
Contributor Author

kocio-pl commented Mar 4, 2024

Regarding 2, if I add explicit definition for ds.saved_searches.remove, the problem is reverse - search is deleted from the list immediately, but after restart it returns (so it's not saved probably):

def remove(self, search_id: uuid4) -> None:
    """Remove saved search"""
  
    search = self.lookup[search_id]
    self.data.remove(search)
    pos = self.model.find(search)
    self.model.remove(pos[1])

I'm not a coder, so this might be broken in many ways, but this is what I thought might work at least. It's just some input which could help debug the problem.

@nekohayo
Copy link
Member

nekohayo commented Mar 4, 2024

Related: #1048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement low-hanging-fruit "Easy picks" suitable for new contributors to tackle
Projects
None yet
Development

No branches or pull requests

2 participants