dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.01k stars 1.72k forks source link

[WinUI, Shell] Convert bottom tabs on WinUI Shell to using HierarchicalNavigationItems #4448

Closed PureWeen closed 2 years ago

PureWeen commented 2 years ago

Description

When shell was first constructed by @dotMorten it didn't have the concept of hierarchical navigation

So the implementation currently just uses a custom WinUI grid with buttons as a set of bottom tabs

MicrosoftTeams-image

This implementation made sense at the time and does cause it to match mobile platforms but now that the NavigationView supports hierarchical navigation we should express the bottom tabs using that feature.

MicrosoftTeams-image

That would mean that the Xaminals example above would instead express the menu as all top level tabs

(Public) API Changes

None

Usage Scenarios

N/A

Backward Compatibility

Shell is currently experimental in Xamarin.Forms so none of the API/structure was really finalized. This change will break anyone that likes or prefers the bottom tabs. At a later point we are planning on adding additional API so users could customize the TabBar and place it where they'd like to

Difficulty

Medium

jamesmontemagno commented 2 years ago

I believe this makes a lot of sense. In the .NET Podcasts app we actually specify a different Shell layout for Mobile and Desktop so I think this makes sense and would even streamline that.

How about for macOS? can we align there as well?