Repository navigation
refactor(flyout)!: Remove FlyoutBase.Close() (BC19) and lock down Open() - #23737
MartinZikmund merged 2 commits into
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23737/wasm-skia-net9/index.html |
|
The build 222075 found UI Test snapshots differences: Details
|
|
@Xiaoy312 Hmm, it seems the |
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]>
f25cd3b to
029a6f7
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23737/wasm-skia-net9/index.html |
|
The build 222573 found UI Test snapshots differences: Details
|
|
Tick the box to add this pull request to the merge queue (same as
|
GitHub Issue: #8339
PR Type:
💬 Other... Breaking change (API alignment with WinUI)
What changed? 🚀
Two related
FlyoutBaseAPI-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-onlyprotected internal virtualmethod — a byte-for-byte alias of the publicHide()(both bodies areHide(canCancel: true)). WinUI has noClose()onFlyoutBase. This removes it (BC19 of the Phase 5 breaking-changes wave), along with theFlyout.Close()binary-compat override, and redirects every caller to the publicHide().Callers redirected:
Buttonflyout dismissal (OnUnloaded),DatePickerFlyoutconfirmation path.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()andHide()were identical.2. Lock down
FlyoutBase.Open()tointernalFlyoutBase.Open()— the internal popup-opening step invoked fromShowAtCore— wasprotected internal virtual. Theprotectedhalf leaked this Uno-internal mechanism to externalFlyoutBasesubclasses, though WinUI keeps it non-public. This reduces it tointernal virtual(keptvirtualfor the native AndroidNativeDatePickerFlyout/NativeTimePickerFlyoutoverrides, which replace it with native OS dialogs), and drops the now-redundantFlyout.Open()override — a no-opbase.Open()passthrough whose only purpose was theprotectedbinary-compat vtable slot. The two native Android overrides are realigned tointernal override.No
PackageDiffIgnore.xmlentry is required for either change — both members wereprotected internal(FamORAssem), which the package-diff gate excludes from its tracked surface (it counts only public and family members).Validation
Close()):SamplesApp.Skia.Generic(net10.0 Skia) builds clean (0 warnings / 0 errors), transitively compilingUno.UI,Uno.UI.RuntimeTests, and all consuming samples. The BC19 change is unchanged from its original review (identicalgit patch-idafter rebase).Open()lockdown:Uno.UI.SkiaandUno.UI.RuntimeTests.Skia(net10.0) both build clean (0/0). The native Android overrides aren't part of the Skia buildable set here, but theinternal overriderealignment is required for any native-Android build to stay valid against theinternal virtualbase.PR Checklist ✅
Screenshots Compare Test Runresults — N/A (no visual change).Breaking change — impact & migration path
Close()removal: CustomFlyoutBasesubclasses that overrode or called the Uno-onlyClose()will no longer compile. Migration: replaceClose()with the publicHide()(identical behaviour — cancellable dismiss).Open()lockdown: CustomFlyoutBase/Flyoutsubclasses that overrode or called the Uno-onlyprotected internal Open()will no longer compile. Migration: drive the flyout through the publicShowAt(...)entry point;Open()was never part of WinUI's surface and is now Uno-internal only.