Skip to content

feat(semanticzoom): add Skia support - #23943

Open
morning4coffe-dev wants to merge 68 commits into
masterfrom
dev/doti/port-semanticzoom
Open

morning4coffe-dev wants to merge 68 commits into
masterfrom
dev/doti/port-semanticzoom

Conversation

@morning4coffe-dev

@morning4coffe-dev morning4coffe-dev commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #5252

PR Type:

✨ Feature

What changed? 🚀

This ports SemanticZoom to Uno's Skia targets and aligns its observable behavior with WinUI. It adds the control state machine, template lifecycle, automation peer behavior, and ListViewBase zoomed-in and zoomed-out item mapping.

It also ports the managed ScrollViewer and ScrollContentPresenter direct-manipulation behavior that Semantic Zoom depends on — extent publication, zoom transitions and view-change sequencing.

Still unported from ScrollViewer_Partial.cpp / ScrollContentPresenter_Partial.cpp, and out of scope here: header support (top / left / top-left headers), gamepad navigation, zoom snap-point collection change handling, anchor-candidate registration, and the native DManip element plumbing. GetManipulationViewport and GetManipulationPrimaryContent are ported but have no caller yet — in WinUI the native DManip service calls them.

Deliberate deviations from the WinUI sources, each commented at the call site:

  • ListViewBase.StartViewChangeTo does not raise WinUI's m_disableScrollingPlaceholders — Uno has no scrolling-placeholder pipeline (ShowsScrollingPlaceholders is [NotImplemented]), so there is nothing to suppress during the transition.
  • ListViewBaseHeaderItem.OnKeyDown does not call ListViewBase.SetHandleKeyDownArgsFromItem — Uno's ListViewBase.TryHandleKeyDown has no key-origin gate to feed.
  • ScrollContentPresenter.SetZoomFactor keeps two independent ifs where WinUI uses if/else: Uno's IsScrollClient() is also true for the ManipulationDataProviderScrollInfo bridge, whose provider still needs the zoom factor while the presenter owns the scroll data.
  • SemanticZoom.MakeStoryboardEssential approximates Storyboard::IsEssential through EnableDependentAnimation.
  • UIElement.GetScaleFactorForLayoutRounding has no IsManipulatable() gate; only ScrollContentPresenter assigns the global factor, and only to the elements DManip manipulates.

Breaking changes ❗

GroupItem.GetTemplatedItemsControl() moves from public to internal. It was an Uno-only compatibility shim that always returned null; WinUI declares it as an implementation-only helper and omits it from MIDL. It is now implemented against the ItemsControl template part, matching GroupItem_Partial.cpp. Recorded in build/PackageDiffIgnore.xml.

Validation

  • Focused Semantic Zoom and direct-manipulation runtime tests pass on Skia Desktop: Given_SemanticZoom, Given_ScrollViewer, Given_ScrollViewer_Integration, Given_ScrollViewer_Zoom and Given_ListViewBase — 240 passed, 0 failed (1 pre-existing Assert.Inconclusive).
  • Matching public behavior tests pass against native WinUI.
  • Android, WebAssembly, Reference, and unit-test projects compile successfully after the final changes.
  • API synchronization completes successfully.

Fidelity review against microsoft-ui-xaml at the pinned commit produced these corrections, all included here:

  • ScrollViewer.GetManipulationConfigurations cleared the bring-into-viewport output before its gates, so an unloaded, content-less or disabled ScrollViewer no longer claims bring-into-viewport capability.
  • ScrollViewer.ScrollInDirection no longer falls through to an unanimated scroll when direct manipulation declines an animated request, matching WinUI. Measured on Skia desktop: the animated call moves one line delta with or without the fallback.
  • ScrollContentPresenter.MakeVisible no longer treats a zero-sized rectangle as empty; Rect.Intersect already yields Empty for rectangles that do not touch.
  • SemanticZoom.OnPointerWheelChanged requires a ScrollViewer template part before allowing wheel zoom, as WinUI does.
  • Removed a dead non-Skia ChangeView branch that called a method no longer present in the repository.
  • Restored WinUI's numeric values for the ported DirectManipulation enums (DMConfigurations, DMAlignment, DMOverpanMode, DMSnapCoordinate, DMMotionTypes), which had been renumbered. Every use is symbolic, so this changes no behavior.

Reviewers should note one change that reaches beyond Semantic Zoom: UIElement.Pointers now assigns PointerRoutedEventArgs.GestureFollowing, which was never set before. Six existing consumers test it for RightTapped and were inert until now - ButtonBase, ComboBox, MenuFlyoutItem, Slider, CalendarDatePicker and ScrollViewer - so a right-button release no longer invokes their pointer-up action. This matches WinUI, but it is not covered by the tests in this PR.

PR Checklist ✅

@github-actions github-actions Bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia labels Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 6m 31s —— View job


Code Review

  • Load review tools
  • Gather context: read key changed files
  • Analyze for correctness, async discipline, cross-platform, DP correctness, style
  • Post inline findings
  • Post summary

Verdict: fix-first — one confirmed correctness bug and one systemic design issue around exception-and-state consistency. The rest of the port (async discipline, platform targeting, pragma scoping, event types, test structure) looks clean.

3 issues by severity:

Severity Count
Correctness (confirmed bug) 1
Design / state consistency 2

Cross-cutting notes:

  • Confirmed bug — duplicate TryGetVisualState("ZoomOutButtonVisible") block (SemanticZoom.partial.mux.skia.cs:309–337): OnZoomOutButtonVisibleStoryboardCompleted ends up registered twice on the same storyboard and fires twice per animation. The first block also incorrectly marks all group transitions as essential instead of filtering to the specific one. See inline comment.

  • State-consistency design issue — IsZoomedInViewActive guard throws after DP is already committed (SemanticZoom.Properties.skia.cs:72): When CanChangeViews = false, the SetValue succeeds (DP becomes false) and then the callback throws, leaving the property value out of sync with the actual view. The guard should be in the property setter, before SetValue, so a rejected set is a true no-op. The related test (Given_SemanticZoom.cs:186–188) currently asserts the broken post-throw state (Assert.IsFalse) and should assert Assert.IsTrue once the setter guard is in place. See inline comments.

  • Ambiguous teardown — oldValue.IsZoomedInView = true unconditional (SemanticZoom.partial.mux.skia.cs:153): When the ZoomedOutView is disconnected, its IsZoomedInView is forced to true regardless of the isZoomedInView parameter. If this matches WinUI's reset-to-default behaviour, a comment is needed; if it is a transcription error the value should use the parameter. See inline comment.

  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no #pragma warning disable without paired restore, no edits to Generated/ files. Pragma blocks in ScrollViewer.partial.h.mux.cs, ScrollContentPresenter.partial.h.mux.cs, and the main port files are all properly bracketed. #nullable disable on the large ported files is acceptable for the initial port.

@unodevops

Copy link
Copy Markdown
Contributor

Comment thread src/Uno.UI/DirectUI/ScrollData.cs Resolved
Comment thread src/Uno.UI/DirectUI/ScrollData.cs Resolved
Comment thread src/Uno.UI/DirectUI/ScrollData.cs Resolved
Comment thread src/Uno.UI/DirectUI/ScrollData.cs Fixed
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 225350 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2348, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Focus_FocusVisual_Properties.png-dark
    • DropDownButtonPage.png-dark
    • Examples.png-dark
    • DropDownButtonPage.png
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ImageIconPage.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ClipboardTests.png-dark
    • Buttons.png-dark
    • Buttons.png
  • skia-windows-screenshots: 2348 changed over 2394

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • ApplicationViewSizing.png-dark
    • ArcSegment.png-dark
    • AutoBorderStretchwithbottommargin.png
    • AutoSizedTopLeft.png-dark
    • BackGesture.png
    • Basics Pivot Test.png
    • BeginTime_MultipleAnimations.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderTopwithmargins.png-dark
    • BorderTopwithmargins.png
    • Border_BorderThickness.png-dark
    • Border_BorderThickness.png
    • Border_CornerRadius_with_Opacity.png-dark
    • Border_CornerRadius_with_Opacity.png
    • Border_With_Off_Centre_ScaleTransform.png-dark
    • Border_With_Off_Centre_ScaleTransform.png
    • Button_Inside_Border.png-dark
    • Button_Inside_Border.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • UITests.Uno_Web.Http.CookieManagerTests
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

@github-actions github-actions Bot added the area/build Categorizes an issue or PR as relevant to build infrastructure label Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 5m 29s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Read key changed files since last review
  • Verify previous findings were addressed or properly justified
  • Check for new issues in updated code
  • Post inline comments for any new findings
  • Post summary

Verdict: fix-first — one unresolved correctness issue from the previous round, one new style violation. Two prior findings were properly justified by WinUI source parity.

Status of previous findings

Finding Status
Duplicate TryGetVisualState("ZoomOutButtonVisible") block (SemanticZoom.partial.mux.skia.cs:309–337) ✅ Justified — author confirmed WinUI dc46907e92 performs both lookups and wires both handlers; changing this would diverge from upstream
oldValue.IsZoomedInView = true unconditional in teardown (SemanticZoom.partial.mux.skia.cs:153) ✅ Justified — author confirmed WinUI intentionally resets the detached view to the zoomed-in default
IsZoomedInViewActive setter commits value before guard can throw (SemanticZoom.Properties.skia.cs:59 / SemanticZoom.partial.mux.skia.cs:114) ❌ Still open — no response from author; code is unchanged
Given_SemanticZoom.cs:188 asserts broken post-throw state (Assert.IsFalse) ❌ Still open — no response from author; code is unchanged

Open unresolved issue (from previous review, still unaddressed)

IsZoomedInViewActive state-consistency: SetValue commits the DP value to false before OnPropertyChanged2 runs; when CanChangeViews = false the callback throws, but the DP is already false while the visual remains in the ZoomedIn state. The previous inline comment (on SemanticZoom.Properties.skia.cs:72) details the fix: move the CanChangeViews guard into the property setter before the SetValue call, remove it from the callback, and update the test assertion at line 188 to Assert.IsTrue. This finding needs a response — either a fix, or a WinUI-parity justification showing WinUI exhibits the same post-throw committed value.

New finding in this sync

ScrollViewer.cs:123–124 — a code-history comment narrating that DependencyProperty declarations were "moved" to another file. This violates the project style rule ("Don't narrate code removal or change history"). Inline comment posted with a suggestion to remove it.

Cross-cutting notes

  • fix(semanticzoom)! commit type signals a breaking change, but the PR checklist marks "Contains NO breaking changes." The ! appears to be informal; the underlying behavior change (implementing InternalChangeView on Android/iOS instead of throwing NotImplementedException) is additive, not a contract break. Not a blocker, but worth clarifying in the commit message if this feeds release notes.
  • Floating-point equality comments from the code-quality bot are porting artifacts; those comparisons mirror upstream C++ directly and tolerance-wrapping them is a separate concern better tracked as a follow-up.
  • Async discipline, platform targeting, event Action usage, pragma scope, and Generated-file discipline all remain clean.

@morning4coffe-dev

Copy link
Copy Markdown
Member Author

Published eea256c334 with the Semantic Zoom / managed Skia follow-up fixes.

Validation:

  • Focused Skia runtime gate: 10/10 passed (direct-manipulation disabled cases, mixed-axis arbitration, bidirectional Semantic Zoom pinch, and GridView + ItemsWrapGrid layout regression).
  • PackageDiff 1.1.0-dev.29: comparing the latest stable Uno.WinUI 6.6.184 net10.0 reference assembly with the current reference build detects GroupItem.GetTemplatedItemsControl() as a breaking removal without an allow-list; with build/PackageDiffIgnore.xml, the removal is struck through, the tool exits 0, and there are zero unexpected differences.
  • Strict serialized Release net10.0 SamplesApp.Skia.Generic build passed with analyzers, code-style enforcement, and warnings-as-errors enabled.
  • git diff --check and editor diagnostics are clean.

The GroupItem.GetTemplatedItemsControl() removal is intentionally recorded as a breaking WinUI-parity change. Automated suggestions that would alter exact upstream behavior (storyboard wiring, detached-view reset, DP post-set exception semantics, and exact floating-point comparisons) were answered in their threads and retained.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

WinAppSDK sync generator drift detected on eea256c

The Uno.WinAppSDKSyncGenerator produced changes that are not committed on this PR.

To apply automatically (PRs from branches in this repo only): comment /apply-sync-gen on this PR and a bot will push chore: Sync generator run to the head branch.

To apply manually (required for PRs from forks):

  1. Download the sync-generator-patch artifact from this run.
  2. In your local checkout of the PR branch:
    git apply sync-generator.patch
    git add -A
    git commit -m "chore: Sync generator run"
    git push
    

Or re-run the generator locally on Windows via build\run-api-sync-tool.cmd.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 225404 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2348, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DisplayInformation.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ImageIconPage.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ClipboardTests.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 2348 changed over 2394

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppBarToggleButtonTest.png-dark
    • AppWindowPresenters.png
    • Attributed_text_Supserscript.png
    • AutoSuggestBoxChosenSuggestion.png-dark
    • BadgeNotificationTests.png-dark
    • Basics.png
    • BezierSegment.png
    • BitmapIcon_Monochromatic.png-dark
    • BorderLeftwithmargins.png
    • BorderRightwithmargins.png-dark
    • Border_CornerRadius.png-dark
    • Border_CornerRadius.png
    • Border_LinearGradientBrush.png-dark
    • Border_LinearGradientBrush.png
    • Border_With_TranslateTransform.png-dark
    • Border_With_TranslateTransform.png
    • Button_UseUWPDefaultStyles.png-dark
    • AppBarButtonWithIconTest.png
    • Button_UseUWPDefaultStyles.png
    • AppWindowPositionAndSize.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 3m 19s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since the last completed review round (fe758790a)
  • Review 7b9c646b6 (revert(inputpane): restore baseline focus handling)
  • Review 3b9b86648 (fix(scrollviewer): avoid duplicate bring-into-view handling)
  • Post inline findings (none — nothing to flag)
  • Post summary

Verdict: ship — the two new commits are a clean root-cause fix plus the cleanup it enabled. No new issues found.

What the new commits do

3b9b86648 fix(scrollviewer): avoid duplicate bring-into-view handling — ScrollContentPresenter.mux.cs::OnBringIntoViewRequested is the pre-existing WinUI-ScrollPresenter-ported bring-into-view path. This PR's new WinUI ScrollViewer/ScrollContentPresenter.partial.mux.cs port added its own MakeVisible/BringIntoViewport-driven handling for the same event, so both ran and scrolled the target twice. The fix adds a short-circuit:

if (GetScrollOwner() is ScrollViewer)
{
    return;
}

I verified this guard is correctly scoped, not a blanket disable: ScrollContentPresenter.mux.cs has no platform suffix/guard and presenter.ScrollOwner = this in ScrollViewer.OnApplyTemplate.cs:36 is likewise unconditional, but that's fine here since Uno.UI.csproj fixes UnoRuntimeIdentifier to Skia (__SKIA__ is always defined in this assembly, consumed as a single build by all Skia-hosted targets per AGENTS.md) — so ScrollViewer.partial.mux.cs's Skia-gated WinUI port is always present when this code runs. The guard also doesn't turn the legacy path into dead code: TabView.xaml:166 uses a standalone ScrollContentPresenter with no owning ScrollViewer, so that path stays reachable there.

The accompanying test update in Given_ScrollViewer.cs (When_Nested_Scroll_BringIntoView) changes innerScrollViewer/outerScrollViewer's expected OriginalSource/TargetElement/TargetRect under #if HAS_UNO. This is an expected behavioral consequence, not a test-chasing hack: with the duplicate legacy path removed, the event each ScrollViewer observes is now the new request ScrollViewer.MakeVisible raises for parent contributors (per the new inline comment), rather than the original bubbled child-originated event — so OriginalSource/TargetElement correctly shift to the ScrollViewer itself and TargetRect reflects the new coordinate space.

7b9c646b6 revert(inputpane): restore baseline focus handling — Reverts InputPane.cs::EnsureFocusedElementInViewPartial back to a single unconditional focusedElement.StartBringIntoView(), removing the custom ChangeView-based occlusion-scroll fallback (and the focusedBoundsBeforePadding tracking it needed) added a few commits earlier and previously flagged for coverage gaps. Diff is a clean revert — scp remains used for the padding logic above it, no orphaned locals. This is consistent with 3b9b86648 being the actual root-cause fix: once the duplicate bring-into-view firing is eliminated, the standard StartBringIntoView() pipeline is sufficient and the manual workaround is no longer needed.

Cross-cutting notes

  • Checked Given_InputPane.cs — When_Focused_Element_Not_Occluded_Then_Centered_Content_Is_Not_Moved doesn't exercise the reverted code path (it only asserts layout/padding behavior in ScrollContentPresenter.ArrangeOverridePort, unaffected). When_Occluded_Field_In_Viewport_Sized_Content_Then_Scrolled_Above_Occlusion now depends on the standard StartBringIntoView() pipeline scrolling correctly against the shrunk (padded) viewport — consistent with the revert's premise, but this is a code-review assessment only; I did not execute the runtime tests in this pass, so runtime confirmation is still outstanding.
  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no #pragma warning disable without restore, no Generated/ file edits.
  • All prior findings from earlier review rounds remain resolved; nothing regressed in this delta.
    (branch: dev/doti/port-semanticzoom)

@unodevops

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 4m 41s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since the last completed review (fe758790a, verdict "ship")
  • Review the input-pane occlusion arrange/bring-into-view churn (the actively-disputed area)
  • Check remaining diff for new issues
  • Post inline findings (none — nothing to flag)
  • Post summary

Verdict: ship — the three new commits close out the long-running keyboard-occlusion arrange/bring-into-view saga with a genuine simplification rather than another guard layer. No new issues found.

What changed since the last review (fe758790a)

Three PR-owned commits landed (the intervening d3dcfa053 chore: Merge latest master only pulls in unrelated master history — clipboard/XAML-codegen changes, not reviewed here):

7b9c646b6 revert(inputpane): restore baseline focus handling — Fully reverts c2c0d040e (fix(inputpane): preserve unoccluded focus position), and in doing so restores InputPane.EnsureFocusedElementInViewPartial to the exact pre-port baseline: an unconditional focusedElement.StartBringIntoView(), with none of the manual ScrollViewer.ChangeView/rect-intersection special-casing that had accumulated over the prior ~9 commits. Confirmed via git diff fe758790a..HEAD -- InputPane.cs that the net change from the last reviewed commit is exactly this revert (add-then-revert cancels out). This resolves the coverage gap flagged in the prior review round (a focused element under a ScrollContentPresenter with no ScrollViewer-typed ScrollOwner was silently left uncorrected) — there's no longer a conditional branch to fall through in the first place.

3b9b86648 fix(scrollviewer): avoid duplicate bring-into-view handling — Adds a guard to the legacy ScrollContentPresenter.OnBringIntoViewRequested (ScrollContentPresenter.mux.cs:80): when GetScrollOwner() is ScrollViewer, return immediately after base.OnBringIntoViewRequested(args), deferring entirely to the WinUI-ported ScrollViewer.OnBringIntoViewRequested → MakeVisible (ScrollViewer.partial.mux.cs:2665), which is unconditionally compiled (not Skia-gated) and already handles bring-into-view for its content. Verified this is correctly scoped by tracing GetScrollOwner()/IsScrollClient(): IsScrollClient() returns true both when the SCP itself is the scroll client (GetCurrentScrollInfo() == this) and when it's the ManipulationDataProviderScrollInfo wrapper case (i.e. ItemsPresenter/virtualizing-panel content — the ListView/GridView path), so the guard correctly fires for both plain content and virtualized content. IScrollInfo is an internal interface with only these two implementers in the codebase, so there's no third-party-implementable case that could fall through the guard. Updated Given_ScrollViewer.When_Nested_Scroll_BringIntoView test expectations are consistent with WinUI's actual chained bring-into-view behavior (a scroll container that finishes scrolling re-raises a new request scoped to itself for parent contributors) — the first (unconditional, non-HAS_UNO-gated) assertion block is unchanged, only the Uno-specific chained-event assertions were updated.

7dda3161e test(semanticzoom): target keyboard input at control — Retargets KeyboardHelper.PressKeySequence at sut (the SemanticZoom control) instead of the active child view, consistent with the routing changes above. Minor, test-only.

Cross-cutting notes

  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no #pragma warning disable without restore, no Generated/ file edits.
  • The net effect of this batch is a simplification: the ad-hoc ChangeView-based occlusion workarounds in InputPane.cs are gone, and bring-into-view now flows through a single, correctly-deduplicated path (the ported ScrollViewer.MakeVisible). This is the root-cause resolution the debugging-discipline rule asks for — once the underlying ScrollContentPresenter arrange/extent port was fixed (fe758790a) and double-handling was eliminated (3b9b86648), the symptom-level patches in InputPane.cs became unnecessary rather than needing another layer.
  • Existing runtime coverage (Given_InputPane.When_Occluded_Field_In_Viewport_Sized_Content_Then_Scrolled_Above_Occlusion, When_Focused_Element_Not_Occluded_Then_Centered_Content_Is_Not_Moved) still exercises the reverted StartBringIntoView() path end-to-end, so this isn't a coverage regression.
    (branch: dev/doti/port-semanticzoom)

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 232643 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 2310, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DisplayInformation.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 2310 changed over 2404

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AppBarToggleButtonTest.png-dark
    • ApplicationViewSizing.png
    • AppWindowPresenters.png-dark
    • Attributed_text_FontSize_Changing.png-dark
    • AutoBorderStretchwithbottommargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_Name.png
    • AutoSuggestBox_Keyboard.png-dark
    • AutoSuggestBox_Keyboard.png
    • BasicEnability.png-dark
    • BasicEnability.png
    • BeginTime_MultipleAnimations.png-dark
    • BeginTime_MultipleAnimations.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderBottomwithmargins.png-dark
    • BorderBottomwithmargins.png
    • BorderImageBrush.png-dark
    • BorderImageBrush.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Uno_Web.Http.CookieManagerTests
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@morning4coffe-dev

Copy link
Copy Markdown
Member Author

Final CI update for 7dda316: all 61 checks are successful (two neutral), the PR is mergeable, and all 39 review threads are resolved. The Android occlusion regression was fixed at its cause: the legacy presenter handler and source-ported ScrollViewer.MakeVisible had both processed the same bring-into-view request. The exact Android case and hosted Android/macOS runs now pass. Source repair is ready for maintainer review; no PR approval or merge was performed.

WinUI's OnPointerWheelChanged disallows mouse zoom when the template has no
ScrollViewer part; the null-propagating check allowed it instead.

Also records why MakeStoryboardEssential and the ChangeViews content guard
deviate from SemanticZoom_Partial.cpp.
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 4m 19s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since the last completed review round (fe758790a, verdict "ship")
  • Review diff for new changes
  • Post inline findings (1 minor)
  • Post summary

Verdict: ship — one confirmed correctness bug fix (with a null-propagation defect) landed cleanly, plus a legitimate root-cause fix for double bring-into-view handling, a simplification revert, and doc-only comment additions. No blocking issues.

What changed since the last review (fe758790a)

Commit What it does Assessment
7b9c646b6 revert(inputpane) Reverts the multi-round InputPane.EnsureFocusedElementInViewPartial drift-compensation logic back to a plain focusedElement.StartBringIntoView() Sound simplification — resolves the fragility flagged across the prior 9-commit churn on this exact path by removing the speculative logic rather than patching it further
3b9b86648 fix(scrollviewer) Adds if (GetScrollOwner() is ScrollViewer) return; guard in ScrollContentPresenter.OnBringIntoViewRequested (legacy ScrollPresenter-ported path), since the WinUI-ported ScrollViewer.OnBringIntoViewRequested now owns that handling and both firing double-scrolled the target Correct root-cause fix — confirmed ScrollViewer's own OnBringIntoViewRequested override exists (ScrollViewer.partial.mux.cs:2665) and would otherwise run alongside the presenter's legacy path on the same bubbling event. Updated Given_ScrollViewer.cs assertions (OriginalSource/TargetRect now reflecting ScrollViewer.MakeVisible re-origination) are consistent with the fix
7dda3161e test(semanticzoom) Targets keyboard input ($d$_ctrl#...) at sut instead of the child zoomedInView/zoomedOutView Correct test-only fix, no functional change
494fcbd67 chore Deletes a 24,826-line themeresources_v2.xaml that leaked back in via a master merge Verified this file was already untracked on master (f2477ed6e); re-removing it is correct cleanup, not a content regression
3a2a12e71 fix(semanticzoom) Fixes m_tpScrollViewer?.ZoomMode != ZoomMode.Disabled → m_tpScrollViewer is { } scrollViewer && scrollViewer.ZoomMode != ZoomMode.Disabled Confirmed real bug: the null-conditional version evaluated to true when there's no ScrollViewer template part (null != ZoomMode.Disabled is true), incorrectly allowing mouse-wheel zoom instead of disallowing it per WinUI's OnPointerWheelChanged. One minor test-coverage gap flagged inline. Also adds two short, non-obvious-WHY comments documenting deviations (FrameworkElement-content assumption, MakeStoryboardEssential approximation)
262cbc93c docs Adds 3 short comments explaining WinUI-parity gaps (m_disableScrollingPlaceholders no-op, header key-forwarding origin gate, GetScaleFactorForLayoutRounding gating) with no code change Comment-only, appropriately concise, explains non-obvious WHY per style rule

Cross-cutting notes

  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no new #pragma warning disable without restore, no hand-edits to Generated/ files.
  • The GetScrollOwner() is ScrollViewer guard in ScrollContentPresenter.mux.cs is unconditional (no #if __SKIA__), consistent with the architecture already established and validated in prior review rounds for this PR (Uno.UI's UI layer ships a single build; ScrollViewer's WinUI-port members are gated to __SKIA__ internally, and CI across Android/iOS/WASM/Desktop has been green on this pattern throughout the PR) — not re-litigating that settled point here.
  • All prior open findings from earlier rounds remain resolved; nothing in this delta reintroduces them.
    (branch: dev/doti/port-semanticzoom)

// allow zooming using mouse in Win8 desktop apps. Phone does not have mouse in phone blue.
// in threshold mouse zoom is disabled by default. unless you enable zoom mode on the
// ScrollViewer
var shouldAllowMouseZoom = m_tpScrollViewer is { } scrollViewer && scrollViewer.ZoomMode != ZoomMode.Disabled;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor: no regression test for this fix.

Good catch on the null-propagation bug (m_tpScrollViewer?.ZoomMode != ZoomMode.Disabled evaluated to true when m_tpScrollViewer was null, incorrectly allowing wheel-zoom with no ScrollViewer template part). The fix is correct, but there's no runtime test asserting that mouse-wheel zoom is a no-op when the template omits the ScrollViewer part — worth adding one to Given_SemanticZoom.cs (e.g. a SemanticZoom with a custom/empty template lacking a "ScrollViewer"-named part, verify IsZoomedInViewActive doesn't change on mouse.WheelDown()/WheelUp() with Ctrl held) so a future refactor of this null-check doesn't silently regress.

[Fix this →](https://claude.ai/code?q=In+src%2FUno.UI.RuntimeTests%2FTests%2FWindows_UI_Xaml_Controls%2FGiven_SemanticZoom.cs+on+branch+dev%2Fdoti%2Fport-semanticzoom%2C+add+a+runtime+test+that+creates+a+SemanticZoom+with+a+template+that+omits+the+%22ScrollViewer%22-named+part%2C+then+verifies+that+Ctrl%2Bmouse-wheel+does+not+toggle+IsZoomedInViewActive%2C+covering+the+null-propagation+fix+in+SemanticZoom.partial.mux.cs%3A851+%28shouldAllowMouseZoom+must+be+false+when+m_tpScrollViewer+is+null%29.&repo=unoplatform%2Funo

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 234951 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 289, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DisplayInformation.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 289 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationPropertiesExtensions_Role.png-dark
    • Buttons.png-dark
    • Accessibility_ScreenReader.png-dark
    • AutomationProperties_AutomationId.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • CompositionPath.png-dark
    • CompositionPath.png
    • Accessibility_ScreenReader.png
    • Battery.png-dark
    • Battery.png
    • AuthenticationBroker_Demo.png
    • AutomationProperties_Name.png
    • AutomationPropertiesExtensions_Role.png
    • AutomationProperties_AutomationId.png-dark
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • AutomationProperties_Name.png-dark
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • AuthenticationBroker_Demo.png-dark
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@unodevops

Copy link
Copy Markdown
Contributor

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

GetManipulationConfigurations pre-filled the bring-into-viewport output with the
full configuration set, so an unloaded, content-less or disabled ScrollViewer
claimed bring-into-viewport capability. WinUI clears the output up front and
publishes the set only once every gate has passed.
MakeVisible treated a zero-width or zero-height rectangle as empty and bailed
out. WinUI only skips the sentinel empty rect, and Rect.Intersect already yields
Empty when the rectangles do not touch, so the extra test only dropped valid
targets such as a not-yet-measured element.

Also records why SetZoomFactor cannot use WinUI's if/else.
Uno.UI builds Skia-only, and the branch called ChangeViewNative, which no longer
exists anywhere in the repository.
The test asserted defaults of a throwaway ScrollViewer instance, which say
nothing about SemanticZoom and duplicated ScrollViewer's own coverage.
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 2m 56s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since the last completed review (3a2a12e71, verdict addressed via inline replies)
  • Review the diff for new findings (fa17bf5f0, 4577f6593, 5fb1eeab3, 5bf4a278b)
  • Post inline findings (none — nothing to flag)
  • Post summary

Verdict: ship — all four new commits are clean, verified fixes/cleanups. No new issues found.

What the new commits do

fa17bf5f0 fix(scrollviewer): report no DM configuration before gates pass — GetManipulationConfigurations now initializes bringIntoViewportConfiguration = DMConfigurations.None up front and only assigns the full set at the end, after the m_hManipulationHandler/IsLoaded and IsEnabled gates. Verified by inspection: every early return in the method now precedes the full-set assignment, so an unloaded/content-less/disabled ScrollViewer correctly reports None instead of falsely claiming bring-into-viewport capability. Matches the WinUI semantics described in the commit message.

4577f6593 fix(scrollcontentpresenter): bring zero-sized rects into view — Removes the extra rectangle.Width == 0 || rectangle.Height == 0 checks alongside rectangle.IsEmpty in MakeVisible. Verified Rect.IsEmpty (src/Uno.Foundation/Rect.cs:138) means "equals the Empty sentinel," not "zero-sized," and Rect.Intersect already collapses to Empty when rectangles don't overlap (Rect.cs:289-303) — so the removed checks were incorrectly treating valid, degenerate-width results (e.g. a not-yet-measured element) as unhandled. The added comment on SetZoomFactor correctly documents why Uno can't mirror WinUI's if (IsScrollClient()) {…} else {provider.SetZoomFactor(...)} shape (the ManipulationDataProviderScrollInfo bridge makes IsScrollClient() true while still needing to forward to the provider).

5fb1eeab3 chore: remove the dead non-Skia ChangeView branch — Deletes an #else branch calling ChangeViewNative, which no longer exists anywhere in the repo. Confirmed the #if __SKIA__ block is unconditional in practice since Uno.UI compiles Skia-only — correct dead-code removal, no behavior change.

5bf4a278b test(semanticzoom): scope the defaults test to the control — Removes assertions in When_Constructed_DefaultsMatchWinUI that checked defaults on a throwaway, unrelated new ScrollViewer() instance (not the SUT, not the SemanticZoom's template part). Confirmed the removed assertions duplicated ScrollViewer's own default-value coverage and said nothing about SemanticZoom; the actual template-hosted ScrollViewer part's zoom/scroll configuration is still exercised elsewhere in the same file (e.g. When_ListViewBase_Then_ScrollViewerZoomIsDisabled-style tests via FindNamedDescendant<ScrollViewer>). No net coverage loss for SemanticZoom itself.

Cross-cutting notes

  • All four new commits carry appropriately short "why" comments (WinUI-deviation rationale), consistent with the repo's comment-style rule — no code-history narration.
  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no new #pragma warning disable, no Generated/ file edits.
  • The previously-flagged minor finding (no regression test for the shouldAllowMouseZoom null-propagation fix in 3a2a12e71) remains open/unaddressed in this batch — not a blocker, already on record from the prior review pass.
  • Validation label: code-review assessment by inspection only; no local build/runtime execution was performed for this pass (large multi-project Uno.UI solution not built in this session).
    (branch: dev/doti/port-semanticzoom)

The animated branch fell through to the unanimated switch whenever
ProcessInputMessage reported the key unhandled, so a request DManip had
declined - during touch contact, or with no manipulation handler - still
scrolled. WinUI ignores that outcome and never falls through.

Measured on Skia desktop with a 200x200 ScrollViewer over 4000px of content:
ScrollInDirection(Down, animate: true) moves 16px (one line delta) both with
and without the fallback, so the direct-manipulation path already handles the
key on its own.
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 3m 12s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since last completed review (3a2a12e71 → 236d20a76)
  • Read diff / verify each fix against WinUI-parity reasoning and platform-targeting rules
  • Post inline findings (none — no confirmed issues)
  • Post summary

Verdict: ship — six new commits since the last review, all correct and well-justified. No new issues found; nothing from prior rounds regressed.

What the new commits do

  • fa17bf5f0 fix(scrollviewer): report no DM configuration before gates pass — GetManipulationConfigurations now clears bringIntoViewportConfiguration to None up front and only assigns the full set after the IsLoaded/IsEnabled/handler gates pass, matching WinUI. Verified this isn't cosmetic: GetManipulationViewport and GetCurrentDirectManipulationConfiguration both consume bringIntoViewportConfiguration directly (ScrollViewer.partial.mux.cs:4267, :4364), so an unloaded/content-less/disabled ScrollViewer no longer misreports bring-into-viewport capability to the DM layer.
  • 4577f6593 fix(scrollcontentpresenter): bring zero-sized rects into view — MakeVisible's emptiness check no longer treats a zero-width/zero-height Rect as empty (only the Rect.IsEmpty sentinel), matching WinUI and fixing not-yet-measured elements being dropped. Also documents why SetZoomFactor can't mirror WinUI's IsScrollClient() else-branch (the ManipulationDataProviderScrollInfo bridge case).
  • 5fb1eeab3 chore: remove the dead non-Skia ChangeView branch — confirmed ChangeViewNative doesn't exist anywhere in the tree, and Uno.UI.csproj fixes UnoRuntimeIdentifier=Skia, so __SKIA__ is always defined for this project — the removed #else was genuinely unreachable, not a live non-Skia path.
  • 236d20a76 fix(scrollviewer): let DManip own the animated ScrollInDirection — converts the animated/unanimated handling in ScrollInDirection from sequential (if (isHandled) return; then fall through) to if/else, so an animated request that DManip declines no longer falls through to the manual line/page scroll. Matches WinUI (outcome isn't consulted) and is backed by an author-reported manual measurement on Skia desktop. Braces/formatting consistent with the rest of the method.
  • 5bf4a278b test(semanticzoom): scope the defaults test to the control — removes assertions against a throwaway, unrelated ScrollViewer instance from When_Constructed_DefaultsMatchWinUI; the remaining assertions are all on the SemanticZoom SUT. Correct scoping cleanup, no coverage lost (those ScrollViewer defaults are already covered by ScrollViewer's own tests).
  • 262cbc93c docs: record the SemanticZoom port's deviations from WinUI — adds short (2-3 line) comments explaining three previously-undocumented intentional deviations (StartViewChangeTo not raising m_disableScrollingPlaceholders, ListViewBaseHeaderItem.OnKeyDown not calling SetHandleKeyDownArgsFromItem, GetScaleFactorForLayoutRounding not gating on IsManipulatable()). These match the "Deliberate deviations" section of the PR description and are appropriately concise.

Cross-cutting notes

  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no new #pragma warning disable, no Generated/ file hand-edits, no platform-suffix/#if violations in this batch.
  • Minor, non-blocking: none of fa17bf5f0, 4577f6593, or 236d20a76 add a regression test for the corrected behavior (all three are narrow WinUI-parity fixes to internal DM/manipulation logic). Given the extensive test-coverage back-and-forth already logged on this PR's ScrollContentPresenter/InputPane occlusion path, this is worth a follow-up but isn't blocking — each fix is small, has a clear WinUI-parity rationale, and (for the ScrollInDirection change) was manually verified at runtime per the commit message.
  • All previously-open findings from earlier review rounds (duplicate storyboard block, IsZoomedInViewActive post-throw state, DM state-change handler, key-scroll sentinel, MakeVisible platform guard, IScrollInfo forwarders, occluded-arrange path) remain resolved and unaffected by this batch.
    (branch: dev/doti/port-semanticzoom)

DMConfigurations, DMAlignment, DMOverpanMode, DMSnapCoordinate and DMMotionTypes
were renumbered during the port, and DMAlignmentUnlockCenter arrived as an
Unlocked member at a different bit alongside an unused Stretch member. Nothing
depends on the numeric values today - every use is symbolic - but the types are
documented as ports of DirectManipulationTypes.h, so literal WinUI constants
would silently disagree.
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @morning4coffe-dev's task in 8m 19s —— View job


Code Review (re-review after sync)

  • Load review tools
  • Identify new commits since the last completed review round (262cbc93c → be735bf7a)
  • Review new/changed diffs against AGENTS.md rules
  • Post inline findings (none — nothing to flag)
  • Post summary

Verdict: ship — the six new commits are clean re-applications of previously-vetted fidelity fixes plus one safe cleanup. No new issues found.

What changed since the last review (262cbc93c)

  • fa17bf5f0 fix(scrollviewer): report no DM configuration before gates pass — GetManipulationConfigurations now clears bringIntoViewportConfiguration to None up front and only assigns the real flag set after every gate (m_hManipulationHandler/content/IsLoaded/IsEnabled) has passed. Verified all early-return paths correctly leave the output at None; this re-establishes the "unloaded/content-less/disabled ScrollViewer reports no DM configuration" fix that was called out earlier in the PR's fidelity-review notes.
  • 4577f6593 fix(scrollcontentpresenter): bring zero-sized rects into view — MakeVisible's two isEmpty checks go back to rectangle.IsEmpty alone (dropping || Width == 0 || Height == 0), matching Rect.Intersect's own emptiness semantics. Same fix already validated earlier in this PR; this re-applies it (likely reverted by an intervening chore: Merge latest master).
  • 5fb1eeab3 chore: remove the dead non-Skia ChangeView branch — Removed the #else return ChangeViewNative(...) fallback in ScrollViewer.ChangeView.cs. Confirmed this is genuinely dead: ChangeViewNative has zero remaining references anywhere in src/, and src/Uno.UI/Uno.UI.csproj hardcodes <UnoRuntimeIdentifier>Skia</UnoRuntimeIdentifier> unconditionally (line 20, no condition) — there is exactly one compile of Uno.UI.csproj, always with __SKIA__ defined, so the remaining #if __SKIA__ ... #endif (no #else) cannot produce a missing-return compile error on any real target.
  • 5bf4a278b test(semanticzoom): scope the defaults test to the control — When_Constructed_DefaultsMatchWinUI drops the ScrollViewer default-property assertions, keeping only SemanticZoom's own defaults. ZoomMode (the one type that could've gone unused) is still referenced elsewhere in the file, so no stale-using warning.
  • 236d20a76 fix(scrollviewer): let DManip own the animated ScrollInDirection — ScrollInDirection's animate branch no longer consults ProcessInputMessage's isHandled output (out _) and the unanimated scroll switch is now in a matching else, so an animated request never falls through to the line/page scroll below regardless of outcome. Matches the WinUI-parity note already documented in the PR description; verified there's no shared trailing logic after the if/else that would be skipped.
  • be735bf7a fix(scrollviewer): restore WinUI values for the DirectManipulation enums — Renumbers DMConfigurations, DMAlignment (drops Stretch/Unlocked for a single UnlockCenter), DMOverpanMode, and DMSnapCoordinate to match the pinned WinUI source's literal values. Verified: no overlapping bits in the new DMConfigurations/DMAlignment sets, no stale references to the removed DMAlignment.Stretch/.Unlocked members anywhere in src/, and the arithmetic panX + panY - PanInertia duplicate-removal in ScrollViewer.partial.h.mux.cs:767 stays correct regardless of PanInertia's numeric value (self-consistent addition/subtraction, not a bitwise trick tied to a specific bit position).

Cross-cutting notes

  • No async void, no .Result/.GetAwaiter().GetResult(), no event Action, no new #pragma warning disable without a paired restore, no Generated/ file hand-edits.
  • These enums (DMConfigurations/DMAlignment/DMOverpanMode/DMSnapCoordinate) are internal-only and never interop with a native DManip struct on Skia, so their exact bit values only need to be self-consistent within this managed port — confirmed via grep that no other file casts numeric literals against them.
  • Minor, non-blocking, previously noted: the null-propagation fix for SemanticZoom.OnPointerWheelChanged (requiring a ScrollViewer template part before wheel-zoom) still has no dedicated regression test exercising a template that omits the ScrollViewer part — unchanged from the prior round's "Minor" note.
    (branch: dev/doti/port-semanticzoom)

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 234994 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 289, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • DisplayInformation.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 289 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AuthenticationBroker_Demo.png-dark
    • AutomationPropertiesExtensions_Role.png-dark
    • Battery.png-dark
    • Battery.png
    • AuthenticationBroker_Demo.png
    • AutomationProperties_AutomationId.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • CompositionPath.png-dark
    • CompositionPath.png
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • Display.DisplayRequest.png-dark
    • Display.DisplayRequest.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • DataTemplate_Update_Sample.png-dark
    • DataTemplate_Update_Sample.png
    • DataTransferManager.png-dark
    • DataTransferManager.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation

@unodevops

Copy link
Copy Markdown
Contributor

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

@MartinZikmund

Copy link
Copy Markdown
Member

Hi @morning4coffe-dev 👋 This PR has merge conflicts with master. Could you rebase it onto the latest master when you get a chance? Once it's conflict-free I'll take it for review. Thanks!

🤖 AI-generated on Martin's behalf — tag @MartinZikmund if something needs a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Controls] SemanticZoom control

6 participants