unoplatform/Uno.Samples

[ToDo][Wide] Review Navigation Behavior When Deleting a Task

agneszitte opened this issue · 1 comments

Current behavior

For the Wide layout, we currently use a ContentControl to display task details using the TaskPage within the TaskListPage.
While this scenario works, we encounter an issue when deleting a task as the same logic for the Narrow layout is applied.
This means the task is deleted, and we navigate back. However, this approach needs to be reviewed for the Wide layout for the following reasons:

  • Navigating back takes the user to the TaskListPage.
  • The region in the ContentControl remains attached, causing the navigation to effectively go back to the TaskListPage within the ContentControl region.

For more context, in the Narrow layout, deleting a task simply navigates back from the TaskPage to the TaskListPage, which works well. However, this logic does not translate effectively to the Wide layout because of the use of the ContentControl region.

ef3c87228eb187da4400225975c9d67a.mp4

Expected behavior

-- To be reviewed --

Possible suggestions:

  • Implement a way to "detach" the region for the ContentControl (and/or collapse it) in the TaskListPage when the item no longer exists?
    image

  • Having an empty state so the region stays filled (without the need to collapse/close the region)?

  • Implement a way to select and display details for the next task in the list, ensuring the region remains filled with details for the next available task (And if no more tasks are available, then we use the empty state so again we don't have the need to collapse/close the region)?

  • Other possible solutions (please add feedback in the comments on this issue)

How to reproduce it (as minimally and precisely as possible)

  • Open the application in Wide Layout.
  • Click on the "Get Started" button on the Welcome Page.
  • Select any task from the first task list.
  • You should see the details for this task in the left column.
  • Delete the task.
  • Observe the current behavior as described.

Environment

Nuget Package:

  • Uno.Sdk: 5.2.161
  • UnoExtensionsVersion: 4.1.28
  • UnoToolkitVersion: 6.0.24
  • UnoThemesVersion: 5.0.13

Affected platform(s):

  • All

Anything else we need to know?

  • Not a regression, this behavior has now been there for a while (before the last uno updates and single project migration).
  • Related issue based on the fact that were are using a ContentControl region for the Task Details: #775

This PR (unoplatform/uno.extensions#2409) will fix the issue where navigating back from the ContentControl "duplicates" the TaskListPage. But then it means that navigating back will not be an option, so further discussion will be needed to determine what is the best option.