-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Use the MoreNavigationController DidShowViewController callback for shell sections #6786
Conversation
/azp run |
No pipelines are associated with this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failing unit test
Xamarin.Forms.Core.UnitTests.ShellTests.NavigationBetweenShellContentsPassesQueryString |
@Dresel can you rebase against master? That should fix the unit test error |
Rebase done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dresel I ran into a slight issue while testing this
it looks like after you select the item from the more list the first time then it won't reopen the more list when navigating back to it unless you click it twice.
Apologies this took so long to review. Let me know if you don't have time and I can look into this issue.
FYI I also rebased this PR to the latest 4.3.0 so it would build.
As far as UI tests if you want to give it a try you can see an example of a Shell UI tests here
Xamarin.Forms/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/ShellTitleView.cs
Line 19 in 14555f7
public class ShellTitleView : TestShell |
Currently busy but I'll be able to tackle this latest end of this month |
@PureWeen I think that this is the correct behaviour. At least on iOS it is the default behaviour that a tab stays the same (also within the more page) when navigated to and from. If a page has been opened in the more tab, navigating to another tab and returning to it should return you to the opened page. The second tap returns you to the root of the tab (in the more tab: the list of pages). This works the same as in other tabs, if you navigate within a tab it stays the same after navigating between tabs. When tapping on a tab which is selected, navigationpage within the tab goes to the root page. Anyway, very nice that someone is looking after this, as it seems to fix the very long standing issue of the more tab in xamarin. |
…Controllers to empty collection for consistent experience,
Sorry, took me longer than expected.
This can be "corrected" by calling PopToRootViewController on the For consistency we should also set
Let me know if you want this in a separate PR or if I can combine it with this one. I have rebased and pushed latest changes, let me know what you think. I'm now working on a UI test case for that, it's a pity that this does not work with remote debugger on windows... |
I think you should combine it in this PR, as it creates inconsistent behavior across platforms if the edit button is visible (as you said already). Just my 2 cents Great work! |
UI test added, let me know if this fits. |
Could not reproduce the failing UI tests (SDK 12.4 build, iPhone X 11.4 simulator). |
@PureWeen any chance this can be included in Xamarin Forms 4.5? |
Description of Change
When
SelectedViewController
is called forMoreNavigationController
, register forDidShowViewController
to make it possible to setShellItem.CurrentItem
when selecting shell sections aggregated in more tab. Implementation is based on this SO thread.Automated test is skipped because lack of information (is there any guidance available?) of how to setup UI tests for XF.Issues Resolved
API Changes
None
Platforms Affected
Testing Procedure
Check #6784.
PR Checklist