habitica-android
habitica-android copied to clipboard
Android Widget only supports top level of checklist dailies
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.
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 .
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.
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.
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.
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.
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.
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 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
@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.
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.
![](https://raw.githubusercontent.com/CSCI-462-01-2021/Fork-Bomb/main/assets/images/nested_list_1.png)
It, uh, might be a LITTLE broken right now, but progress is progress. I will update again should we resolve the duplication issue.
![](https://raw.githubusercontent.com/CSCI-462-01-2021/Fork-Bomb/main/assets/images/nested_list_2.png)
@CollinLBauer thanks for the update! progress is great :D