mrvladus / Errands

Todo application for those who prefer simplicity.
MIT License
288 stars 65 forks source link

Show/Hide Completed Tasks button #138

Closed ekasprzak closed 4 months ago

ekasprzak commented 8 months ago

Hello, I have a lot of completed tasks that I don't want to be deleted. Would be nice to have a button on a task list that would show/hide completed tasks.

mrvladus commented 8 months ago

I'll see how can I implement this.

Sesivany commented 8 months ago

Or at least sort completed and uncompleted tasks. Currently it's really difficult to get oriented in the list of the tasks when it's cluttered with completed tasks, you have to look for uncompleted tasks among them and they have no due date info visible in the list either. I know I can delete the completed tasks, but I think the completed tasks should get out of the way automatically.

jeena commented 8 months ago

I agree that deleting completed tasks takes away a lot of context which you might have stored there and might want to get back to when you're doing other related tasks. Especially when it comes to subtasks.

rubenmvc commented 6 months ago

Hi everyone! I tried to do a simple implementation of this feature but before promoting any branch or merge request, I would like some feedback to know if this properly reflects the enhancement to be developed or if there are some additional aspects to consider.

For example, I'm not sure if this option should affect all the lists at the same time or only the ones that you selected as you can see here.

As a side note, this is my first attempt to do a code contribution to an app I really like, so thanks in advance for your help!

Screencast from 2024-03-10 23-44-17.webm

Anthony-Fiddes commented 6 months ago

Per list is definitely more flexible (and the way you implemented it looks great too!).

When I subscribed to this issue, I just wanted any way to hide completed tasks at all. I think I initially imagined it being a global toggle, but I also don't use more than like 5 lists, so a solution like is shown in the video would still be good for me.

mrvladus commented 6 months ago

@rubenmvc Hi! It's really cool! I'm currently working on redesign of task lists using ListBox so I can dynamically sort them or show/hide completed tasks. I have some perfomance issues with it though. But probably it would be easy to fix. All current progress is on the dev branch. I didn't write database migration code yet, so you need to delete data.db file at the data directory first to run it.

rubenmvc commented 6 months ago

@mrvladus Thanks for the feedback! If you're already working on that redesign I suppose your solution will be even better so I'll save mine locally (just in case, it was based on main) and try instead the current work on dev branch to see what is the status and if something could be improved.

The problem is that I tried to find that data.db file at the "data" directory and I couldn't find anything. Just to be sure, I deleted the entire project and clone the repository again and I have the same issue, so I can't find where is the db file.

Screenshot from 2024-03-11 15-29-28

mrvladus commented 6 months ago

@rubenmvc sorry, I wasn't clear. File at ~/.var/app/io.github.mrvladus.List.Devel/data/errands/data.db

rubenmvc commented 6 months ago

@mrvladus Don't worry, thanks for the clarification! I deleted the DB and tested the most recent changes from dev (btw, I love the dynamic sort and the quick actions inside the item!) and I can confirm the small delay/freeze when completing tasks and refreshing the list. Let's see if I can identify what could be the root cause and try to fix it.

Aside of that, I also tried to re-implement the same idea from my first message (https://github.com/mrvladus/Errands/issues/138#issuecomment-1987397597) using the more recent dev codebase in case that we want that functionality, as you can see here. I don't know if in your redesign you wanted to achieve this in other way or my suggestion fits properly.

Screencast from 2024-03-11 19-47-28.webm

Just to tell you, but basically what I did was a similar approach to the "Delete Completed Tasks" behavior: loop over the task list and when a task (or sub-task) is complete, depending on the toggle status I change the visibility of that item. If it is OK for you, I could push my branch in case that you want to check it.

Thanks in advance! :)

mrvladus commented 6 months ago

@rubenmvc you can make a MR. And I have found the issue with lag, it's in sql code, so no problems with ListBox. Just need to do some refactoring.

rubenmvc commented 6 months ago

@mrvladus Sorry for the inconvenience because maybe I'm doing something wrong, but I'm trying to push my branch with the new feature to the repository in order to perform later a MR as explained in https://welcome.gnome.org/en/app/List/ but I keep having the same output:

ERROR: Permission to mrvladus/Errands.git denied to rubenmvc.

I checked at least twice that everything is properly configured (ssh keys and everything else) so I don't know if I require something from your side, some kind of additional permissions to contribute.

mrvladus commented 6 months ago

@rubenmvc you need to fork this repo on GitHub, then clone your fork, make changes there, and push them. After this you can make a pull request on GitHub.

rubenmvc commented 6 months ago

@mrvladus Thanks for your help, it was my fault because somehow I skip that critical step and I didn't notice. You can review it and merge it if you want :)

One more thing, just to know for future contributions: when implementing new features like this, should I provide also some translations, in this case for the new button (I could add them to this PR)? Or it is better to do it later as an additional MR? (from me or other contributors)

mrvladus commented 6 months ago

@rubenmvc trasnslations are managed separately. I will use Weblate in the next release.

rubenmvc commented 6 months ago

@mrvladus Sorry for the delay, I have read your comments on the PR and also you've already done some small tweaks over my implementation. I've checked them and it's cleaner and improved, thanks! At least we have a first functional version :)

As I understood from the PR, the next step could be the inclusion of this functionality in the preferences menu at the task list headerbar. I saw that "Show Completed Tasks" switch there, so I suppose that would work as a global preference that overrides the current toggle over each task list, or am I wrong?

mrvladus commented 6 months ago

@rubenmvc I'll remove that preference, because I'm going to make it per-list setting.

major-mayer commented 5 months ago

Does this PR also include the functionality to hide tasks that have not started yet? Or should I create a separate issue for this?

mrvladus commented 5 months ago

@major-mayer What do you mean by 'have not started'? If you talking about showing only tasks for today, then I added Today page with tasks planned for today. Снимок экрана от 2024-04-05 15-11-04

major-mayer commented 5 months ago

Having a today page would help me, but only if it also lists all tasks that have no start date.

I am talking about tasks like this: grafik In this case, my "Zahnarzt" task is shown, even though the task date is set to 02. September 2024, so basically it's not relevant right now. I would like to be able to hide those tasks.

mrvladus commented 4 months ago

Added in 46.0

major-mayer commented 4 months ago

Added in 46.0

Not sure if that's exactly doing what I have wished. The today page for me is only showing the tasks that are due for today, but most of my tasks don't have a due date, so it's mostly empty. The task list page shows all tasks that haven't been completed, including the ones that haven't started yet. I don't see an option to hide those tasks.

Should I create a separate feature request, or did i miss something?

Edit: More or less this feature request covers my needs: https://github.com/mrvladus/Errands/issues/274

mrvladus commented 4 months ago

@major-mayer If I undestood correctly, you want to show tasks inside Today page that have start date and don't have due date (meaning currently started tasks) ?

major-mayer commented 4 months ago

I'm not quite sure if tasks that have a start date and don't have a due date would be suitable for the today page, because it's not due today. I'm even less sure about tasks that don't have a start date at all.

But it would be really nice to have an option in the task list page (!) (so when you click on a specific task list an look at the tasks there) that hides tasks that have a start date and this date is in the future. Those tasks are probably not relevant in most cases.