Bug 51641 - UWP and Master Detail inconsistency
Summary: UWP and Master Detail inconsistency
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Mac OS
: Low enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-01-19 18:02 UTC by David Ortinau [MSFT]
Modified: 2017-03-03 09:33 UTC (History)
2 users (show)

Tags: navigation, masterdetailpage, tabbedpage, uwp
Is this bug a regression?: ---
Last known good build:


Attachments
iOS detail view (46.46 KB, image/png)
2017-02-01 14:05 UTC, David Ortinau [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description David Ortinau [MSFT] 2017-01-19 18:02:20 UTC
From Norman Mackay

Basically you can’t seem to escape a master detail page in UWP which is a fairly critical issue in our new Prism app as we’re supporting all three platforms.

I have attached a repo project, Forms 2.3.3.180 & Prism 6.3 pre1 app.
 
In UWP, from the main master detail select Vessel, click on the vessel button in VesselSearchPage, a Tabbed page should appear. In Android and iOS the Tabbed page is now correctly outwith the MasterDetail page, in UWP it isn’t. this is a major issue for us as it doesn’t make users back out of modules so multiple pages could remain in the navigation stack.
 
If you repeat the test in Android you will see the correct behavior.
 
The UX experience is inconsistent and there seems to be no way to escape the master detail page in UWP, this app will be pretty big with 9+ modules, 60+ pages etc and we cannot afford to have multiple instances of large pages in memory.
 
Is this default behaviour for UWP or an issue? it’s a fairly critical issue.
Comment 1 David Ortinau [MSFT] 2017-01-19 18:03:43 UTC
Project file was just a little too big. Here it is:

https://drive.google.com/drive/folders/0B90tKD37uOtwZ3pjSDlTMzR3Z2M?usp=sharing
Comment 2 David Ortinau [MSFT] 2017-01-20 19:50:49 UTC
Norman, 

I'm a little confused yet about what experience you're wanting to create. 

User Flow:
- navigate to VesselSearchPage from the MasterDetailPage menu
- tap the button 
- MasterDetailPage goes away as the user is navigated to a TabbedPage. No hamburger. Tabs in the native position.
- touching any tab loads those pages
- to return to the VesselSearchPage, the user touches the device back button or an on-screen back button

Is that accurate?

To go from the MasterDetailPage to the TabbedPage, you may want to replace the Application's MainPage.

```
Application.Current.MainPage = new VesselDetailsPage();
```

I can't speak as to how you'd achieve that within Prism, but I should hope there's a hook in the navigation handler.

To return to the MasterDetailPage you'd reassign the reference to that page to the Application.Current.MainPage.

btw - the Android app won't run. How are you doing that? I get the error that you can only have 1 navigation page on screen at a time.

Dave
Comment 3 NMackay 2017-01-23 10:53:00 UTC
Hi David,

Thanks for your response.

I upgraded the app to 2.3.4-pre1 and tested in 2.3.3 and it works fine in Android, tested on Samsung S6 & S2 tab hardware.

Yes, essentially then you get to Vessel Details the hamburger should go away, it does in iOS and Android but doesn't in UWP hence my comment about the inconsistency as a cross platform offering.

You can replace the main navigation stack with the code below but that resets the navigation stack, that is not the behavior we want.

await _navigationService.NavigateAsync("app:///VesselDetails", new NavigationParameters { { "Vessel", vesselName } }, false);

If this is a UWP feature we may have to rethink our navigation which is a bitter pill to swallow, as usual UWP cause a headache as the design works as expected in Android and iOS. We keep having to compromise on features and functionality to try and make the app work on UWP.
Comment 4 David Ortinau [MSFT] 2017-02-01 14:05:22 UTC
Created attachment 19680 [details]
iOS detail view

To overcome the navigation stack being reset, it's conceivable you could save it off beforehand and then recreate it silently when changing back.

The hamburger doesn't go away for me on your test project in iOS. What am I missing? See the attached screenshot.
Comment 5 David Ortinau [MSFT] 2017-02-18 18:42:59 UTC
Norman, 

I know you emailed me about the Prism popover fix for UWP Master Detail, but that doesn't resolve this issue for you, correct?

Do you have a workaround for this one? 

The news from here is that this use case of having multiple navigation elements active at once isn't supported by design. To address how you're doing this is an enhancement. Next step would be to make a proposal in the Evolution forum for us to consider.
Comment 6 NMackay 2017-02-20 09:22:42 UTC
If it's not supported then why does my app work as expected in iOS and Android but not UWP?
Comment 7 NMackay 2017-03-02 10:40:39 UTC
This issue is not resolved, disappointing to see our issue was ignored. It makes our Forms UWP app a liability for us.

Thanks.
Comment 8 NMackay 2017-03-03 09:33:39 UTC
We've decided to go with a modal navigation stack to get round this in Prism. It's not perfect and means some UX redesign but at least we don't have to look at an alternative to Forms.

Norman.