Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SampleApp] NavigationBar isn't showing back button in sample app #545

Closed
10 tasks
nickrandolph opened this issue Apr 14, 2023 · 5 comments · Fixed by #614
Closed
10 tasks

[SampleApp] NavigationBar isn't showing back button in sample app #545

nickrandolph opened this issue Apr 14, 2023 · 5 comments · Fixed by #614
Assignees

Comments

@nickrandolph
Copy link
Contributor

Current behavior

In the NavigationBar pages in the Sample app, the Back button isn't showing when running the WinUI target

image

Expected behavior

Back button should work

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

Run the WinUI target for the sample app in this repository
Go to NavigationBar
Click on Show Sample button
Click Navigation to Second Page button
No back button visible but it is there if you click on where the back button should be

Environment

Nuget Package:

Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Build tasks

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@nickrandolph nickrandolph added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Apr 14, 2023
@kazo0
Copy link
Contributor

kazo0 commented Apr 18, 2023

This looks to be expected for non-mobile platforms right now as we are not defining a MainCommand with an Icon:

<utu:NavigationBar Style="{StaticResource MaterialNavigationBarStyle}"
AutomationProperties.AutomationId="M3Page2NavBar"
Content="Second Page">
<utu:NavigationBar.PrimaryCommands>
<AppBarButton Style="{StaticResource MaterialAppBarButtonStyle}"
Label="More" />
<AppBarButton Style="{StaticResource MaterialAppBarButtonStyle}"
Label="More" />
</utu:NavigationBar.PrimaryCommands>
<utu:NavigationBar.SecondaryCommands>
<AppBarButton Style="{StaticResource MaterialAppBarButtonStyle}"
Label="More" />
<AppBarButton Style="{StaticResource MaterialAppBarButtonStyle}"
Label="More" />
<AppBarButton Style="{StaticResource MaterialAppBarButtonStyle}"
Label="More" />
</utu:NavigationBar.SecondaryCommands>
</utu:NavigationBar>

We can simply add one for not_mobile: but we may want to look at perhaps now bundling a new PNG asset within Toolkit, I think we can now bundle assets within libraries, right @jeromelaban / @nickrandolph ?

And I need to double check but I believe I cannot just use a <not_mobile:SymbolIcon Symbol="Back" /> directly in the default NavigationBar style because of this issue: microsoft/microsoft-ui-xaml#1494 + #235

@jeromelaban
Copy link
Member

@kazo0 yes, it's definitely possible to bundle assets now, in the same way bundling fonts is supported.

@Xiaoy312 Xiaoy312 assigned Xiaoy312 and unassigned Xiaoy312 Apr 28, 2023
@Xiaoy312 Xiaoy312 added control/navigationbar area/sample-app and removed triage/untriaged Indicates an issue requires triaging or verification. labels Apr 28, 2023
@kazo0
Copy link
Contributor

kazo0 commented Jun 6, 2023

We should bundle a scaled PNG asset (or can we bundle an SVG and have resizetizer do its magic?? @nickrandolph / @pictos )

@nickrandolph
Copy link
Contributor Author

For the library we should package scaled assets to avoid a dependency on Resizetizer

@silviuo silviuo self-assigned this Jun 6, 2023
@silviuo
Copy link
Contributor

silviuo commented Jun 9, 2023

Currently working on #321 which should solve this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants