sleek icon indicating copy to clipboard operation
sleek copied to clipboard

Filters are reset when switching from tab.

Open 9z0 opened this issue 3 years ago • 4 comments

To Reproduce

  1. Open two files (two tabs).
  2. In tab 1, apply some filter (click on a project or context, do a search).
  3. Switch to tab 2.
  4. Switch back to tab 1.

Expected behavior

  • Filters are still there.

Actual behavior

  • Filters are reset.

Desktop:

  • OS: Windows 10.
  • 1.1.1
  • Source: Github.

9z0 avatar Aug 29 '21 21:08 9z0

To me this doesn't sound like a bug. In my own usage the described expected behavior of persisted filters would be an issue, as I use different filters in different files. So what would happen is, that after switching files, I would constantly see an empty todo list, because filters are applied that doesn't exist.

ransome1 avatar Aug 31 '21 06:08 ransome1

Thanks for replying.

Why aren't filters tab-specific?

9z0 avatar Sep 01 '21 04:09 9z0

Mainly because persisting this kind of data should require a database, which is avoided in sleek so far. And putting n filters per file into the user preferences file would bloat it beyond recognition.

You can convert this issue to a feature request and we add it to the backlog.

ransome1 avatar Sep 01 '21 04:09 ransome1

While it would be nice to have such filters persist on relaunch, keeping them at least in memory while the app is running would make for a much better UX.

Also, although I understand your aversion to having a database, it makes sense in a certain situations. I would encourage you to draw the line at the todo.txt data, not any form of metadata.

Think of it this way, if the user took their files to another computer with another sleek install, would they have a problem managing their files? They would lose their saved filters for example, but that would already be the case if we don't implement saved filters at all (what we have now). The todo.txt files themselves are not touched nor dependent on the sleek database. Same thing with colors, fonts, etc.

Sleek itself as a GUI is under the same principle! If you don't have sleek on the other machine, you would lose a lot of convenience and ease of management but the files are the same. And I would guess most users would benefit since most use a either single main machine or synced machines.

A compromise might also be to store only the filters for files open in tabs in the settings. Instead of the last file only, it would be 2 or 3 or whatever the number the user has open. If a file is closed, remove its settings from the preferences.

I'd like to hear your thoughts.

PS. I don't know how to change the label from bug to feature. I don't think I am allowed.

9z0 avatar Sep 01 '21 22:09 9z0

Has been changed in developer preview dev12. Persisted filters won't be reset on file switch.

ransome1 avatar Sep 24 '23 18:09 ransome1