Skip to content

refactor(flyout)!: Remove FlyoutBase.Close() (BC19) and lock down Open() - #23737

Merged
MartinZikmund merged 2 commits into
feature/breakingchangesfrom
dev/xygu/20260713/bc19-remove-flyoutbase-close
Jul 16, 2026
Merged

MartinZikmund merged 2 commits into
feature/breakingchangesfrom
dev/xygu/20260713/bc19-remove-flyoutbase-close

Conversation

@Xiaoy312

@Xiaoy312 Xiaoy312 commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: #8339

PR Type:

💬 Other... Breaking change (API alignment with WinUI)

What changed? 🚀

Two related FlyoutBase API-surface changes that stop Uno exposing opening/closing internals that WinUI keeps non-public.

1. Remove Uno-only FlyoutBase.Close() (BC19)

FlyoutBase.Close() was a Uno-only protected internal virtual method — a byte-for-byte alias of the public Hide() (both bodies are Hide(canCancel: true)). WinUI has no Close() on FlyoutBase. This removes it (BC19 of the Phase 5 breaking-changes wave), along with the Flyout.Close() binary-compat override, and redirects every caller to the public Hide().

Callers redirected:

  • Production: Button flyout dismissal (OnUnloaded), DatePickerFlyout confirmation path.
  • Tests: Given_CalendarDatePicker, Given_DatePicker, Given_TimePicker, Given_MenuFlyout (the flyout call — MenuFlyoutSubItem.Close() is a different, unrelated method and is left as-is), Given_Flyout.

Behaviour is preserved exactly, since Close() and Hide() were identical.

2. Lock down FlyoutBase.Open() to internal

FlyoutBase.Open() — the internal popup-opening step invoked from ShowAtCore — was protected internal virtual. The protected half leaked this Uno-internal mechanism to external FlyoutBase subclasses, though WinUI keeps it non-public. This reduces it to internal virtual (kept virtual for the native Android NativeDatePickerFlyout / NativeTimePickerFlyout overrides, which replace it with native OS dialogs), and drops the now-redundant Flyout.Open() override — a no-op base.Open() passthrough whose only purpose was the protected binary-compat vtable slot. The two native Android overrides are realigned to internal override.

No PackageDiffIgnore.xml entry is required for either change — both members were protected internal (FamORAssem), which the package-diff gate excludes from its tracked surface (it counts only public and family members).

Validation

  • BC19 (Close()): SamplesApp.Skia.Generic (net10.0 Skia) builds clean (0 warnings / 0 errors), transitively compiling Uno.UI, Uno.UI.RuntimeTests, and all consuming samples. The BC19 change is unchanged from its original review (identical git patch-id after rebase).
  • Open() lockdown: Uno.UI.Skia and Uno.UI.RuntimeTests.Skia (net10.0) both build clean (0/0). The native Android overrides aren't part of the Skia buildable set here, but the internal override realignment is required for any native-Android build to stay valid against the internal virtual base.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample — N/A: not a behaviour change; existing flyout tests still exercise the dismissal/open paths.
  • 📚 Docs have been added/updated — N/A.
  • 🖼️ Validated PR Screenshots Compare Test Run results — N/A (no visual change).
  • ❗ Contains NO breaking changes — intentionally left unchecked; this is a breaking change (see below).
  • 👀 Reviewed 2 other open pull requests

Breaking change — impact & migration path

  • Close() removal: Custom FlyoutBase subclasses that overrode or called the Uno-only Close() will no longer compile. Migration: replace Close() with the public Hide() (identical behaviour — cancellable dismiss).
  • Open() lockdown: Custom FlyoutBase / Flyout subclasses that overrode or called the Uno-only protected internal Open() will no longer compile. Migration: drive the flyout through the public ShowAt(...) entry point; Open() was never part of WinUI's surface and is now Uno-internal only.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222075 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 86

Details
  • skia-linux-screenshots: 73 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DoubleImageBrushInList.png-dark
    • Basics Pivot Test.png
    • ColorPickerSample.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionPath.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • Buttons.png-dark
    • Buttons.png
    • Examples.png-dark
    • Examples.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
  • skia-windows-screenshots: 86 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DoubleImageBrushInList.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • Image_UseTargetSize.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ContextRequested.png-dark
    • Image_AnimatedWebP.png
    • CompositionPath.png
    • ImagesInlineInFlipView.png-dark
    • ImagesInlineInFlipView.png
    • ButtonClippingTestsControl.png

@MartinZikmund

Copy link
Copy Markdown
Member

@Xiaoy312 Hmm, it seems the Open counterpart of this .Close method is also not supposed to exist in public API? If yes, maybe could also be addressed. It could just be internal, but not protected internal

Xiaoy312 and others added 2 commits July 15, 2026 15:29
FlyoutBase.Close() was a Uno-only protected-internal alias of the public Hide() (both bodies are Hide(canCancel: true)); WinUI has no Close(). Remove it, along with the Flyout.Close() binary-compat override, and redirect every caller to the public Hide().

Callers redirected: Button flyout dismissal (OnUnloaded), DatePickerFlyout confirmation, and the CalendarDatePicker/DatePicker/TimePicker/MenuFlyout/Flyout runtime tests. Behaviour is preserved exactly since Close() and Hide() were identical.

No PackageDiffIgnore entry is required: Close() was protected internal (FamORAssem), which the package-diff gate excludes from the tracked surface (it counts only public and family members).

Part of the 7.0 breaking-changes rollup (#8339).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
FlyoutBase.Open was protected internal; the protected half exposed Uno's
internal popup-opening step to external FlyoutBase subclasses, which WinUI
keeps non-public. Reduce it to internal (kept virtual for the native Android
picker overrides), and drop the now-redundant Flyout.Open override — a no-op
base.Open() passthrough whose only purpose was the protected binary-compat
vtable slot.

Align the two native Android overrides (NativeDatePickerFlyout,
NativeTimePickerFlyout) to internal override so they stay valid against the
internal virtual base.

No PackageDiffIgnore entry required: protected internal (FamORAssem) is
excluded from the package-diff tracked surface (public + family only), same
as the BC19 Close() removal.

Part of the 7.0 breaking-changes rollup (#8339).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260713/bc19-remove-flyoutbase-close branch from f25cd3b to 029a6f7 Compare July 16, 2026 03:39
@github-actions github-actions Bot added the platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform label Jul 16, 2026
@Xiaoy312 Xiaoy312 changed the title refactor(flyout)!: Remove Uno-only FlyoutBase.Close() (BC19) refactor(flyout)!: Remove FlyoutBase.Close() (BC19) and lock down Open() Jul 16, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222573 found UI Test snapshots differences: skia-linux-screenshots: 70, skia-windows-screenshots: 83

Details
  • skia-linux-screenshots: 70 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BitmapIcon_Foreground.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ColorPickerSample.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • ImageBrush_Stretch.png-dark
    • CompositionPath.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • EllipsemaskingEllipseGrid.png
  • skia-windows-screenshots: 83 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_Enumeration.png-dark
    • DropDownButtonPage.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_Margin_Large.png
    • Buttons.png-dark
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_UseTargetSize.png-dark
    • ImageIconPage.png-dark
    • ImageIconPage.png

@mergify

mergify Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@MartinZikmund
MartinZikmund merged commit 482caa0 into feature/breakingchanges Jul 16, 2026
50 checks passed
@MartinZikmund
MartinZikmund deleted the dev/xygu/20260713/bc19-remove-flyoutbase-close branch July 16, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants