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

All tasks page with filters #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sim6
Copy link
Contributor

@sim6 sim6 commented May 16, 2024

Fixes #282 because also can sort by priority.

@mrvladus
Copy link
Owner

That's a good starting point, but it needs adjustmens.
I don't think we need 'Pending' page specifically, I think we need 'All Tasks' page, with ability to set filters and sorting. And ideally, we need to be able to set filters and sorting for Task Lists too, but that can wait. I wanted to use for this GioListStore models and bind it to GtkListBox, so I can easily filter and sort it. But when I tested it, it has bug when it was sorted or filtered or added/deleted task it was autoscrolling to the top of the list. Maybe it wasn't a bug but I don't know how to fix it.

With current code I found couple of bugs:

  • When task added to any list, count of all tasks needs to update.
  • When there is a lot of tasks 200 or more, it's lags when swithes to Pending page, probably because it's updating UI of all tasks
  • When it's updating UI it's not sorting tasks.

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch 2 times, most recently from 36d4039 to 237826b Compare May 17, 2024 16:31
@sim6
Copy link
Contributor Author

sim6 commented May 17, 2024

What do you think about 237826b to avoid render delays.

@mrvladus
Copy link
Owner

mrvladus commented May 17, 2024

It's a good idea! Especially for first launch speed improvement and reduced memory usage on startup. We can add this to Task Lists too.
It can be improved by loading new batch of tasks when user scrolls to, maybe, 10th task from the bottom (not just the bottom like it's now) so that loading can be more smooth.

The problem with lag appears again, when Pending page loaded more tasks.

@mrvladus
Copy link
Owner

We can add this to Task Lists too.

Nevermind. I've tested it, it's even more laggy. Let's scrap this idea.

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from 237826b to 922e69a Compare May 21, 2024 16:35
@sim6
Copy link
Contributor Author

sim6 commented May 21, 2024

I rebased it onto main.

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from 922e69a to 7fbd708 Compare May 21, 2024 16:42
@sim6
Copy link
Contributor Author

sim6 commented May 21, 2024

With https://github.com/mrvladus/Errands/compare/922e69a6fdbde94049395a6f0960e64243c13859..7fbd70827d584e744c5801ba205d233d7d8684c9, it renders more content when the scroll reaches the last page instead of the bottom.

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from 7fbd708 to 0293cf1 Compare May 22, 2024 18:14
@sim6
Copy link
Contributor Author

sim6 commented May 22, 2024

I rewrote the code to dynamically render the content using Gtk.ListView

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch 3 times, most recently from 2c912f4 to 5926021 Compare May 23, 2024 01:34
@sim6
Copy link
Contributor Author

sim6 commented May 24, 2024

About the performance, please see #301.

@mrvladus
Copy link
Owner

I think I found fix for scrolling problem I described earlier. So I can use models for task lists which will allow for filtering and sorting. I wanna experiment with creating only one Task List Page with all tasks and use sidebar rows as filter switches that will show only tasks for that list. Then I think we can make only one page like Filter Page and use Today, Pending, All rows as filter swithes for that page, reducing the number of widgets.

@sim6
Copy link
Contributor Author

sim6 commented May 24, 2024

With Gtk.ListView I cannot reproduce the scrolling problem you described earlier.

With the current code of this pull request a Gtk.FilterListModel could be interceded between Gio.ListStore and Gtk.SortListModel to filter the list.

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from 5926021 to f2e587c Compare May 25, 2024 10:28
@sim6
Copy link
Contributor Author

sim6 commented May 25, 2024

I added a filter by text or notes via 0c31b58

@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from f2e587c to 0c31b58 Compare May 25, 2024 10:30
@sim6
Copy link
Contributor Author

sim6 commented May 25, 2024

Oh! Thanks to improve the search box!

Co-authored-by: Vlad Krupinskii <[email protected]>
Signed-off-by: Simó Albert i Beltran <[email protected]>
@sim6 sim6 force-pushed the pending_page_ordered_by_priority branch from 66ae4f5 to 98de6ef Compare May 25, 2024 22:38
@sim6
Copy link
Contributor Author

sim6 commented May 25, 2024

I reworked it to have one page with all tasks with filters and sorters. More filters and sorters can be added in a near future with complex widgets or search operators.

@sim6 sim6 changed the title Pending page ordered by priority All tasks page with filters May 25, 2024
@mrvladus
Copy link
Owner

Nice! But I wanted to have separate Today Page where all tasks for today and all overdue tasks will be, 'cause it's most used page for planned tasks. And separate All Tasks Page for all tasks. Ideally, to include search, sort and filters in both of them. Like order by due date, start date, creation date. And put all of the filters toggles inside of the popover menu button in header bar. Today Page sidebar row can act like a filter toggle for all tasks page, so we don't need separate pages, when we click on it - it changes title to "Today" and filters only today and overdue tasks. And when we click on "All Tasks" row it clears today filter and changes title to "All Tasks". Something like that...

@sim6 sim6 mentioned this pull request Jun 5, 2024
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.

List of all pending tasks ordered by priority
2 participants