CCExtractor / taskwarrior-flutter

This is the repo of mobile app of taskwarrior
https://play.google.com/store/apps/details?id=com.ccextractor.taskwarriorflutter
GNU General Public License v3.0
103 stars 86 forks source link

Enhance User Experience with Direct Task Access from Homepage Widget #310

Closed Pavel401 closed 4 months ago

Pavel401 commented 4 months ago

Describe your issue

Upon tapping a TaskTile on the homepage widget, the app should directly open the selected task in the task application. This interaction should be smooth and quick, ensuring that users can access their tasks with minimal effort and delay. The task app should open to the detailed view of the selected task, displaying all relevant information and actions related to the task.

Steps to reproduce

  1. Open the android widget and try :)

What was the expected result?

https://copyprogramming.com/howto/button-click-event-for-android-widget something similar to this https://pub.dev/packages/home_widget check docs

Put here any screenshots or videos (optional)

Screenshot 2024-02-22 at 1 41 31 AM

How can we contact you (optional)

No response

Would you like to work on this issue?

None

By submitting this issue, I have confirmed that:

Pavel401 commented 4 months ago

@JangamRuthvik any idea ?

JangamRuthvik commented 4 months ago

Noted .will get back to you @Pavel401

JangamRuthvik commented 4 months ago

@Pavel401 i wanted to know that, initially when it was displaying three tasks , on tapping the title does this used to open task details. Just wanted to know . i know how to do val backgroundIntent = HomeWidgetBackgroundIntent.getBroadcast( context, Uri.parse("homeWidgetExample://titleClicked") ) setOnClickPendingIntent(R.id.title_textview, backgroundIntent) these are the lines responsible to do expected work but i am still reading docs on how to set correct Uri.parse() to Our task detail page

JangamRuthvik commented 4 months ago

@Pavel401 yes i think i got this.just give a momment.

JangamRuthvik commented 4 months ago

@Pavel401 it seems bit more complex to add uuid of task to each listTile. I will tell the overView of how it works .

  1. We should link the uuid of task to of each listTile. 2.Send the uuid to our flutter code through Uri.parse() and home_widget flutter can listen to stream using HomeWidget.widgetClicked.listen((uri){}); 3 in that uri we will have our uuid encoded in that so we will retreive the task from that uuid and push the corresponding page all the complexity lies in how to assign those uuid to each list tile here is the native documentation of it : https://developer.android.com/develop/ui/views/appwidgets/collections#behavior i will take some time and get back to you with a pr as soon as possible @Pavel401
JangamRuthvik commented 4 months ago

@Pavel401 i want provide you with an update. on pressing the list tile of our app widget i am able to capture that uuid of that corresponding task. All now left is pushing that details screen by passing that uuid. Here are the screenshot and video of it

https://github.com/CCExtractor/taskwarrior-flutter/assets/122552365/e299a102-1c8f-419b-9af1-76e49fddea3d

Screenshot 2024-02-26 234935

JangamRuthvik commented 4 months ago

@Pavel401 will soon get back to you with a pr. Also i wanted to know your opinion on this

JangamRuthvik commented 4 months ago

@Pavel401 pushing task page directly from android home screen seems to be another complex task. So as of now can i push this code and create a new issue to solve that.The progress as of now is when a user clicks on a listTile we can get the uuid of that task want to your opinion and feedback @Pavel401

Pavel401 commented 4 months ago

Our last release already had the tap-to-open feature. Now, we need to implement a tap-to-open for the task details page. Thank you for your hard work! @JangamRuthvik

Pavel401 commented 4 months ago

@JangamRuthvik, please send a PR for this issue. Also, please create a new issue for the tap-to-open details page.

Pavel401 commented 4 months ago

@JangamRuthvik Also please mention the issue no and changes you have done in your pr.

JangamRuthvik commented 4 months ago

@Pavel401 Thank you for your appreciation.I will continue with the rest of the work to be done. Thank you for adding difficulty label I was about to type that now 😅

JangamRuthvik commented 4 months ago

@JangamRuthvik Also please mention the issue no and changes you have done in your pr.

Ok

JangamRuthvik commented 4 months ago

Our last release already had the tap-to-open feature. Now, we need to implement a tap-to-open for the task details page. Thank you for your hard work! @JangamRuthvik

Yes sir @Pavel401 I am able to extract uuid of task that was tapped from home screen and get that from the stream listener I tried pushing the new screen as soon as it is tapped but for some reason it is not working might be because that's how routes were defined when the app was called if it is not running in the background but if I want to add a new route the task details page requires uuid of task. I have some other ideas in mind I will soon get back to you with a solution

JangamRuthvik commented 4 months ago

@Pavel401 we can close this issue