Xamarin.forms: [Bug] TabBarIsVisible = True/False doesn't work on Back navigation

Created on 15 Sep 2020  Β·  9Comments  Β·  Source: xamarin/Xamarin.Forms

Description

I have an App with Shell Navigation.
Page A is the "Tab".
I navigate to Page B with await Shell.Current.GoToAsync(RouteNames.WorkOrderDetailPage);
This page have Shell.TabBarIsVisible="False"

TabBar is hiding. :muscle:

When a tap "back" , Page A doesn't show Bottom Tabs :frowning: Even if i foce Shell.TabBarIsVisible="True" on this ContentPage.

Steps to Reproduce

Page A ( a Tab ) with TabbarVisible = true // Tab is => Visible :white_check_mark:
Nav to Page B with TabbarVisible = false // Tab is => Hide :white_check_mark:

And now 2 things , if you :

Nav Back to Page A TabbarVisible = true // Tab is => Still hide :no_entry_sign:
or
Nav to Page C : TabbarVisible = true // Tab is => Visible :white_check_mark: but :thinking:

Expected Behavior

TabBar is visible when TabBarIsVisible = True πŸ‘

Actual Behavior

TabBar is not visible even if TabBarIsVisible = True πŸ™…

Basic Information

I'm currently using XF 4.8.0.1364.

Screenshots

Page A : Tab with TabbarVisible = true
Page C : Common ContentPage with TabbarVisible = false
Page A : Common ContentPage Tab with TabbarVisible = true

https://streamable.com/0nkdb5
In this video you can see :
Page A => Page B => Page C => Page B => Page A
Tab : visible => not visible => visible βœ… => visible πŸ™… => visible βœ…
Page A => Page B => Page A
Tab : visible => not visible => not visible πŸ™…

shell in-progress bug

Most helpful comment

Hmm so this is an odd one :-/

Similar issue here
https://github.com/xamarin/Xamarin.Forms/issues/12144

For some reason these exports are no longer executing....

https://github.com/xamarin/Xamarin.Forms/blob/f35ae07a0a8471d255f7a1ebdd51499e10e0a4cb/Xamarin.Forms.Platform.iOS/Renderers/ShellSectionRenderer.cs#L80

It's annoying because they execute fine when I'm building against source but not from the nuget package...

Haven't traced back to why those have stopped executing yet

All 9 comments

Can confirm this issue persists in 4.8.0.1451

πŸ€”It seems SharedTransitionShell was the mistake.

I replace it by Shell , and TabBar show and hide correctly .

@josephlbailey did you use SharedTransition too ?

20-09-29-10-23-06

@jm-parent I believe mine is related to #8969 or #12144 as it is an issue only on iOS.

That's right, friend, when they break a bug, provide a video or gif of the problem so the engineering team can solve it as soon as possible.
TabbarProblem

Hmm so this is an odd one :-/

Similar issue here
https://github.com/xamarin/Xamarin.Forms/issues/12144

For some reason these exports are no longer executing....

https://github.com/xamarin/Xamarin.Forms/blob/f35ae07a0a8471d255f7a1ebdd51499e10e0a4cb/Xamarin.Forms.Platform.iOS/Renderers/ShellSectionRenderer.cs#L80

It's annoying because they execute fine when I'm building against source but not from the nuget package...

Haven't traced back to why those have stopped executing yet

I've only seen one repro so far so that's what I've been able to fix :-)

I'm hoping that's everyones issue.

There's a nuget here
https://dev.azure.com/xamarin/public/_build/results?buildId=27801&view=artifacts&type=publishedArtifacts

If you can all test that nuget and let me know if that resolves the issue for you that would be great!!! If it doesn't can you try to include a repro?

@PureWeen So I tested the new nuget with no luck.

So here's a repro using the standard boilerplate project that is created when doing a new Shell app:
TabBarVisibilityRepro.zip

I used the LoginPage as my third level of navigation to illustrate that when using Shell.GoToAsync("../") on a page with Shell.TabBarIsVisible="False", it breaks the visibility on the previous page as illustrated here:

tabbarvisiblilitybugrepro

Thank you @josephlbailey !!

That helped me locate what looks to be the most problematic part of code.

New set of nugets here brewing
https://dev.azure.com/xamarin/public/_build/results?buildId=27842

Let me know if that works for you

@PureWeen Worked like a charm! Well done!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hudhud picture Hudhud  Β·  3Comments

deakjahn picture deakjahn  Β·  3Comments

simontocknell picture simontocknell  Β·  3Comments

rmarinho picture rmarinho  Β·  3Comments

Papirosnik picture Papirosnik  Β·  3Comments