Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [Shell] First page is null in ShellGroupItem Navigation Stack #12329

Open
GiampaoloGabba opened this issue Oct 1, 2020 · 7 comments
Open

Comments

@GiampaoloGabba
Copy link
Contributor

Description

When navigating inside Shell, the first page in the ShellGroupItem Navigation Stack is null.
I found this when fixing a bug in my plugin. I have resolved using a quick & dirt reflection hack inside the renderer but i dont like it :)

Having a navigation stack that don't represent the true navigation is a problem.

Steps to Reproduce

I have attached a repro. Just run the project, click on an item to go to the detail page where the Navigation Stack is dumped to a label.

Expected Behavior

First entry in navigation stack should not be null but need to reference to the first page

Actual Behavior

First entry is navigation stack is null :)

Basic Information

  • Version with issue: 4.8
  • Last known good version: 4.3 (maybe later versions)

Screenshots

image

Reproduction Link

https://github.com/GiampaoloGabba/ShellTest

@GiampaoloGabba GiampaoloGabba added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 1, 2020
@GiampaoloGabba
Copy link
Contributor Author

Also please note:
when doing Shell.Current.GoToAsync("../") from the second page in the stack, the navigation is firing the PopToRoot event and not Pop. This is not in the repro project but maybe that is correlated to this issue.

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Oct 6, 2020

@GiampaoloGabba Thanks for the repro sample.

@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Oct 6, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Estimate in Triage Oct 6, 2020
@GiampaoloGabba
Copy link
Contributor Author

@jsuarezruiz i saw you added the p/Android attribute only but this happens in iOS too :)
I think is something related to how the first page is loaded. In the debugger i see that the page assigned to the ShellContent is in the ControlTemplate property (well i dont remember exactly the property name, but is related to "Something"Template) but not in the Page property.

@GiampaoloGabba
Copy link
Contributor Author

I dug into the issue while making an unrelated pull request and i found that the renderer is creating the page from the DataTemplate (with GetOrCreateContent()) after the page is added to the NavigationStack.

I have no idea how to fix it (i tried something but the result were always a big crash) but at least i found it why :)

@pictos
Copy link
Contributor

pictos commented Oct 10, 2020

@PureWeen do you know how to fix it?

@Freezor
Copy link

Freezor commented Oct 18, 2021

Is there any update on this? We still got a problem with this in our project.

@haavamoa
Copy link

Bump, this is annoying

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Triage
  
Needs Estimate
Development

No branches or pull requests

5 participants