Skip to content

refactor(timepicker)!: Reparent presenter to Control (BC73) - #23741

Merged
Xiaoy312 merged 1 commit into
feature/breakingchangesfrom
dev/xygu/20260713/bc73-timepickerflyoutpresenter-control
Jul 20, 2026
Merged

Xiaoy312 merged 1 commit into
feature/breakingchangesfrom
dev/xygu/20260713/bc73-timepickerflyoutpresenter-control

Conversation

@Xiaoy312

Copy link
Copy Markdown
Contributor

GitHub Issue: #8339

PR Type:

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

What changed? 🚀

TimePickerFlyoutPresenter derived from FlyoutPresenter in Uno, but in WinUI it derives directly from Control — exactly like its sibling DatePickerFlyoutPresenter (which already ships as : Control in Uno). This PR (BC73 of the Phase 5 breaking-changes wave) reparents TimePickerFlyoutPresenter to Control to match WinUI and bring the two picker presenters into line.

Changes:

  • TimePickerFlyoutPresenter : FlyoutPresenter → : Control.
  • Dropped the new modifier from IsDefaultShadowEnabled and IsDefaultShadowEnabledProperty. Those members were only marked new because they shadowed FlyoutPresenter.IsDefaultShadowEnabled; once the base is Control (which has no such member) they are ordinary declarations — matching WinUI, where TimePickerFlyoutPresenter declares its own IsDefaultShadowEnabled.

Nothing else was touched: the presenter already builds its visual tree from named template parts (it never used ContentControl.Content or any FlyoutPresenter-specific member), its default styles (Fluent v2/v1, Compact density, Generic) set only Control/FrameworkElement properties and carry no BasedOn on a FlyoutPresenter style, and it is created internally by TimePickerFlyout (typed as TimePickerFlyoutPresenter, not FlyoutPresenter).

Validation:

  • Compile: SamplesApp.Skia.Generic (net10.0 Skia) builds clean, transitively compiling Uno.UI, Uno.UI.RuntimeTests, and all consuming samples.
  • Runtime (Skia Desktop): 5/5 Given_TimePicker flyout tests pass — When_12HourClock_Should_Display_12_Instead_Of_0, When_MinuteIncrement_In_Range_Should_Be_Set_Properly, When_MonochromaticOverlayPresenter_Workaround, When_PM_Opened_And_Closed, When_TimePickerFlyout_Placed_Outside_Window — each opens the flyout, instantiates and templates the presenter, and reads its state (the run log shows the TimePickerFlyoutPresenter and its automation peer being created). When_Time_Uninitialized_Should_Display_Current_Time is #if __IOS__ || __ANDROID__ and correctly did not run on Skia. Behaviour is unchanged (the shadow still applies via the presenter's own IsDefaultShadowEnabled), so these are pass-after regression guards.
  • Style sweep: every style file naming the type (Fluent v2/v1, Compact density, Generic.xaml, Generic.Native.xaml, SystemResources.xaml, mergedstyles.xaml) was checked — none carry a BasedOn on a FlyoutPresenter-targeted style, so no native style-apply regression from the base-class change.

No PackageDiffIgnore.xml entry is required — the package-diff gate tracks declared members only and does not track base-type changes; no declared member is removed here (dropping the new keyword does not change the emitted metadata, and IsDefaultShadowEnabled/IsDefaultShadowEnabledProperty remain declared on the type).

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample — N/A: not a behaviour change; existing Given_TimePicker tests exercise the flyout open/template/display path and were run as regression guards.
  • 📚 Docs have been added/updated — N/A (migration note below).
  • 🖼️ Validated PR Screenshots Compare Test Run results — no intended visual change (the TimePicker flyout renders identically).
  • ❗ 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

  • Impact (source-breaking): Code that treated TimePickerFlyoutPresenter as a FlyoutPresenter/ContentControl — assigning an instance to a FlyoutPresenter/ContentControl variable, or accessing inherited members such as Content/ContentTemplate or FlyoutPresenter-specific API through it — no longer compiles. This is the same shape DatePickerFlyoutPresenter already has.
  • Migration: Work against TimePickerFlyoutPresenter (or Control) directly. Style it via TimePickerFlyout.TimePickerFlyoutPresenterStyle as before; the default templates are unchanged.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222086 found UI Test snapshots differences: skia-linux-screenshots: 68, skia-windows-screenshots: 89

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ColorPickerSample.png
    • DropDownButtonPage.png-dark
    • DynamicFont.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • DynamicFont.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionPath.png
    • DisplayInformation.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • CornerRadiusControls.png
    • ElementLevelTheme.png-dark
    • Gamepad_Enumeration.png-dark
    • EllipsemaskingEllipseGrid.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • ClipboardTests.png-dark
  • skia-windows-screenshots: 89 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • Focus_FocusVisual_Properties.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DisplayInformation.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_UseTargetSize.png-dark
    • Image_UseTargetSize.png
    • Basics Pivot Test.png
    • AnimatedVisualsTestbedPage.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageIconPage.png-dark
    • ClipboardTests.png-dark
    • ElementLevelTheme.png-dark

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 222086 has failed on Uno.UI - CI.

TimePickerFlyoutPresenter derived from FlyoutPresenter in Uno, but WinUI
derives it directly from Control -- like its sibling
DatePickerFlyoutPresenter, which already ships as : Control. Reparent to
Control to match WinUI and align the two picker presenters.

The new modifier on IsDefaultShadowEnabled / IsDefaultShadowEnabledProperty
existed only to shadow FlyoutPresenter's members; with a Control base they
are ordinary declarations, matching WinUI's own surface.

BC73 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/bc73-timepickerflyoutpresenter-control branch from 66af065 to ac8a4e5 Compare July 16, 2026 15:02
@Xiaoy312
Xiaoy312 enabled auto-merge July 16, 2026 15:02
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222659 found UI Test snapshots differences: skia-linux-screenshots: 67, skia-windows-screenshots: 100

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Gamepad_Enumeration.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Image_Margin_Large.png-dark
    • ButtonClippingTestsControl.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • DataTransferManager.png
    • Examples.png-dark
    • Examples.png
    • ImageBrush_Stretch.png-dark
    • Image_AnimatedWebP.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • DoubleImageBrushInList.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 100 changed over 2392

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • Focus_FocusVisual_Properties.png-dark
    • ColorPickerSample.png-dark
    • CalendarView_Theming.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Gamepad_CurrentReading.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_AnimatedWebP.png-dark
    • ImagesInlineInFlipView.png-dark
    • Image_AnimatedWebP.png
    • ImagesInlineInFlipView.png
    • Gamepad_Enumeration.png-dark
    • DynamicFont.png
    • ImageBrushAlignmentXY.png
    • DisplayInformation.png-dark
    • CustomTitleBar_Tests.png-dark
    • Examples.png

@Xiaoy312
Xiaoy312 merged commit 97d0e9e into feature/breakingchanges Jul 20, 2026
50 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20260713/bc73-timepickerflyoutpresenter-control branch July 20, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants