Skip to content

Strip residual dead native #if blocks from shared Uno.UI - #23671

Merged
MartinZikmund merged 4 commits into
feature/breakingchangesfrom
dev/mazi/dropnative
Jul 15, 2026
Merged

MartinZikmund merged 4 commits into
feature/breakingchangesfrom
dev/mazi/dropnative

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: Part of epic unoplatform/uno-private#2049 — 🦋 Drop native targets. Completes unoplatform/uno-private#2096 — Strip dead native #if blocks.

PR Type:

🔄 Refactoring (no functional changes, no api changes)

What changed? 🚀

Follow-up that finishes the dead native-#if strip for the native-targets drop. #23470 removed the bulk (~270 files across 8 batches), but a residual set of native preprocessor branches survived in the shared Uno.UI sources — mostly __APPLE_UIKIT__-only guards and conditions that mix a native symbol with a live one. This PR collapses the remaining 73 directives across 28 files.

With the native UI targets gone, files under src/Uno.UI compile only in the Skia and Reference heads, where __ANDROID__, __IOS__, __WASM__ and __APPLE_UIKIT__ are never defined. Those #if/#elif branches are dead code interleaved with the live Skia logic.

Each condition is partial-evaluated (those four symbols → false) and simplified, keeping every still-live symbol verbatim (__SKIA__, __CROSSRUNTIME__, UNO_REFERENCE_API, __NETSTD_REFERENCE__, __MACCATALYST__, IS_UNIT_TESTS, …). This is deliberately not blind deletion:

  • #if __SKIA__ || __WASM__ → #if __SKIA__
  • #if !__WASM__ && !__SKIA__ → #if !__SKIA__  (still live on Reference — kept, not removed)
  • #if __APPLE_UIKIT__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ → #if IS_UNIT_TESTS || __SKIA__ || __NETSTD_REFERENCE__
  • #if !(IS_NATIVE_ELEMENT && __APPLE_UIKIT__) && !UNO_HAS_ENHANCED_LIFECYCLE → #if !UNO_HAS_ENHANCED_LIFECYCLE
  • pure-native branches (#if __ANDROID__, #if __APPLE_UIKIT__ || __ANDROID__) dropped entirely; #else/#elif bodies promoted where they become unconditional.

Deliberately left untouched ⚠️

Files that are <Compile Include>-linked into the native Skia runtime hosts — Uno.UI.Runtime.Skia.Android (targets net*-android) and Uno.UI.Runtime.Skia.AppleUIKit (targets net*-ios/-maccatalyst/-tvos) — still see __ANDROID__ / __IOS__ / __APPLE_UIKIT__ as live symbols. Their native branches are not dead there, so all such files are left exactly as-is (14 files, incl. NativeApplication.cs, GlobalUsings.cs, the shared NativeCoreWebView2Http* headers, and every WebView/Native/{Android,iOSmacOS}/* file).

This is why grepping for #if __ANDROID__ still returns hits after this PR — those hits are in the linked-into-native-host files and are intentionally preserved.

Also removed 🗑️

  • UIElementCollection.Xamarin.cs and UIElementCollectionExtensions.Xamarin.cs — orphaned native-only files compiled by no remaining project (live implementations are UIElementCollection.cs / UIElementCollection.crossruntime.cs).

Validation ✅

  • Every edited file was independently re-derived and adversarially verified (28/28); each hunk audited by hand against the expected transformation.
  • #if/#endif balance confirmed on all 28 files.
  • Uno.UI.Skia and Uno.UI.Reference heads both build 0 Warning(s) / 0 Error(s) (net10.0).
  • The native runtime hosts are provably unaffected: their compile inputs are exclusively the untouched linked files.

No public API or runtime behavior change on any shipping head.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample — N/A: subtractive dead-code removal with no behavioral change; validated by compiling the Skia + Reference heads.
  • 📚 Docs — N/A.
  • 🖼️ Validated PR Screenshots Compare Test Run results — N/A: no visual change.
  • ❗ Contains NO breaking changes.
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code

https://claude.ai/code/session_0158dkz3C514Uw7PSy2VnSED

Copilot AI review requested due to automatic review settings July 7, 2026 14:32
@github-actions github-actions Bot added 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 labels Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 4m 58s —— View job


Code Review

Todo List:

  • Load review tools
  • Gather context: diff and changed files
  • Verify correctness of #if simplifications in each file
  • Check #if/#endif balance
  • Verify deleted files were truly orphaned
  • Check commit conventions
  • Post inline comments for issues found
  • Update summary comment with overall verdict

Overall Verdict: ✅ Ship (with nit follow-ups)

Correctness: All 73 directive simplifications across 28 files are correct. Every transformation was cross-checked:

  • __WASM__ → false, __ANDROID__ → false, __APPLE_UIKIT__ → false / __IOS__ → false applied consistently.
  • #if/#endif balance preserved in all modified files.
  • #else bodies promoted correctly where conditions collapsed to unconditional true.
  • Deleted files (UIElementCollection.Xamarin.cs, UIElementCollectionExtensions.Xamarin.cs) were genuinely orphaned — both required either _View = Android.Views.View or _View = UIKit.UIView and were compiled by no remaining project.

Issues by severity:

Severity Count
Nit (stale comments/metadata) 7

Nits (no blocking issues):

All 7 inline comments flag stale text that survives the #if strip but now misleads future readers — none affect behavior:

  • Application.Alc.cs (×2): comments still say "Skia and WASM" after __WASM__ was removed from the guard; should read "Skia" only.
  • NavigationView.cs: // TODO:MZ: Is this still needed for iOS? — iOS is now a dropped target; the TODO is moot and should be deleted.
  • ScrollViewer.cs: a 3-line comment explaining a WASM-specific scroll decision remains after the #if !__WASM__ gate was lifted; it's now dead context.
  • TextBox.cs (×2) / TextBlock.cs (×2): [NotImplemented(...)] attribute strings still list __ANDROID__, __APPLE_UIKIT__, and/or __WASM__ — these are informational metadata used by tooling; dropping the dead platform names keeps the attribution accurate.

No issues found with:

  • Async/cancellation discipline
  • DependencyProperty registration
  • Cross-platform correctness of retained #if __SKIA__ / __MACCATALYST__ / IS_UNIT_TESTS / __NETSTD_REFERENCE__ guards
  • Conventional Commits format (chore: ×2, descriptions under 50 chars)
  • Event declarations (EventHandler pattern)
  • Files under Generated/ — none touched

Validation note: Review is code-review assessment only (diff inspection). Build validation (net10.0 Skia + Reference heads: 0 Warning(s) / 0 Error(s)) is reported by the author; runtime validation is N/A for a pure dead-code strip.

Comment thread src/Uno.UI/UI/Xaml/Application.Alc.cs Resolved
Comment thread src/Uno.UI/UI/Xaml/Application.Alc.cs Resolved

Copilot AI left a comment

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.

Pull request overview

This PR continues the “drop native targets” refactor by simplifying remaining native-only preprocessor branches in shared src/Uno.UI code (treating __ANDROID__, __IOS__, __WASM__, __APPLE_UIKIT__ as dead in these heads), and removing orphaned Xamarin-only files that are no longer compiled.

Changes:

  • Simplified/removed residual native #if/#elif branches across multiple Uno.UI XAML/control files, keeping only still-live symbols (e.g. __SKIA__, __NETSTD_REFERENCE__, IS_UNIT_TESTS, etc.).
  • Removed two orphaned *.Xamarin.cs files (UIElementCollection*) that were native-only and no longer built.
  • Promoted/normalized remaining non-native logic by collapsing conditions like __SKIA__ || __WASM__ → __SKIA__, and removing native-only workarounds.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Uno.UI/UI/Xaml/Window/Window.WinAppSdk.cs Removes dead __APPLE_UIKIT__ guard around Window.Title.
src/Uno.UI/UI/Xaml/Window/Native/Factory/NativeWindowFactory.others.cs Collapses condition to only exclude Skia builds.
src/Uno.UI/UI/Xaml/UIElementExtensions.cs Removes dead platform guard so the file is always compiled in Uno.UI heads.
src/Uno.UI/UI/Xaml/UIElementCollectionExtensions.Xamarin.cs Deleted orphaned Xamarin-only native-view initializer helper.
src/Uno.UI/UI/Xaml/UIElementCollection.Xamarin.cs Deleted orphaned Xamarin-only native children enumerator.
src/Uno.UI/UI/Xaml/UIElement.RoutedEvents.cs Removes native-only usings/workarounds; collapses WASM/SKIA directives to SKIA-only.
src/Uno.UI/UI/Xaml/UIElement.MuxInternal.cs Removes dead native IsInLiveTree implementations.
src/Uno.UI/UI/Xaml/UIElement.cs Simplifies conditions to exclude only Skia (keeps reference behavior).
src/Uno.UI/UI/Xaml/UIElement.crossruntime.cs Collapses `SKIA
src/Uno.UI/UI/Xaml/Shapes/Shape.layout.crossruntime.cs Removes WASM branches, keeping only SKIA implementation.
src/Uno.UI/UI/Xaml/Media/Imaging/RenderTargetBitmap.UnmanagedArrayOfBytes.cs Removes dead Android guard; file is now always compiled in Uno.UI heads.
src/Uno.UI/UI/Xaml/Media/GeometryHelper.cs Removes dead __APPLE_UIKIT__ guard around ellipse geometry writing.
src/Uno.UI/UI/Xaml/FrameworkElement.Layout.crossruntime.cs Removes WASM-only DOM property/update and transform-specific clip adjustments.
src/Uno.UI/UI/Xaml/FrameworkElement.EffectiveViewport.cs Simplifies CHECK_LAYOUTED definition condition by dropping dead native clause.
src/Uno.UI/UI/Xaml/FrameworkElement.crossruntime.cs Removes WASM-only ToString() formatting block.
src/Uno.UI/UI/Xaml/Controls/WebView/Core/CoreWebView2.unsupported.cs Simplifies unsupported-platform guard to match remaining heads.
src/Uno.UI/UI/Xaml/Controls/ToggleSwitch/ToggleSwitch.cs Removes dead native template checks; returns false under remaining heads.
src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs Removes dead native/WASM branches in load/setup, properties, and event handling.
src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs Removes WASM-only forks; consolidates selection/foreground validation behavior.
src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs Removes dead platform-specific keyboard scrolling exclusions and WASM margin workaround.
src/Uno.UI/UI/Xaml/Controls/Pivot/PivotItem.cs Removes dead Android-only using.
src/Uno.UI/UI/Xaml/Controls/NavigationView/NavigationViewItem.Uno.cs Removes dead Android-only deferred visual state timer method.
src/Uno.UI/UI/Xaml/Controls/NavigationView/NavigationViewItem.cs Removes dead Android-only #define UNO_USE_DEFERRED_VISUAL_STATES.
src/Uno.UI/UI/Xaml/Controls/NavigationView/NavigationView.cs Removes dead Android/iOS arrange-height workarounds and Android-only usings.
src/Uno.UI/UI/Xaml/Controls/Image/Image.cs Collapses non-Skia condition by dropping dead WASM clause.
src/Uno.UI/UI/Xaml/Controls/GridView/GridViewHeaderItem.cs Removes dead WASM guard around constructor.
src/Uno.UI/UI/Xaml/Controls/Control/Control.cs Removes dead native/WASM debug and template-application branches.
src/Uno.UI/UI/Xaml/Application.Alc.cs Collapses `SKIA
src/Uno.UI/UI/ViewManagement/InputPane/InputPane.others.cs Collapses condition to exclude only Skia.
src/Uno.UI/FeatureConfiguration.cs Drops dead WASM/AppleUIKit branches for symbols font and other config toggles.
Comments suppressed due to low confidence (2)

src/Uno.UI/UI/Xaml/Media/Imaging/RenderTargetBitmap.UnmanagedArrayOfBytes.cs:5

  • using System.Linq; is unused in this file (no LINQ usage remains), which will trigger CS8019 and break the build due to warnings-as-errors. Remove the unused using.
using System;
using System.Buffers;
using System.Linq;
using System.Runtime.InteropServices;

src/Uno.UI/UI/Xaml/UIElementExtensions.cs:5

  • The file now contains only types from the Microsoft.UI.Xaml namespace but still has unused using directives. With TreatWarningsAsErrors=true, these unused usings will fail the build (CS8019). Remove the unused using lines.
using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.UI.Xaml

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 221073 found UI Test snapshots differences: skia-linux-screenshots: 0, skia-windows-screenshots: 79

Details
  • skia-linux-screenshots: 0 changed over 2366

  • skia-windows-screenshots: 79 changed over 2366

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ColorPickerSample.png
    • ContextRequested.png-dark
    • Gamepad_CurrentReading.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DisplayInformation.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ClipboardTests.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • Buttons.png-dark
    • Buttons.png
    • DropDownButtonPage.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png

MartinZikmund and others added 2 commits July 13, 2026 10:16
UIElementCollection.Xamarin.cs and UIElementCollectionExtensions.Xamarin.cs
are compiled by no remaining project once the native UI targets are dropped:
the `.Xamarin.cs` suffix is excluded from the Skia and Reference heads, and no
runtime host links them. The live implementations are UIElementCollection.cs
and UIElementCollection.crossruntime.cs.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0158dkz3C514Uw7PSy2VnSED
With the native UI targets removed, files under src/Uno.UI compile only in the
Skia and Reference heads, where __ANDROID__, __IOS__, __WASM__ and __APPLE_UIKIT__
are never defined. Their #if/#elif branches are dead code interleaved with the
live Skia logic.

Partial-evaluate those four symbols to false and simplify each condition,
preserving the still-live symbols verbatim (__SKIA__, __CROSSRUNTIME__,
UNO_REFERENCE_API, __NETSTD_REFERENCE__, IS_UNIT_TESTS, ...). For example
`#if !__WASM__ && !__SKIA__` becomes `#if !__SKIA__` (still live on Reference),
`#if __SKIA__ || __WASM__` becomes `#if __SKIA__`, and pure native branches are
dropped entirely.

Files linked into the Skia runtime hosts (Uno.UI.Runtime.Skia.Android and
.AppleUIKit) are deliberately left untouched: those hosts target the native
TFMs, so their __ANDROID__/__IOS__/__APPLE_UIKIT__ branches are still live.

No behavioral change. Validated by building the Uno.UI Skia and Reference heads
(both 0 warnings / 0 errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0158dkz3C514Uw7PSy2VnSED
@github-actions

github-actions Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 5m 10s —— View job


Code Review

Todo List:

  • Load review tools
  • Gather context: diff and changed files
  • Verify nit follow-ups from prior review were addressed
  • Check for any new issues introduced
  • Post inline comments for issues found
  • Update summary comment with overall verdict

Overall Verdict: ✅ Ship (7 prior nits still open, no new blocking issues)

The code change is correct — all #if simplifications are valid dead-code removal and the #if/#endif balance is preserved. No behavioral change for any shipping head.


Unresolved nits from prior review

All 7 nits flagged in the previous review remain open. None are blocking, but all affect future readers:

File Issue
Application.Alc.cs:99 Comment still says "Skia and WASM" after __WASM__ was dropped from the guard
Application.Alc.cs:216 Same stale "and WASM" mention
NavigationView.cs:1699 // TODO:MZ: Is this still needed for iOS? — iOS is a dropped target, this TODO is moot
ScrollViewer.cs:1749–1751 3-line WASM-specific rationale comment remains after the #if !__WASM__ guard was removed
TextBox.cs:785 [NotImplemented("__APPLE_UIKIT__", ..., "__WASM__", ...)] still lists dead platforms
TextBox.cs:794 Same
TextBlock.cs:610 [NotImplemented("__ANDROID__", "__APPLE_UIKIT__", ...)] still lists dead platforms
TextBlock.cs:619 Same

New finding: unused using System; in NavigationViewItem.Uno.cs

using System; on line 1 is now unused — its only consumer was TimeSpan.FromMilliseconds(200) inside DeferUpdateVisualStateForPointer, which was removed with the #if __ANDROID__ block. The remaining code (bool fields, DispatcherQueueTimer field) uses no symbol from System. Remove the directive:

-using System;
 using Windows.System;

This is pre-existing in the Skia build (where DeferUpdateVisualStateForPointer was also excluded by #if __ANDROID__), but the PR now makes it unused in all compilation heads.


CI screenshot differences (🔍 investigate)

The CI reported 79 changed skia-windows-screenshots against 2366 total. Since this PR's changes are purely dead-code removal in native #if branches that were never true in Skia builds, these differences cannot be caused by this PR. They most likely represent baseline drift in the feature/breakingchanges branch from earlier commits. Worth verifying that the screenshot test tool is comparing against the correct baseline for this branch, not an older one from main.


Validation note: Review is code-review assessment only (diff inspection). Build validation (net10.0 Skia + Reference: 0 Warning(s) / 0 Error(s)) reported by the author; runtime validation N/A for a dead-code strip.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 221973 found UI Test snapshots differences: skia-linux-screenshots: 73, skia-windows-screenshots: 88

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Examples.png-dark
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Basics Pivot Test.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • DoubleImageBrushInList.png-dark
    • CompositionPath.png
    • DataTransferManager.png
    • EllipsemaskingEllipseGrid.png
    • Gamepad_Enumeration.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • ColorPickerSample.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Buttons.png-dark
  • skia-windows-screenshots: 88 changed over 2368

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • Buttons.png-dark
    • Buttons.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_Enumeration.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • DoubleImageBrushInList.png-dark
    • CalendarView_Theming.png-dark

Drop comments and TODOs left dangling by the removed native branches, remove a
now-unused `using System;`, and fix TextBlock's [NotImplemented] platform lists
(IsTextSelectionEnabled is implemented on Skia, so the still-live __ANDROID__ /
__APPLE_UIKIT__ symbols of Skia-on-mobile heads would raise a false Uno0001).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GKBgQoAmRmaFoXXZr93iLB
@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 17s —— View job


Code Review

Todo List:

  • Load review tools
  • Gather context: read current state of changed files
  • Check which prior nits were resolved vs. still open
  • Verify new finding from prior review (unused using System;)
  • Post inline comments for open issues
  • Update summary comment with overall verdict

Overall Verdict: ✅ Ship (1 nit remaining)

The latest commit (bf2f8c68 chore: Address review comments on dead native #if cleanup) resolved 5 of 7 nits from prior reviews:

File Issue Status
Application.Alc.cs (×2) Stale "Skia and WASM" in comments ✅ Fixed
NavigationView.cs // TODO:MZ: Is this still needed for iOS? ✅ Fixed
ScrollViewer.cs Stale WASM-specific rationale comment ✅ Fixed
TextBlock.cs (×2) [NotImplemented] listed dead __ANDROID__/__APPLE_UIKIT__ ✅ Fixed
NavigationViewItem.Uno.cs Unused using System; ✅ Fixed
TextBox.cs (×2) [NotImplemented] still lists dead __APPLE_UIKIT__/__WASM__ ❌ Still open

The two remaining inline comments on TextBox.cs lines 785 and 794 are pure informational-metadata nits — no behavioral impact. The #if simplifications and orphaned-file deletions are correct and well-formed.

Validation note: Review is code-review assessment only (diff inspection). Build validation reported by the author; runtime validation N/A for a dead-code strip.

@MartinZikmund

Copy link
Copy Markdown
Member Author

@pr23671-comment.md

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 45s —— View job


Code Review

Todo List:

  • Load review tools
  • Gather context: read current state of changed files
  • Verify TextBox.cs nits from prior review were resolved in latest commit
  • Full review pass of all 30 changed files
  • Post inline comments for any findings
  • Update summary comment with overall verdict

Overall Verdict: ✅ Ship

The latest commit (08ef1ad2 chore: Drop dead platform names from TextBox NotImplemented) addresses the two remaining open nits from the prior reviews — both [Uno.NotImplemented] attribute strings on TextBox.CharacterCasing and TextBox.CharacterCasingProperty (lines 785 and 794) now correctly list only "IS_UNIT_TESTS", "__SKIA__", "__NETSTD_REFERENCE__", with the dead "__APPLE_UIKIT__" and "__WASM__" entries removed.

All prior nits resolved

File Issue Status
Application.Alc.cs (×2) Stale "Skia and WASM" in comments ✅ Fixed in bf2f8c68
NavigationView.cs Stale // TODO:MZ: Is this still needed for iOS? ✅ Fixed in bf2f8c68
ScrollViewer.cs Stale WASM-specific rationale comment ✅ Fixed in bf2f8c68
TextBlock.cs (×2) [NotImplemented] listed dead __ANDROID__/__APPLE_UIKIT__ ✅ Fixed in bf2f8c68
NavigationViewItem.Uno.cs Unused using System; ✅ Fixed in bf2f8c68
TextBox.cs (×2) [NotImplemented] still listed dead __APPLE_UIKIT__/__WASM__ ✅ Fixed in 08ef1ad2

No new findings. The #if simplifications are correct, the #if/#endif balance is preserved in all files, and the deleted files were genuinely orphaned. No prohibited event Action patterns, no stale dead platform references remain in the reviewed files.

Validation note: Review is code-review assessment only (diff inspection). Build validation (net10.0 Skia + Reference: 0 Warning(s) / 0 Error(s)) reported by the author; runtime validation N/A for a dead-code strip.

@MartinZikmund

Copy link
Copy Markdown
Member Author

Review comments addressed — 08ef1ad28a

All 11 unresolved review threads were re-checked against the current code on the branch, not against the diff they were originally filed on. Nine of them were already satisfied by the earlier review-comment commit (bf2f8c6882); the two that genuinely survived are fixed in 08ef1ad28a.

Validation level: code inspection only. Nothing was built, run, or tested locally — Azure Pipelines CI validates the branch.

Fixed (2)

file:line Reviewer point What changed
src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs:785 [Uno.NotImplemented] still lists __APPLE_UIKIT__ and __WASM__, which are dead symbols in Uno.UI after the native drop Attribute reduced to [Uno.NotImplemented("IS_UNIT_TESTS", "__SKIA__", "__NETSTD_REFERENCE__")], which now exactly matches the surrounding #if IS_UNIT_TESTS || __SKIA__ || __NETSTD_REFERENCE__ guard
src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs:794 Same stale list on CharacterCasingProperty Same change

Rationale, verified by inspection: src/Uno.UI/ now ships only Uno.UI.Skia.csproj and Uno.UI.Reference.csproj, so __APPLE_UIKIT__ / __WASM__ / __ANDROID__ can never be defined for this compilation unit. Listing them made the attribute claim those platforms lack an implementation, which is no longer a meaningful statement. This mirrors the shape already applied to TextBlock.cs. The change is string-literal-only inside an attribute, no code paths affected.

No change needed — already handled by bf2f8c6882 (9)

file:line Reviewer point Why no change
Application.Alc.cs:99 "Skia and WASM" comment is stale Comment now reads "ALC app hosting only exists on Skia." — already corrected
Application.Alc.cs:216 Same stale "Skia and WASM" reference Comment now reads "ALC app hosting only exists on Skia (see ExitAlcApplication)."
NavigationView/NavigationView.cs:1699 // TODO:MZ: Is this still needed for iOS? is moot The TODO is gone; grep TODO:MZ over NavigationView/ returns nothing
ScrollViewer/ScrollViewer.cs:1749 Dead WASM-scrolling comment above OnKeyDown Comment removed; the block now opens directly on the WinUI TemplatedParentHandlesScrolling note
TextBlock/TextBlock.cs:610 [NotImplemented] lists __ANDROID__ / __APPLE_UIKIT__ Already [NotImplemented("IS_UNIT_TESTS", "__NETSTD_REFERENCE__")]
TextBlock/TextBlock.cs:619 Same on IsTextSelectionEnabledProperty Same — already reduced
NavigationViewItem.Uno.cs:18 Leftover using System; will trip CS8019 The file's only using is using Windows.System;, which is still required by the DispatcherQueueTimer field inside the (still-live for Reference/unit-tests) #if !__SKIA__ block
TextBox.cs:785 (older duplicate thread) Duplicate of the fixed thread above Superseded — fixed in 08ef1ad28a
TextBox.cs:794 (older duplicate thread) Duplicate of the fixed thread above Superseded — fixed in 08ef1ad28a

Needs @MartinZikmund input (0)

Nothing was left open.

Note on scope: ~40 files under src/Uno.UI/ still reference __WASM__ / __ANDROID__ / __APPLE_UIKIT__. That is consistent with this PR being a targeted sweep rather than an exhaustive one; no reviewer thread asked for the remainder.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 222247 found UI Test snapshots differences: skia-linux-screenshots: 68, skia-windows-screenshots: 85

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DropDownButtonPage.png-dark
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Focus_FocusVisual_Properties.png-dark
    • ColorPickerSample.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • CornerRadiusControls.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_Margin_Large.png
    • Buttons.png
    • CompositionPath.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • EllipsemaskingEllipseGrid.png
  • skia-windows-screenshots: 85 changed over 2368

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

@mergify

mergify Bot commented Jul 14, 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 5671e0c into feature/breakingchanges Jul 15, 2026
47 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/dropnative branch July 15, 2026 07:32
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Aug 13, 2026
The directives were removed by unoplatform#23671 and re-introduced by master-sync
merge 0edfe5f. Only Uno.UI.Skia.csproj and Uno.UI.Reference.csproj
compile this file and neither defines __WASM__, so the arms were dead:
the IsOwnedByTextBlock one referenced _collection.Owner, a member
DependencyObjectCollection does not have.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01D5wk47a5fYoVKWwn9xbexY
MartinZikmund added a commit to ramezgerges/uno that referenced this pull request Sep 21, 2026
…tform#23619/unoplatform#23671/unoplatform#24020/unoplatform#23999

Fold Application.skia.cs and Application.reference.cs back into
Application.cs (unoplatform#24001 skianaming), fix the Lauched->Launched typo
(unoplatform#23619), keep the branch's __SKIA__-only ALC window teardown (unoplatform#23671
was WASM+Skia but native heads are gone), and drop the dead
UNO_HAS_ENHANCED_LIFECYCLE/__NETSTD_REFERENCE__ guards (unoplatform#24020/unoplatform#23999).
Application.reference.cs is dead code in the Skia-only build and is
removed, matching master.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XsQppKuZgijApgJxaTZt81
MartinZikmund added a commit to ramezgerges/uno that referenced this pull request Sep 21, 2026
…m#23999/unoplatform#23671

Image.cs still carried the pre-unoplatform#24001 #if-split legacy download/URI
pipeline (dead since the Subscribe/ImageData reactive pipeline
replaced it) while the neutral rendering lived in the resurrected
Image.skia.cs. Fold that neutral rendering into Image.cs, matching
master's structure, and drop the legacy members master already
removed (OnImageFailed/OnImageOpened/TraceProvider/ToString/etc. -
their behavior now lives in BitmapImage/SvgImageSource raising the
events directly).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XsQppKuZgijApgJxaTZt81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants