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

Add support for "Tasks: Astrid To-Do List Clone" #2

Closed
yvolk opened this issue Jan 19, 2020 · 15 comments
Closed

Add support for "Tasks: Astrid To-Do List Clone" #2

yvolk opened this issue Jan 19, 2020 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@yvolk
Copy link
Member

yvolk commented Jan 19, 2020

Current state

The app "Tasks: Astrid To-Do List Clone v.10+" is supported.
This not only gives us another app to manage tasks, but also allows to see Google tasks in our widget and manage them via the Tasks app.

Initial thoughts

There is a long outstanding need to integrate our Widget with Google Tasks (see e.g. plusonelabs#29 ).

Astrid To-Do List Clone ( https://github.com/tasks/tasks ) is integrated with Google Tasks, and so we could try to integrate our widget with it and thus get integration with google tasks.

I found some info on possible widget integration with Astrid: tasks/tasks#817 and also contacted with its developer. As @abaker wrote me the app does expose a content provider to read some basic task information. This content provider was originally from Astrid Tasks, and the Pure Calendar Widget app is using it: https://github.com/tasks/tasks/blob/3d89511a1886ac5fbdce38e91e64ed289c6a8ab3/app/src/main/java/com/todoroo/astrid/provider/Astrid2TaskProvider.java

@ekalin
Copy link

ekalin commented Jan 22, 2020

Integration with Tasks (Astrid clone) would be a nice feature. It seems a popular app, and also syncs with Google Tasks and CalDAV.

The content provider works, but has some limitations:

It ignores what is passed to it (projection, query, where, etc) and always returns the results of a fixed query. Filtering (by date and task list) would need to be done on the calling class, but that shouldn't be a problem.

The start date (called Hide until in the app) is not returned. Instead, hidden tasks (their "Hide until" is after now) are not returned. This might be a more serious limitation. (However, the concept is slightly different - the app by default does not display hidden tasks, instead of displaying tasks later as other task managers do for tasks with a start date in the future.)

It should be simple to change Tasks to return this date, but it would change the behavior for any existing consumer of the content provider, since tasks that are currently hidden would suddenly appear. In practice I'm not sure this is a problem, the author is only aware of Pure Calendar Widget, which hasn't had new development for a while, and the last version was buggy when I stopped using it.

The current query could be kept, and a new one could be added, but this increased the maintenance burden, I'm not sure if the author would be willing to do that.

Anyway, even in the current state, integration should be relatively simple.

@abaker
Copy link

abaker commented Jan 23, 2020

I'm willing to create a new content provider if the existing one is insufficient

@yvolk
Copy link
Member Author

yvolk commented Mar 9, 2020

Hello @abaker!
I created initial implementation of your app's support in the ToDo Agenda widget. It already can show tasks from your app (that I built from sources from master branch), but due to above mentioned provider's (and app's...) limitations is too primitive yet to be usable.
Please see this class, it contains my TODO comments mentioning places in your app (content provider) that need to be improved: https://github.com/andstatus/todoagenda/blob/feature/2-support-astrid-clone/app/src/main/java/org/andstatus/todoagenda/task/astrid/AstridCloneTasksProvider.java

This is just the first iteration, so please don't consider it to be the final API. Moreover, Tasks support in the "ToDo Agenda" widget is quite basic, so I expect to extend it (and hence may need e.g. additional data and API endpoints, e.g. an intent to ADD new task.

It's up to you, of course, whether to extend existing provider or create a new one...

@abaker Your move!

Screenshot_1583775313

yvolk added a commit that referenced this issue Jul 3, 2020
…d. Otherwise we cannot test Google tasks support.
@yvolk
Copy link
Member Author

yvolk commented Jul 3, 2020

ToDo Agenda v.4.1.0 with support of the "Tasks: Astrid To-Do List Clone" is released today. See #3 for download options.
The support is not announced yet, because the Tasks app with corresponding changes is not released yet.

@abaker

On the below screenshot we see task list from Open tasks ("Dmfs tasks 1") , and two task lists, provided by "Tasks: Astrid To-Do List Clone": one of them is actually Google tasks ("CW tasks" on the screenshot).
Screenshot_1593455477

@yvolk
Copy link
Member Author

yvolk commented Aug 30, 2020

See also the new "Add task" button implemented in v.4.2.0 #3
google-tasks_20200830-132620

@Torenga
Copy link

Torenga commented Sep 6, 2020

I tested out Todo Agenda after Tasks: Astrid To-Do List Clone dropped v10 and mentioned Todo Agenda in the release notes. What a great widget that combines both calendar and tasks, just what I've been looking for!

There is one issue that currently is stopping me from using Todo Agenda as my daily overview - All day tasks.

Most of my tasks are assigned to "All day" in Tasks: Astrid To-Do List Clone and are correctly displayed in their own section at the bottom of the agenda in the Tasks app. But they show up at noon, 12.00, in Todo Agenda!

When assigned a due time they show up in the correct location compared to calendar entries. This is really confusing when trying to get a quick overview of today's tasks and meetings - Have I set the due time at 12.00 exactly or are they "all day, unassigned time" and just show up at noon?

I request that all day tasks without a specific due time is shown (in order of preference)
-At the top of today's agenda
-At the bottom of todays agenda
-At the top of "dateless" task list at the very botton
-Not at all until assigned a proper time

And that tasks with due date but without due time is marked as such, perhaps with an "All day" tag/text.

Thank you for your consideration!

@yvolk
Copy link
Member Author

yvolk commented Sep 8, 2020

Thank you for the review @Torenga. Fortunately, you are not the first, who noticed that tasks without start and due dates should be placed in some predefined place or maybe even hidden. And we do have "Tasks without start and due dates" setting in "Event filters" section, allowing a User to make their choice. More details and examples in: #4

...But we don't have "Today at noon, 12:00" option there. Please check, when exactly your events are shown now.

@abaker
Copy link

abaker commented Sep 8, 2020

This is likely due to the way Tasks denotes all-day events. This is behavior carried over from Astrid that I haven't addressed yet.

A task is considered all day if the timestamp's seconds and milliseconds are 0 (source).

Additionally, tasks without due times are assigned a time of 12:00:00 (source). I'm not sure what the rationale was for this behavior, but I think it was so that all-day events would be sorted between morning and afternoon events

@yvolk
Copy link
Member Author

yvolk commented Sep 9, 2020

@abaker Thank you for clarifications and links. This means that in addition to changes in integration code between our apps we need to do some conceptual changes in ToDo Agenda:

  1. Add "All day task" support. This is easy as we do have "All day Calendar events"
  2. Add support of "Calendar event or Task with date but without time". We don't have such a notion yet in our app. Thinking about existing Calendar events' cases I see that "Birthday" is actually an event without time, and not an "all day event" as it is now. The problem is that there is no way (or I don't know it...) to distinguish such events (using Android "Calendar Provider" API)...

I think that for the start we will treat equally "All day tasks" and "Tasks with date but without time".

@abaker
Copy link

abaker commented Sep 9, 2020

Sorry, the way I phrased that made it sound like I was talking about two separate concepts. Tasks doesn't have a concept of 'all day', I was just using that term to describe tasks with a due date but no time

@yvolk
Copy link
Member Author

yvolk commented Sep 9, 2020

@abaker Aha, thanks. That is easier.

@yvolk
Copy link
Member Author

yvolk commented Sep 11, 2020

@abaker @Torenga I added support of "All day tasks" to ToDo Agenda. so now All day task is shown at midnight.
For ordering and visualization of all day events (including All day tasks) I created a separate issue: #48

@yvolk
Copy link
Member Author

yvolk commented Sep 13, 2020

The fix released to Beta channel, see #3

@Torenga
Copy link

Torenga commented Sep 16, 2020

Currently tasks in the same time slot (All day or at a certain time) are sorted alphabetically, leading to high priority tasks often being displayed below lower priority tasks.

I would prefer to have the option for them to be sorted by priority first, then alphabetically.

@yvolk
Copy link
Member Author

yvolk commented Sep 18, 2020

@Torenga Thank for suggestion, I created a separate issue for "priority": #50

@yvolk yvolk closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants