Skip to content

Do the filtering before building task trees for the UI #1208

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

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

Conversation

gycsaba96
Copy link
Contributor

Fixes #1207

The main idea is that the TaskStore provides pre-filtered Gtk.TreeListModel instances using the newly introduced FilteredTaskTreeManager class. This class performs the filtering before building the tree, thus producing correctly indented tree models. The FilteredTaskTreeManager also helps track when the expander should appear in the UI.

Sidenotes:

  • When filtering based on a tag, the parents of matching tasks are also displayed. This behavior was already present before the changes (likely a bug in the filter).
  • I believe it is possible to further simplify the TaskStore by relying on signals instead of direct calls to update the trees. But one step at a time. :)

gycsaba96 added 3 commits May 8, 2025 17:46
Introduce a FilteredTaskTreeManager class that prefilters the tasks
before building a tree.

Partially fixes GitHub issue getting-things-gnome#1207
- fixing uses of TaskStore.tree_model in the main code
- re-introducing TaskStore.tree_model since a plugin directly
  references it
- avoid duplicated creation of ListStore instances
- other small fixes
@gycsaba96
Copy link
Contributor Author

I rebased the branch to trigger the updated GHA workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filtering of tasks doesn't play well with the tree structure
2 participants