maui icon indicating copy to clipboard operation
maui copied to clipboard

Unified iOS FlyoutViewHandler

Open PureWeen opened this issue 1 month ago • 0 comments

Unified iOS FlyoutViewHandler

Target: .NET 10


Goal

Implement FlyoutViewHandler for iOS, replacing the legacy PhoneFlyoutPageRenderer. Learn from both the existing renderer implementation and Shell's flyout handling to build a unified handler that both FlyoutPage and Shell can use.


Background

  • WinUI already has a shared flyout handling approach
  • iOS currently uses PhoneFlyoutPageRenderer (in Microsoft.Maui.Controls.Handlers.Compatibility)
  • There's also TabletFlyoutPageRenderer for iPad split view scenarios
  • Shell has its own flyout implementation that duplicates much of the same logic

Rollout Strategy

  1. Implement FlyoutViewHandler for .NET 10

  2. Gate behind AppContext switch - Wire FlyoutPage to use the new handler when the switch is enabled

  3. Switch disabled by default initially - Allows testing and validation without affecting existing apps

  4. Enable for FlyoutPage and Shell - Once validated, flip the switch to make it the default path


Guidelines

  1. Implement FlyoutViewHandler for iOS - Handle both phone and tablet scenarios

  2. Learn from PhoneFlyoutPageRenderer - Extract patterns for flyout presentation, gestures, FlyoutLayoutBehavior handling

  3. Learn from Shell flyout handling - Incorporate patterns that work well for Shell's flyout

  4. FlyoutPage and Shell both use it - Same handler, different consumers

  5. Keep handler internal initially - Flexibility to iterate without public API commitment

  6. Align with WinUI patterns - Use WinUI's unified approach as the reference model

  7. Handle FlyoutLayoutBehavior modes - Default, Popover, Split, SplitOnLandscape, SplitOnPortrait


Success Criteria

  • FlyoutViewHandler works on iOS (phone and tablet)
  • FlyoutPage uses the new handler (when switch enabled)
  • Shell can use the same handler for flyout (when switch enabled)
  • All existing FlyoutPage tests pass with switch enabled
  • All existing Shell flyout tests pass with switch enabled

PureWeen avatar Dec 09 '25 22:12 PureWeen