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

Shell flyout content template #13190

Merged
merged 23 commits into from
Dec 31, 2020
Merged

Shell flyout content template #13190

merged 23 commits into from
Dec 31, 2020

Conversation

PureWeen
Copy link
Contributor

@PureWeen PureWeen commented Dec 18, 2020

Description of Change

Only works on ios/android

This adds the ability to specify your own Content for the Flyout. If you don't want the list of FlyoutItems you can now specify Content or a ContentTemplate and it will render instead of the Flyout Items.

If you specify a Header or a Footer those will also renderer. If the content you specify is scrollable Shell will do its best to honor the Scroll Behavior for the header you've specified

Issues Resolved

API Changes

Added:

  • View Shell.FlyoutContent //BP
  • DataTemplate Shell.FlyoutContentTemplate //BP
  • IEnumerable Shell.FlyoutItems //Readonly list of Flyout Items. The underlying list implements INCC via ReadonlyObservableCollection

Platforms Affected

  • Core/XAML (all platforms)

Testing Procedure

  • Tests Included

XAML Example

<Shell x:Name=shell>
     <Shell.FlyoutContent>
           <CollectionView 
                    BindingContext="{x:Reference Name=shell}"  
                    IsGrouped=true 
                    ItemSource={Binding FlyoutItems}>
                       <CollectionView.ItemTemplate>
                              <DataTemplate>
                                   <Label Text="{Binding Title}">
                              </DataTemplate>
                       </CollectionView.ItemTemplate>
             </CollectionView>
     </Shell.FlyoutContent>
</Shell>

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@PureWeen PureWeen added DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. a/shell 🐚 labels Dec 18, 2020
@PureWeen PureWeen added this to the 5.0.0 milestone Dec 18, 2020
@PureWeen PureWeen added this to To do in vNext+1 (5.0.0) via automation Dec 18, 2020
# Conflicts:
#	Xamarin.Forms.Platform.Android/Renderers/ShellFlyoutTemplatedContentRenderer.cs
@rmarinho rmarinho moved this from To do to In Review in vNext+1 (5.0.0) Dec 18, 2020
# Conflicts:
#	Xamarin.Forms.Platform.iOS/Renderers/ShellTableViewController.cs
#	Xamarin.Forms.Platform.iOS/Renderers/ShellTableViewSource.cs
Copy link
Contributor

@pictos pictos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't run the code yet, but I did a quick overview of the code and have these suggestions.

@PureWeen PureWeen added blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. and removed DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. labels Dec 22, 2020
# Conflicts:
#	Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
#	Xamarin.Forms.Core/Shell/Shell.cs
# Conflicts:
#	Xamarin.Forms.Platform.iOS/Renderers/ShellTableViewController.cs
#	Xamarin.Forms.Platform.iOS/Renderers/ShellTableViewSource.cs
@PureWeen
Copy link
Contributor Author

Copy link
Contributor

@hartez hartez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering about that one Update method that's commented out. Other than that, looks fine (though I wouldn't mind seeing some of these longer methods broken up).

@PureWeen PureWeen requested a review from hartez December 31, 2020 03:05
Copy link
Contributor

@pictos pictos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works on my tests.

@rmarinho rmarinho merged commit 4048fab into 5.0.0 Dec 31, 2020
vNext+1 (5.0.0) automation moved this from In Review to Done Dec 31, 2020
@rmarinho rmarinho deleted the shell_flyout_content_template branch December 31, 2020 14:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/shell 🐚 blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. partner/cat 😻 proposal-accepted roadmap t/enhancement ➕
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Spec] Shell Flyout Content Template
5 participants