bgregos / foreground

Simple Android personal task manager with Taskwarrior integration
Apache License 2.0
254 stars 16 forks source link

Add Reports #49

Open bgregos opened 3 years ago

bgregos commented 3 years ago

Add support for Reports to foreground. Feel free to list in the comments what reports you would find most helpful, or if you have any other input on this feature.

meain commented 3 years ago

Option to have a specific report when opening might be useful.

vojtapolasek commented 3 years ago

Hello, I would definitely make use of this feature. Honestly, I am using custom reports which I somehow created during my experiments with GTD. The best would be if we could provide the filter for the report. I am probably not that much interested in the appearance of the report, although being able to modify visible columns etc would be also nice. However, that is not that important. One report I am using has a bit more complex filter, but then I have "inbox" report, which is only created based on a tag.

linuxcaffe commented 3 years ago

I hate to say this, as exited as I am about Foreground, Konstantin (https://bitbucket.org/kvorobyev/taskwarriorandroid/wiki/Home) almost totally nailed a UI that captured almost all of taskwarrior's functionality. It may be abandoned and broken (?) but his interface for reports (dropdown on the right) and handling of tags and projects (dropdown on the left) covered a LOT of ground.

Also, a task listing that had a simple mode (just descriptions) and a two-layered mode (description, and next line, data in columns corresponding to report/ column headers) actually worked great, making all the reports usable on the tiny screen. Konstantin also made good use of task add and task modify, by allowing users to enter the new task (or modification) in a single command line (rather than dialog boxes) exactly how task works at the CLI.

Please don't take this left-handed comparison the wrong way, Foreground is quite excellent and improving all the time, but feel free to plunder some of the very clever ideas of projects past. Install the above linked app, for science. I've even had that code running on the desktop! (written in java!) It wasn't perfect, with some rough edges, sometimes cluttered, not so pretty and unmaintained, but worth a look. (search; taskwarrior on Google play) Thanks

dotgerph commented 3 years ago

I hate to say this, as exited as I am about Foreground, Konstantin (https://bitbucket.org/kvorobyev/taskwarriorandroid/wiki/Home) almost totally nailed a UI that captured almost all of taskwarrior's functionality. It may be abandoned and broken (?) but his interface for reports (dropdown on the right) and handling of tags and projects (dropdown on the left) covered a LOT of ground.

Sorry if I'm misusing this Issue, but I must second what linuxcaffe states. I like Foreground very much, but in its current state I need to use Android alternatives, such as taskwarrior2, also from Konstantin, newer than the app on playstore, but somehow not on the play store anymore and prolly abandoned as well.

I here and then keep checking out Foreground again, but little things make me have to switch back to taskwarrior2. (Will check if those Issues have been reported and create them if not)

So basically just trying to encourage, I'd love to permanently use Foreground.

linuxcaffe commented 3 years ago

@dotgerph Oh, that's right, taskwarrior2, and thanks for seconding that, it's not just me :) @bgregos I would also second that second, leaning towards Foreground, please forgive the issue tangent :)

linuxcaffe commented 3 years ago

In thinking about Reports in Foreground, because the tasks are not displayed in a table, exactly, reorderring the fields doesn't make a whole lot of sense. The display is clear and compact as is. That said, the filter applied and the sort order are very much within the definition of "a report". If Foreground was able to work with a .taskrc as in #108 and was able to save data in rc formats, maybe the filter+sort could be saved in the rc using the taskwarrior report definition. Field selection and labels could remain fixed for all saved Foreground reports, as they are now, with only the custom Filter + Sort saved in tw-report syntax, in the rc, under a new report name.

linuxcaffe commented 3 years ago

Foreground could even take an existing report (from a taskrc) ignore field selection and labels, but use the report-name, filter and sort directives to display the report.

linuxcaffe commented 3 years ago

Defining the default foreground report, as it is now, /might/ look something like this;

# these lines are not actually used by foreground, 
# but here show defaults and adhere to report definition
report.foreground.description The default Foreground report
report.foreground.labels      Description,Due,Project,Tags 
report.foreground.columns     description,due,project,tags

# these lines show the Foreground defaults, and are 
# the values that might be user-customizable
report.foreground.filter      status:pending
report.foreground.sort        due+,description+

.. just as an example. Actual values will certainly differ)

bradyt commented 3 years ago

This might be relevant, in case author wants to replace Foreground's default report with an existing definition from Taskwarrior:

% task show report | grep due+
report.blocked.sort          due+,priority-,start-,project+
report.blocking.sort         urgency-,due+,entry+
report.list.sort             start-,due+,project+,urgency-
report.overdue.sort          urgency-,due+
report.recurring.sort        due+,urgency-,entry+
report.unblocked.sort        due+,priority-,start-,project+
report.waiting.sort          due+,wait+,entry+

I think the implied sort is id+, which you might agree after checking task rc.report.next.sort: and task rc.report.next.sort:id+. Where id is the order in which tasks arrive in the local $HOME/.task/pending.data. Often close to the sort of entry+. I don't know if Foreground is keeping track of when tasks arrive in local storage, or rather, tracking the order they arrive in some implicit way.

linuxcaffe commented 3 years ago

@bradyt I think you have some valid points there, and I look forward to fleshing out specific details. Above I was attempting to sketch out the container of a report, rather than the specific contents. Specifically, I'm trying to help define the report.foreground, which would be the primary, default Foreground report.. the one we're using today, and the one a new user would use until they save a Filter/Sort setting, or import a .taskrc file (see #108). Again, the container sort of has to be a correctly formatted taskwarrior definition, for any import/ export to work. As I see it, the process has to start with the basic, current, Foreground listing, as it would be represented in that tw-report format. With that as a starting point, any report (using mostly the filter and sort) could be imported, cooked up and/or exported back to/from the task CLI world. I also don't know how many fields Forground keeps track of. ;-)

linuxcaffe commented 3 years ago

@bgregos Here's a reports UI idea.. not sure you'll like it :) If the idea is that the default report is called "FOREGROUND" then the app title could become a drop-down report chooser, and when a non-default report is selected, then the title become "OVERDUE", or whatever.

Foreground-reports-picker