habitica-android icon indicating copy to clipboard operation
habitica-android copied to clipboard

Android Widget only supports top level of checklist dailies

Open ScienceGal8 opened this issue 7 years ago • 11 comments

I have a couple Dailies that have checklists, and am accessing them via the Dailies widget. Unsure if this should be a feature request.

What I expected to happen:

  • tap on Daily
  • Daily opens into checklist like on the website
  • Can check off one or multiple tasks
  • Tasks correctly marked

What actually happens:

  • tap on Daily
  • Daily does not open
  • All sub-tasks marked as completed
  • Have to open app or website to un-check subtasks I haven't done so things are once again correctly marked

OS version is 6.0.1, device is a Samsung Galaxy S6, app version is 0.0.34.4 (135). Can provide screenshots if needed.

ScienceGal8 avatar Nov 03 '16 20:11 ScienceGal8

I have this issue with TODOs, I had todo with one subtask which was link to what I was supposed to do and from the widged I tried opening the todo which instead marked it as complete and rewarded me and trying to fix it I was hit by #748 .

Mikaela avatar Nov 03 '17 15:11 Mikaela

Opening the task in the app when the todo / task item clicked from the widget is one of the solution, isn't it?

This code is where to start for anyone want to contribute.

Abdillah avatar Oct 13 '20 05:10 Abdillah

This seems implemented on live version. I am able to partially fill checklists by tapping on the fraction on right side of the task. Works for dailies and to-do's. Changes are reflected on the webapp.

Device: Google Pixel AppVersion: Version 3.1.2

My phone is running Android 10, which I believe is SDK 29.

CollinLBauer avatar Feb 08 '21 22:02 CollinLBauer

Do you mean inside the app @CollinLBauer? This issue specifically talk about the widget.. I propose that if we click on the non-checkbox area task in the widget, it should open the app and display the task (yes, like you explained) so we can check the subtask.

Abdillah avatar Feb 12 '21 00:02 Abdillah

Oh, my apologies. I don't personally use widgets, so I often forget that they exist.

If help is still wanted for this issue, I can take a stab at it. Just let me know if redirecting to the app is preferred over expanding in the widget.

CollinLBauer avatar Feb 12 '21 02:02 CollinLBauer

As I tried my proposal flow, there is no individual task view/activity in Habitica. The edit activity does not enable us to check the sub-task. My proposal goes as far as focus the screen (prevent off-screen) and expanding the task selected on the list.

If the widget can display whether a task has sub-tasks, maybe we can put different response (open app or checked) when they're clicked in the widget. I don't currently research on whether expanding the widget can be put as an intent or not, so my two cents.

Abdillah avatar Feb 13 '21 05:02 Abdillah

Okay, we have a partial fix implemented.

Right now on my fork, tapping a normal task completes it as expected, while tapping a task with a checklist redirects to MainActivity. We are looking into redirecting to either Dailies/Todos instead, and possibly expanding the checklist in-app. Some of this might not be possible without modifying the relevant activities.

Also worth considering, right now there is no visual indicator in the widget for whether a task has a checklist or not. We can add this if desired.

CollinLBauer avatar Mar 19 '21 19:03 CollinLBauer

@CollinLBauer hey there, i'll be discussing your potential fix with phillip to see if we like this work around or if we'd prefer a different way of handling checklists. if we do end up going with this solution, i think we'd definitely need to add a visual indicator for a checklist.

another potential option could be just having checklists expanded by default in widgets to allow checking off from there, without the need to link to the app, navigate to the right screen, find the task, expand it, then tap the checklist. it would mean that the widget could potentially be very long if people use extensive checklists, but that may be a worthwhile hindrance to avoid all those extra steps

saraolson avatar Mar 22 '21 17:03 saraolson

@CollinLBauer alright after talking it through with phillip, we think that the best solution would probably be having all checklist items expanded by default with no option to collapse it. you would then be able to tap each checkbox individually from the widget as you complete the tasks. thanks for exploring this issue and proposing a solution, it does help us evaluate our options even if it's not the one we ended up going with.

if you'd like to take a shot at implementing the expanded checklists that follow the design of tasks in the app, you're welcome to! if you'd rather not then i'll leave this issue as help wanted for anyone else as we don't have the resources to work on the widgets right now.

saraolson avatar Mar 23 '21 14:03 saraolson

Update: I was able to get it to draw checklist items nested inside the widget_list_row properly. Still haven't tried setting individual intents yet.

It, uh, might be a LITTLE broken right now, but progress is progress. I will update again should we resolve the duplication issue.

CollinLBauer avatar Mar 30 '21 14:03 CollinLBauer

@CollinLBauer thanks for the update! progress is great :D

saraolson avatar Mar 30 '21 15:03 saraolson