Open jiongxuan opened 1 month ago
Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!
Your Environment
Expected Behavior
When opening a task detail page from a project in Android, pressing the back button should close the task detail page and return to the project page.
Current Behavior
In certain scenarios, pressing the back button can either exit the app or navigate to another page unexpectedly. For example, if the following actions are performed:
At this point, pressing the back button is expected to close the task detail page and return to the project page. However, it instead navigates back to the settings page. Additionally, if a user opens a project page immediately after launching the app, then opens the task detail page, pressing the back button exits the app entirely, which is undesirable.
Similarly, on Mac (using a mouse back button), pressing it on the task detail page will also cause the app navigate to an incorrect page, instead of returning to the project page.
Steps to Reproduce (for bugs)
Can you reproduce this reliably?
Yes, the issue is reproducible in both Android and Mac.
Investigation
From my investigation, the core issue appears to be that the task detail page does not have its own URL in the router. When opening the task detail page, the actual URL remains the same as the project page (e.g., /project/-jXtsphXpU599N-zTkFdQ). As a result, pressing the back button either returns to an earlier page in the history (such as the settings page) or, if there is no earlier page, exits the app according to Android’s logic for handling back presses.
Suggested Solution
Consider adding a dedicated URL route for the task detail page. This can be similar to how the project page is structured. For example, the task detail page URL could be something like:
http://localhost/index.html#/project/-jXtsphXpU599N-zTkFdQ/tasks/xxxxxx,
where xxxxxx represents the task ID.
Since I am not very familiar with frontend frameworks and currently have limited time, I would appreciate assistance in resolving this issue. Thank you for your support!